easy-soft-develop 2.1.174 → 2.1.177

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-soft-develop",
3
- "version": "2.1.174",
3
+ "version": "2.1.177",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/kityandhero/easy-soft-develop#readme",
6
6
  "bugs": {
@@ -99,7 +99,7 @@
99
99
  "eslint-plugin-eslint-comments": "^3.2.0",
100
100
  "eslint-plugin-import": "^2.29.1",
101
101
  "eslint-plugin-prettier": "^5.1.3",
102
- "eslint-plugin-promise": "^6.1.1",
102
+ "eslint-plugin-promise": "^6.2.0",
103
103
  "husky": "^9.0.11",
104
104
  "lint-staged": "^15.2.5",
105
105
  "npm-check-updates": "^16.14.20",
@@ -4,6 +4,7 @@ const {
4
4
  createCommitlintConfigFile,
5
5
  createBabelConfigFile,
6
6
  createNcuConfigFile,
7
+ createJsdocConfigFile,
7
8
  createNpmConfigFile,
8
9
  } = require('../tools/develop.file');
9
10
 
@@ -18,5 +19,6 @@ exports.run = function () {
18
19
  createCommitlintConfigFile();
19
20
  createBabelConfigFile();
20
21
  createNcuConfigFile();
22
+ createJsdocConfigFile();
21
23
  createNpmConfigFile();
22
24
  };
@@ -16,6 +16,7 @@ const {
16
16
  createCommitlintConfigFile,
17
17
  createBabelConfigFile,
18
18
  createNcuConfigFile,
19
+ createJsdocConfigFile,
19
20
  createNpmConfigFile,
20
21
  createCzConfigFile,
21
22
  } = require('../tools/develop.file');
@@ -277,6 +278,7 @@ function createRepositoryProject(name) {
277
278
  createCzConfigFile(`step *: create .czrc success`);
278
279
  createBabelConfigFile(`step *: create babel.config.js success`);
279
280
  createNcuConfigFile(`step *: create .ncurc.js success`);
281
+ createJsdocConfigFile(`step *: create .jsdoc.js success`);
280
282
  createNpmConfigFile(`step *: create .npmrc success`);
281
283
  createDevelopFiles('', `step *: create develop folder success`);
282
284
  createHusky();
@@ -0,0 +1,60 @@
1
+ const { fileGlobalHeader } = require('./template.config');
2
+
3
+ const folderPath = './develop/config/jsdoc';
4
+
5
+ const configFileContent = `${fileGlobalHeader}
6
+ module.exports = {
7
+ generalConfig: {
8
+ tags: {
9
+ allowUnknownTags: false,
10
+ dictionaries: ['jsdoc', 'closure'],
11
+ },
12
+ source: {
13
+ include: './src',
14
+ },
15
+ plugins: ['plugins/markdown'],
16
+ opts: {
17
+ template: 'node_modules/docdash',
18
+ encoding: 'utf8',
19
+ destination: 'docs/',
20
+ recurse: true,
21
+ verbose: true,
22
+ },
23
+ templates: {
24
+ cleverLinks: false,
25
+ monospaceLinks: false,
26
+ },
27
+ },
28
+ };
29
+ `;
30
+
31
+ const configFile = {
32
+ folderPath: `${folderPath}/config`,
33
+ fileName: 'index.js',
34
+ coverFile: false,
35
+ fileContent: configFileContent,
36
+ };
37
+
38
+ const contentFileContent = `${fileGlobalHeader}
39
+ const packageContent = \`${fileGlobalHeader}
40
+ const { generalConfig } = require("../../develop/config/jsdoc/config");
41
+
42
+ module.exports = generalConfig;
43
+ \`;
44
+
45
+ module.exports = {
46
+ packageContent,
47
+ };
48
+ `;
49
+
50
+ const contentFile = {
51
+ folderPath: `${folderPath}/template`,
52
+ fileName: 'content.js',
53
+ coverFile: true,
54
+ fileContent: contentFileContent,
55
+ };
56
+
57
+ module.exports = {
58
+ configFile,
59
+ contentFile,
60
+ };
@@ -7,11 +7,10 @@ const commitScript = {
7
7
  precommit: 'npm run z:lint:staged:quiet',
8
8
  };
9
9
 
10
- const documentationScript = {
11
- 'prez:documentation:generate': 'npm run z:documentation:clear && npm run z:documentation:lint',
12
- 'z:documentation:generate': 'npx documentation build src/** -f html --github -o docs',
13
- 'z:documentation:lint': 'npx documentation lint src/**',
14
- 'z:documentation:clear': 'npx easy-soft-develop rimraf --path ./docs',
10
+ const jsdocScript = {
11
+ 'prez:jsdoc:generate': 'npm run z:jsdoc:clear',
12
+ 'z:jsdoc:generate': 'npx jsdoc -c .jsdoc.json',
13
+ 'z:jsdoc:clear': 'npx easy-soft-develop rimraf --path ./docs',
15
14
  };
16
15
 
17
16
  const lintScript = {
@@ -51,7 +50,7 @@ const jestScript = {
51
50
 
52
51
  module.exports = {
53
52
  ...commitScript,
54
- ...documentationScript,
53
+ ...jsdocScript,
55
54
  ...lintScript,
56
55
  ...prettierScript,
57
56
  ...tscScript,
@@ -63,6 +63,10 @@ const {
63
63
  contentFile: ncuContentFile,
64
64
  configFile: ncuConfigFile,
65
65
  } = require('../templates/ncu.template');
66
+ const {
67
+ contentFile: jsdocContentFile,
68
+ configFile: jsdocConfigFile,
69
+ } = require('../templates/jsdoc.template');
66
70
  const {
67
71
  ignoreFile: stylelintIgnoreFile,
68
72
  contentFile: stylelintContentFile,
@@ -222,6 +226,16 @@ function createNcuConfigFile(successMessage = '') {
222
226
  }
223
227
  }
224
228
 
229
+ function createJsdocConfigFile(successMessage = '') {
230
+ let result = writeFileWithOptionsSync(jsdocContentFile);
231
+
232
+ if (result) {
233
+ if (!checkStringIsEmpty(successMessage)) {
234
+ promptSuccess(successMessage);
235
+ }
236
+ }
237
+ }
238
+
225
239
  function createNpmConfigFile(successMessage = '') {
226
240
  let result = writeFileSync(
227
241
  `./.npmrc`,
@@ -385,6 +399,7 @@ const { initialEnvironment } = require('easy-soft-develop');
385
399
 
386
400
  const eslintFile = require('../config/eslint/template/content');
387
401
  const ncuFile = require('../config/ncu/template/content');
402
+ const jsdocFile = require('../config/jsdoc/template/content');
388
403
  const eslintIgnoreFile = require('../config/eslint/template/ignore.content');
389
404
  const prettierFile = require('../config/prettier/template/content');
390
405
  const prettierIgnoreFile = require('../config/prettier/template/ignore.content');
@@ -407,6 +422,8 @@ const packageEslintFileContent = eslintFile.packageContent;
407
422
  const mainNcuFileContent = ncuFile.mainContent;
408
423
  const packageNcuFileContent = ncuFile.packageContent;
409
424
 
425
+ const packageJsdocFileContent = jsdocFile.packageContent;
426
+
410
427
  const eslintIgnoreContent = eslintIgnoreFile.content;
411
428
 
412
429
  const mainPrettierContent = prettierFile.mainContent;
@@ -498,6 +515,11 @@ const packageFileContentList = [
498
515
  content: packageNcuFileContent,
499
516
  coverFile: true,
500
517
  },
518
+ {
519
+ name: '.jsdoc.js',
520
+ content: packageJsdocFileContent,
521
+ coverFile: true,
522
+ },
501
523
  {
502
524
  name: '.prettierrc.js',
503
525
  content: packagePrettierContent,
@@ -680,6 +702,14 @@ function createDevelopFiles(
680
702
 
681
703
  //#endregion
682
704
 
705
+ //#region jsdoc
706
+
707
+ writeFileWithOptionsSync(jsdocContentFile);
708
+
709
+ writeFileWithOptionsSync(jsdocConfigFile);
710
+
711
+ //#endregion
712
+
683
713
  //#region stylelint
684
714
 
685
715
  writeFileWithOptionsSync(stylelintIgnoreFile);
@@ -724,6 +754,7 @@ module.exports = {
724
754
  createCommitlintConfigFile,
725
755
  createBabelConfigFile,
726
756
  createNcuConfigFile,
757
+ createJsdocConfigFile,
727
758
  createNpmConfigFile,
728
759
  createCleanScriptFile,
729
760
  createPackageCheckSpecialVersionScriptFile,
@@ -42,7 +42,7 @@ function getGlobalDevelopPackages() {
42
42
  'eslint-plugin-unicorn',
43
43
  ]);
44
44
 
45
- packages = packages.concat(['documentation']);
45
+ packages = packages.concat(['jsdoc', 'docdash']);
46
46
 
47
47
  packages = packages.concat([
48
48
  'prettier',
@@ -0,0 +1,18 @@
1
+ export namespace configFile {
2
+ export let folderPath: string;
3
+ export let fileName: string;
4
+ export let coverFile: boolean;
5
+ export { configFileContent as fileContent };
6
+ }
7
+ export namespace contentFile {
8
+ let folderPath_1: string;
9
+ export { folderPath_1 as folderPath };
10
+ let fileName_1: string;
11
+ export { fileName_1 as fileName };
12
+ let coverFile_1: boolean;
13
+ export { coverFile_1 as coverFile };
14
+ export { contentFileContent as fileContent };
15
+ }
16
+ declare const configFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nmodule.exports = {\n generalConfig: {\n tags: {\n allowUnknownTags: false,\n dictionaries: ['jsdoc', 'closure'],\n },\n source: {\n include: './src',\n },\n plugins: ['plugins/markdown'],\n opts: {\n template: 'node_modules/docdash',\n encoding: 'utf8',\n destination: 'docs/',\n recurse: true,\n verbose: true,\n },\n templates: {\n cleverLinks: false,\n monospaceLinks: false,\n },\n },\n};\n";
17
+ declare const contentFileContent: '/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst packageContent = `/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst { generalConfig } = require("../../develop/config/jsdoc/config");\n\nmodule.exports = generalConfig;\n`;\n\nmodule.exports = {\n packageContent,\n};\n';
18
+ export {};
@@ -31,7 +31,7 @@ export namespace customChildPackageFile {
31
31
  export { coverFile_3 as coverFile };
32
32
  export { customChildPackageFileContent as fileContent };
33
33
  }
34
- declare const globalChildPackageFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst commitScript = {\n precommit: 'npm run z:lint:staged:quiet',\n};\n\nconst documentationScript = {\n 'prez:documentation:generate': 'npm run z:documentation:clear && npm run z:documentation:lint',\n 'z:documentation:generate': 'npx documentation build src/** -f html --github -o docs',\n 'z:documentation:lint': 'npx documentation lint src/**',\n 'z:documentation:clear': 'npx easy-soft-develop rimraf --path ./docs',\n};\n\nconst lintScript = {\n 'z:lint:file:all': 'npm run z:lint:script:all && npm run z:lint:style:all',\n 'z:lint:file:all:fix': 'npm run z:lint:script:all:fix && npm run z:lint:style:all:fix',\n 'z:lint:file:change': 'npm run z:lint:script:change && npm run z:lint:style:all',\n 'z:lint:file:change:fix': 'npm run z:lint:script:change:fix && npm run z:lint:style:all:fix',\n 'z:lint:script:all': 'npx eslint --ext .js,.jsx,.ts,.tsx ./src',\n 'z:lint:script:all:fix': 'npx eslint --fix --ext .js,.jsx,.ts,.tsx ./src',\n 'postz:lint:script:all:fix': 'npm run z:prettier:format:all',\n 'z:lint:script:change': 'npx eslint --cache --ext .js,.jsx,.ts,.tsx ./src',\n 'z:lint:script:change:fix': 'npx eslint --fix --cache --ext .js,.jsx,.ts,.tsx ./src',\n 'postz:lint:script:change:fix': 'npm run z:prettier:format:change',\n 'z:lint:staged': 'npx lint-staged',\n 'z:lint:staged:quiet': 'npx lint-staged --quiet',\n 'z:lint:style:all': 'npx stylelint --allow-empty-input \"./src/**/*.{css,scss,less}\"',\n 'z:lint:style:all:fix': 'npx stylelint --allow-empty-input --fix \"./src/**/*.{css,scss,less}\"',\n 'postz:lint:style:all:fix': 'npm run z:prettier:format:all',\n 'z:lint:style:change': 'npx stylelint --allow-empty-input --cache \"./src/**/*.{css,scss,less}\"',\n 'z:lint:style:change:fix': 'npx stylelint --allow-empty-input --cache --fix \"./src/**/*.{css,scss,less}\"',\n 'postz:lint:style:change:fix': 'npm run z:prettier:format:change',\n};\n\nconst prettierScript = {\n 'z:prettier:format:all': 'npx prettier --write .',\n 'z:prettier:format:change': 'npx prettier --cache --write .',\n 'z:prettier:package.json': 'npx prettier --write ./package.json',\n};\n\nconst tscScript = {\n 'z:tsc:build': 'echo show tsc version and create declaration file && tsc -v && tsc -p ./tsconfig.types.json && echo declaration file generate complete',\n};\n\nconst jestScript = {\n 'z:test': 'cross-env NODE_ENV=test jest',\n};\n\nmodule.exports = {\n ...commitScript,\n ...documentationScript,\n ...lintScript,\n ...prettierScript,\n ...tscScript,\n ...jestScript,\n};\n";
34
+ declare const globalChildPackageFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst commitScript = {\n precommit: 'npm run z:lint:staged:quiet',\n};\n\nconst jsdocScript = {\n 'prez:jsdoc:generate': 'npm run z:jsdoc:clear',\n 'z:jsdoc:generate': 'npx jsdoc -c .jsdoc.json',\n 'z:jsdoc:clear': 'npx easy-soft-develop rimraf --path ./docs',\n};\n\nconst lintScript = {\n 'z:lint:file:all': 'npm run z:lint:script:all && npm run z:lint:style:all',\n 'z:lint:file:all:fix': 'npm run z:lint:script:all:fix && npm run z:lint:style:all:fix',\n 'z:lint:file:change': 'npm run z:lint:script:change && npm run z:lint:style:all',\n 'z:lint:file:change:fix': 'npm run z:lint:script:change:fix && npm run z:lint:style:all:fix',\n 'z:lint:script:all': 'npx eslint --ext .js,.jsx,.ts,.tsx ./src',\n 'z:lint:script:all:fix': 'npx eslint --fix --ext .js,.jsx,.ts,.tsx ./src',\n 'postz:lint:script:all:fix': 'npm run z:prettier:format:all',\n 'z:lint:script:change': 'npx eslint --cache --ext .js,.jsx,.ts,.tsx ./src',\n 'z:lint:script:change:fix': 'npx eslint --fix --cache --ext .js,.jsx,.ts,.tsx ./src',\n 'postz:lint:script:change:fix': 'npm run z:prettier:format:change',\n 'z:lint:staged': 'npx lint-staged',\n 'z:lint:staged:quiet': 'npx lint-staged --quiet',\n 'z:lint:style:all': 'npx stylelint --allow-empty-input \"./src/**/*.{css,scss,less}\"',\n 'z:lint:style:all:fix': 'npx stylelint --allow-empty-input --fix \"./src/**/*.{css,scss,less}\"',\n 'postz:lint:style:all:fix': 'npm run z:prettier:format:all',\n 'z:lint:style:change': 'npx stylelint --allow-empty-input --cache \"./src/**/*.{css,scss,less}\"',\n 'z:lint:style:change:fix': 'npx stylelint --allow-empty-input --cache --fix \"./src/**/*.{css,scss,less}\"',\n 'postz:lint:style:change:fix': 'npm run z:prettier:format:change',\n};\n\nconst prettierScript = {\n 'z:prettier:format:all': 'npx prettier --write .',\n 'z:prettier:format:change': 'npx prettier --cache --write .',\n 'z:prettier:package.json': 'npx prettier --write ./package.json',\n};\n\nconst tscScript = {\n 'z:tsc:build': 'echo show tsc version and create declaration file && tsc -v && tsc -p ./tsconfig.types.json && echo declaration file generate complete',\n};\n\nconst jestScript = {\n 'z:test': 'cross-env NODE_ENV=test jest',\n};\n\nmodule.exports = {\n ...commitScript,\n ...jsdocScript,\n ...lintScript,\n ...prettierScript,\n ...tscScript,\n ...jestScript,\n};\n";
35
35
  declare const customMainPackageFileContent: '/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst scripts = {};\n\nmodule.exports = {\n ...scripts,\n};\n';
36
36
  declare const customChildPackageFileContent: '/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst scripts = {};\n\nmodule.exports = {\n ...scripts,\n};\n';
37
37
  export {};
@@ -2,6 +2,7 @@ export function createCzConfigFile(successMessage?: string): void;
2
2
  export function createCommitlintConfigFile(successMessage?: string): void;
3
3
  export function createBabelConfigFile(successMessage?: string): void;
4
4
  export function createNcuConfigFile(successMessage?: string): void;
5
+ export function createJsdocConfigFile(successMessage?: string): void;
5
6
  export function createNpmConfigFile(successMessage?: string): void;
6
7
  export function createCleanScriptFile(): boolean;
7
8
  export function createPackageCheckSpecialVersionScriptFile(): void;
@@ -10,5 +11,8 @@ export function createInstallGlobalDevelopDependenceScriptFile(): void;
10
11
  * Create initial environment script files
11
12
  */
12
13
  export function createInitialEnvironmentScriptFiles(): void;
13
- export function createDevelopFiles(waitMessage?: string, successMessage?: string): void;
14
+ export function createDevelopFiles(
15
+ waitMessage?: string,
16
+ successMessage?: string,
17
+ ): void;
14
18
  export function createUpdatePackageFromPackageScriptFile(): boolean;