Skip to content

Commit

Permalink
refactor(monorepo): move flashPI into plugins folder, update scully p…
Browse files Browse the repository at this point in the history
…ackage.json

updated version numbers in scully-package.json
  • Loading branch information
SanderElias committed Jun 12, 2020
1 parent a440768 commit 84203de
Show file tree
Hide file tree
Showing 20 changed files with 84 additions and 83 deletions.
10 changes: 10 additions & 0 deletions libs/plugins/scully-plugin-flash-prevention/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
name: 'plugins-scully-plugin-flash-prevention',
preset: '../../../jest.config.js',
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
coverageDirectory:
'../../../coverage/libs/plugins/scully-plugin-flash-prevention',
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"lib": ["es2018", "dom"],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "../../dist/libs/scully-plugin-flash-prevention",
"outDir": "../../../dist/libs/scully-plugin-flash-prevention",
"sourceMap": true,
"target": "es2018",
"types": ["node"],
"typeRoots": ["../../node_modules/@types"],
"typeRoots": ["../../../node_modules/@types"],
"allowJs": true,
"paths": {
"@scullyio/scully": ["../../dist/libs/scully"],
"*": ["../../node_modules/*"]
"@scullyio/scully": ["../../../dist/libs/scully"],
"*": ["../../../node_modules/*"]
},
"plugins": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../../tsconfig.json",
"compilerOptions": {
"types": ["node", "jest"]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../../tsconfig.json",
"compilerOptions": {
"types": ["node", "jest"],
"module": "CommonJS"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
Expand Down
9 changes: 0 additions & 9 deletions libs/scully-plugin-flash-prevention/jest.config.js

This file was deleted.

25 changes: 12 additions & 13 deletions libs/scully/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully",
"version": "0.0.93",
"version": "0.0.94",
"description": "Scully CLI",
"repository": {
"type": "GIT",
Expand All @@ -14,24 +14,24 @@
"license": "MIT",
"dependencies": {
"asciidoctor.js": "^1.5.9",
"chalk": "^3.0.0",
"chokidar": "^3.3.0",
"chalk": "^4.1.0",
"chokidar": "^3.4.0",
"compression": "^1.7.4",
"cors": "^2.8.5",
"express": "^4.17.1",
"front-matter": "^3.0.2",
"fs-extra": "^9.0.0",
"guess-parser": "^0.4.17",
"jsdom": "^16.2.1",
"front-matter": "^4.0.2",
"fs-extra": "^9.0.1",
"guess-parser": "^0.4.18",
"jsdom": "^16.2.2",
"jsonc": "2.0.0",
"marked": "^0.8.1",
"marked": "^1.1.0",
"open": "^7.0.3",
"puppeteer": "^2.0.0",
"puppeteer": "^3.3.0",
"selfsigned": "^1.10.7",
"ws": "^7.2.1",
"ws": "^7.3.0",
"yamljs": "^0.3.0",
"yargs": "^15.3.1",
"highlight.js": "^9.18.1"
"highlight.js": "^10.1.0"
},
"devDependencies": {
"@types/compression": "^1.7.0",
Expand All @@ -46,7 +46,6 @@
"@types/yargs": "^15.0.4",
"codelyzer": "^5.1.2",
"prettier": "^1.19.1",
"ts-node": "^8.5.4",
"typescript": "^3.7.2"
"typescript": "^3.8.3"
}
}
6 changes: 3 additions & 3 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
"scully-docs": {
"tags": []
},
"scully-plugin-flash-prevention": {
"tags": []
},
"plugins-extra": {
"tags": []
},
Expand All @@ -45,6 +42,9 @@
},
"plugins-base-href-rewrite": {
"tags": []
},
"plugins-scully-plugin-flash-prevention": {
"tags": []
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ContentFolder: Test blog/page-1 Check contentPlugin render 1`] = `
"<!DOCTYPE html><html lang=\\"en\\"><head><meta name=\\"generator\\" content=\\"Scully 0.0.93\\">
"<!DOCTYPE html><html lang=\\"en\\"><head><meta name=\\"generator\\">
<meta charset=\\"utf-8\\">
<title>SampleBlog</title>
<base href=\\"/\\">
Expand Down Expand Up @@ -62,7 +62,7 @@ exports[`ContentFolder: Test blog/page-1 Check contentPlugin render 1`] = `
`;
exports[`Static: Test blog index Check clean blog index by scully 1`] = `
"<!DOCTYPE html><html lang=\\"en\\"><head><meta name=\\"generator\\" content=\\"Scully 0.0.93\\">
"<!DOCTYPE html><html lang=\\"en\\"><head><meta name=\\"generator\\">
<meta charset=\\"utf-8\\">
<title>SampleBlog</title>
<base href=\\"/\\">
Expand Down
2 changes: 1 addition & 1 deletion tests/jest/src/__tests__/__snapshots__/home.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Check list of all Check clean all list from scully 1`] = `
"<!DOCTYPE html><html lang=\\"en\\"><head><meta name=\\"generator\\" content=\\"Scully 0.0.93\\">
"<!DOCTYPE html><html lang=\\"en\\"><head><meta name=\\"generator\\">
<meta charset=\\"utf-8\\">
<title>All routes in application</title>
<base href=\\"/\\">
Expand Down
2 changes: 1 addition & 1 deletion tests/jest/src/__tests__/__snapshots__/users.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`JsonPlugin: test user List Check clean blog index by scully 1`] = `
"<!DOCTYPE html><html lang=\\"en\\"><head><meta name=\\"generator\\" content=\\"Scully 0.0.93\\">
"<!DOCTYPE html><html lang=\\"en\\"><head><meta name=\\"generator\\">
<meta charset=\\"utf-8\\">
<title>SampleBlog</title>
<base href=\\"/\\">
Expand Down
5 changes: 3 additions & 2 deletions tests/jest/src/test-config.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const configureTests = (
) => {
const compilerConfig: CompilerOptions = {
preserveWhitespaces: false,
...compilerOptions
...compilerOptions,
};

const configuredTestBed = TestBed.configureCompiler(compilerConfig);
Expand All @@ -24,6 +24,7 @@ export const configureTests = (

export const replaceIndexNG = (index: string) => {
return index
.replace(/ content=[\"\']Scully(.*)[\"\']/g, '')
.replace(/scully-version=[\"\'](.*)[\"\']/gi, '')
.replace(/\_ng(content|host)([\-A-Za-z0-9]*)/g, '')
.replace(/ng\-version\=\".{5,30}\"/g, '')
Expand All @@ -38,7 +39,7 @@ export const removeTransferState = (index: string) => {
return separateTransferFromHtml(index)[0];
};

export const separateTransferFromHtml = index => {
export const separateTransferFromHtml = (index) => {
const SCULLY_STATE_START = `/** ___SCULLY_STATE_START___ */`;
const SCULLY_STATE_END = `/** ___SCULLY_STATE_END___ */`;

Expand Down
8 changes: 4 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"paths": {
"@scullyio/scully": ["dist/libs/scully"],
"@scullyio/ng-lib": ["dist/libs/ng-lib"],
"@scullyio/scully-plugin-flash-prevention": [
"dist/libs/scully-plugin-flash-prevention"
],
"@scullyio/plugins/extra": ["libs/plugins/extra/src/index.ts"],
"@scullyio/plugins/from-data": ["libs/plugins/from-data/src/index.ts"],
"@scullyio/plugins/base-href-rewrite": [
"libs/plugins/base-href-rewrite/src/index.ts"
],
"@scullyio/plugins/demo-lib": ["libs/plugins/demo-lib/src/index.ts"]
"@scullyio/plugins/demo-lib": ["libs/plugins/demo-lib/src/index.ts"],
"@scullyio/plugins/scully-plugin-flash-prevention": [
"dist/libs/plugins/scully-plugin-flash-prevention"
]
}
},
"angularCompilerOptions": {
Expand Down
82 changes: 41 additions & 41 deletions workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,47 +293,6 @@
}
}
},
"scully-plugin-flash-prevention": {
"root": "libs/scully-plugin-flash-prevention",
"sourceRoot": "libs/scully-plugin-flash-prevention/src",
"projectType": "library",
"schematics": {},
"architect": {
"lint": {
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"config": "libs/scully-plugin-flash-prevention/.eslintrc",
"tsConfig": [
"libs/scully-plugin-flash-prevention/tsconfig.lib.json",
"libs/scully-plugin-flash-prevention/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**",
"!libs/scully-plugin-flash-prevention/**"
]
}
},
"test": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/scully-plugin-flash-prevention/jest.config.js",
"tsConfig": "libs/scully-plugin-flash-prevention/tsconfig.spec.json",
"passWithNoTests": true
}
},
"build": {
"builder": "@nrwl/node:package",
"options": {
"outputPath": "dist/libs/scully-plugin-flash-prevention",
"tsConfig": "libs/scully-plugin-flash-prevention/tsconfig.lib.json",
"packageJson": "libs/scully-plugin-flash-prevention/package.json",
"main": "libs/scully-plugin-flash-prevention/index.ts",
"assets": ["libs/scully-plugin-flash-prevention/*.md"]
}
}
}
},
"plugins-extra": {
"root": "libs/plugins/extra",
"sourceRoot": "libs/plugins/extra/src",
Expand Down Expand Up @@ -450,6 +409,47 @@
}
}
}
},
"plugins-scully-plugin-flash-prevention": {
"root": "libs/plugins/scully-plugin-flash-prevention",
"sourceRoot": "libs/plugins/scully-plugin-flash-prevention/src",
"projectType": "library",
"schematics": {},
"architect": {
"lint": {
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"config": "libs/plugins/scully-plugin-flash-prevention/.eslintrc",
"tsConfig": [
"libs/plugins/scully-plugin-flash-prevention/tsconfig.lib.json",
"libs/plugins/scully-plugin-flash-prevention/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**",
"!libs/plugins/scully-plugin-flash-prevention/**"
]
}
},
"test": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/plugins/scully-plugin-flash-prevention/jest.config.js",
"tsConfig": "libs/plugins/scully-plugin-flash-prevention/tsconfig.spec.json",
"passWithNoTests": true
}
},
"build": {
"builder": "@nrwl/node:package",
"options": {
"outputPath": "dist/libs/plugins/scully-plugin-flash-prevention",
"tsConfig": "libs/plugins/scully-plugin-flash-prevention/tsconfig.lib.json",
"packageJson": "libs/plugins/scully-plugin-flash-prevention/package.json",
"main": "libs/plugins/scully-plugin-flash-prevention/index.ts",
"assets": ["libs/plugins/scully-plugin-flash-prevention/*.md"]
}
}
}
}
},
"cli": {
Expand Down

0 comments on commit 84203de

Please sign in to comment.