@anthonylzq/simba.js 1.8.0 → 2.0.0

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.
@@ -6,7 +6,8 @@ const writeFile = require('../utils/writeFile')
6
6
  */
7
7
  module.exports = async projectName => {
8
8
  const data = {
9
- tsconfigContent: `{
9
+ base: {
10
+ content: `{
10
11
  "ts-node": {
11
12
  "files": true,
12
13
  "require": ["tsconfig-paths/register"]
@@ -25,8 +26,8 @@ module.exports = async projectName => {
25
26
  // "declaration": true, /* Generates corresponding '.d.ts' file. */
26
27
  // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
27
28
  // "outFile": "./", /* Concatenate and emit output to single file. */
28
- "outDir": "./dist/" /* Redirect output structure to the directory. */,
29
- "rootDir": "./src/" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
29
+ "outDir": "dist" /* Redirect output structure to the directory. */,
30
+ "rootDir": "src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
30
31
  // "composite": true, /* Enable project compilation */
31
32
  // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
32
33
  // "removeComments": true, /* Do not emit comments to output. */
@@ -53,7 +54,7 @@ module.exports = async projectName => {
53
54
 
54
55
  /* Module Resolution Options */
55
56
  "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
56
- "baseUrl": "./src", /* Base directory to resolve non-absolute module names. */
57
+ "baseUrl": "src", /* Base directory to resolve non-absolute module names. */
57
58
  // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
58
59
  // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
59
60
  // "typeRoots": [], /* List of folders to include type definitions from. */
@@ -79,12 +80,41 @@ module.exports = async projectName => {
79
80
  "skipLibCheck": true /* Skip type checking of declaration files. */,
80
81
  "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
81
82
  },
82
- "include": ["./src/"],
83
- "exclude": ["node_modules", "**/*.test.ts"]
83
+ "include": [
84
+ "src",
85
+ "test",
86
+ "tests",
87
+ "__test__"
88
+ ],
89
+ "exclude": [
90
+ "node_modules"
91
+ ]
84
92
  }
85
93
  `,
86
- tsconfigFile: 'tsconfig.json'
94
+ file: 'tsconfig.base.json'
95
+ },
96
+ prod: {
97
+ content: `{
98
+ "compilerOptions": {
99
+ "rootDir": "src"
100
+ },
101
+ "extends": "./tsconfig.base.json",
102
+ "exclude": [
103
+ "node_modules",
104
+ "test",
105
+ "tests",
106
+ "__test__",
107
+ "dist"
108
+ ],
109
+ "include": [
110
+ "src"
111
+ ]
112
+ }
113
+ `,
114
+ file: 'tsconfig.json'
115
+ }
87
116
  }
88
117
 
89
- await writeFile(`${projectName}/${data.tsconfigFile}`, data.tsconfigContent)
118
+ await writeFile(`${projectName}/${data.base.file}`, data.base.content)
119
+ await writeFile(`${projectName}/${data.prod.file}`, data.prod.content)
90
120
  }
@@ -56,7 +56,7 @@ module.exports = async ({
56
56
  cliProgress.Presets.shades_classic
57
57
  )
58
58
 
59
- const prodPackages = `${manager} express mongoose morgan http-errors joi swagger-ui-express`
59
+ const prodPackages = `${manager} express http-errors joi mongoose morgan swagger-ui-express`
60
60
  const devPackages = `${manager} -D \
61
61
  @types/express \
62
62
  @types/http-errors \
@@ -71,8 +71,6 @@ eslint-config-prettier \
71
71
  eslint-config-standard \
72
72
  eslint-plugin-import \
73
73
  eslint-plugin-prettier \
74
- eslint-plugin-sort-keys-fix \
75
- eslint-plugin-typescript-sort-keys \
76
74
  nodemon \
77
75
  prettier \
78
76
  standard-version \
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthonylzq/simba.js",
3
- "version": "1.8.0",
3
+ "version": "2.0.0",
4
4
  "description": "set up a modern backend app by running one command",
5
5
  "main": "lib/index.js",
6
6
  "directories": {
@@ -10,7 +10,7 @@
10
10
  "scripts": {
11
11
  "service": "node ./bin",
12
12
  "release": "standard-version",
13
- "test": "npm run rm && node ./bin -a AnthonyLzq -e sluzquinosa@uni.pe -N example -D 'This is a test'",
13
+ "test": "npm run rm && node ./bin -N example -D 'This is a test' -a AnthonyLzq -e sluzquinosa@uni.pe -l mit -H",
14
14
  "lint": "eslint --ext js lib/ --fix",
15
15
  "rm": "if [ -d \"example\" ]; then rm -rf example; fi"
16
16
  },
@@ -33,11 +33,11 @@
33
33
  "cli-progress": "^3.9.1",
34
34
  "colors": "^1.4.0",
35
35
  "readline-sync": "^1.4.10",
36
- "underscore": "^1.13.1",
36
+ "underscore": "^1.13.2",
37
37
  "yargs": "^17.3.0"
38
38
  },
39
39
  "devDependencies": {
40
- "eslint": "^7.32.0",
40
+ "eslint": "^8.5.0",
41
41
  "eslint-config-prettier": "^8.3.0",
42
42
  "eslint-config-standard": "^16.0.3",
43
43
  "eslint-plugin-import": "^2.25.3",
@@ -52,5 +52,9 @@
52
52
  "bugs": {
53
53
  "url": "https://github.com/AnthonyLzq/simba.js/issues"
54
54
  },
55
- "homepage": "https://github.com/AnthonyLzq/simba.js#readme"
55
+ "homepage": "https://github.com/AnthonyLzq/simba.js#readme",
56
+ "files": [
57
+ "lib",
58
+ "bin"
59
+ ]
56
60
  }
package/CHANGELOG.md DELETED
@@ -1,105 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
-
5
- ## [1.8.0](https://github.com/AnthonyLzq/simba.js/compare/v1.7.0...v1.8.0) (2021-12-13)
6
-
7
-
8
- ### Features
9
-
10
- * implemented baseUrl config with ts and webpack to avoid "../../.. ..." ([9b9e9d2](https://github.com/AnthonyLzq/simba.js/commit/9b9e9d20cae8b4bbdaef58364220512514dac1a4))
11
- * updated docker file and ignored git folder to be generated manually by docker ([33c1b0d](https://github.com/AnthonyLzq/simba.js/commit/33c1b0df9cfac4e686ece884aa3102e9ad49e6ab))
12
- * updated docs ([ba72b64](https://github.com/AnthonyLzq/simba.js/commit/ba72b643ea45af7ce7dd7a9adaf8b4f27eacd266))
13
-
14
-
15
- ### Bug Fixes
16
-
17
- * fixed eslint ignore ([1405884](https://github.com/AnthonyLzq/simba.js/commit/1405884ab10cf869d6811fbf588ba0b0efb04de2))
18
- * fixed mongo connection ([57f8580](https://github.com/AnthonyLzq/simba.js/commit/57f85803701253be2308b1c45f537db5b59c92d4))
19
-
20
- ## [1.7.0](https://github.com/AnthonyLzq/simba.js/compare/v1.6.0...v1.7.0) (2021-12-12)
21
-
22
-
23
- ### Features
24
-
25
- * updated docs and minor changes ([e6b32ca](https://github.com/AnthonyLzq/simba.js/commit/e6b32ca309603544e3506c9d18717f0e45ef0457))
26
-
27
- ## [1.6.0](https://github.com/AnthonyLzq/simba.js/compare/v1.5.0...v1.6.0) (2021-12-12)
28
-
29
-
30
- ### Features
31
-
32
- * implemented default mongo connection to local database ([1e66e98](https://github.com/AnthonyLzq/simba.js/commit/1e66e982b03eca5c2c3846a10ad827150683da21))
33
-
34
- ## [1.5.0](https://github.com/AnthonyLzq/simba.js/compare/v1.3.1...v1.5.0) (2021-12-12)
35
-
36
-
37
- ### Features
38
-
39
- * moving response function to the global variables and cleaning user route ([52f44aa](https://github.com/AnthonyLzq/simba.js/commit/52f44aadad180816d710b1e03dcc1c809b2be424))
40
- * simplified the code ([dde8f2e](https://github.com/AnthonyLzq/simba.js/commit/dde8f2e27f86f60321af2f12b53546227d0ffe64))
41
-
42
- ## [1.4.0](https://github.com/AnthonyLzq/simba.js/compare/v1.3.1...v1.4.0) (2021-12-12)
43
-
44
-
45
- ### Features
46
-
47
- * simplified the code ([dde8f2e](https://github.com/AnthonyLzq/simba.js/commit/dde8f2e27f86f60321af2f12b53546227d0ffe64))
48
-
49
- ### [1.3.1](https://github.com/AnthonyLzq/simba.js/compare/v1.3.0...v1.3.1) (2021-12-12)
50
-
51
-
52
- ### Features
53
-
54
- * updated docs ([809afaa](https://github.com/AnthonyLzq/simba.js/commit/809afaad2c1c3046fab509842118064ec6a61d5f))
55
-
56
- ## [1.3.0](https://github.com/AnthonyLzq/simba.js/compare/v1.2.0...v1.3.0) (2021-12-12)
57
-
58
-
59
- ### Features
60
-
61
- * implemented eslint rules ([748fb91](https://github.com/AnthonyLzq/simba.js/commit/748fb91a031102855dd7ba08344cc1ec3e181a4f))
62
- * implemented support for global variables (Node.js v16), linted all the code, fixed unlicensed project bug and simplified project structure ([ae4876f](https://github.com/AnthonyLzq/simba.js/commit/ae4876f249ff7dfd16fd4af7e41b3388c7de0f6a))
63
-
64
- ## [1.2.0](https://github.com/AnthonyLzq/simba.js/compare/v1.1.3...v1.2.0) (2021-10-18)
65
-
66
-
67
- ### Features
68
-
69
- * implemented support for project names with more than a word and updated dependencies ([2600413](https://github.com/AnthonyLzq/simba.js/commit/2600413bf7a5ef92e554738066e9bc4aea892f6f))
70
-
71
- ### [1.1.3](https://github.com/AnthonyLzq/simba.js/compare/v1.1.2...v1.1.3) (2021-10-17)
72
-
73
-
74
- ### Bug Fixes
75
-
76
- * fixed bin path ([bf194ff](https://github.com/AnthonyLzq/simba.js/commit/bf194ff21e6aaf63dd1a80c104b8a3567f0887b1))
77
-
78
- ### [1.1.2](https://github.com/AnthonyLzq/simba.js/compare/v1.1.1...v1.1.2) (2021-10-17)
79
-
80
-
81
- ### Bug Fixes
82
-
83
- * updated eslint package (eslint-config-airbnb -> eslint-config-airbnb-base) ([06547bc](https://github.com/AnthonyLzq/simba.js/commit/06547bc618e79f9f6e47e3b0fbd188358befe408))
84
-
85
- ### [1.1.1](https://github.com/AnthonyLzq/simba.js/compare/v1.0.1...v1.1.1) (2021-10-17)
86
-
87
-
88
- ### Features
89
-
90
- * added new eslint package and some new rules ([d79426c](https://github.com/AnthonyLzq/simba.js/commit/d79426c23fc899128d68c8b2e79ed7c5c0e4b18b))
91
-
92
- ### [1.0.1](https://github.com/AnthonyLzq/simba.js/compare/v1.0.0...v1.0.1) (2021-10-01)
93
-
94
-
95
- ### Bug Fixes
96
-
97
- * flag for unlicensed ([6b20a5b](https://github.com/AnthonyLzq/simba.js/commit/6b20a5b8a9ad60e5278b38252849fe5c3b2d54a4))
98
-
99
- ## 1.0.0 (2021-09-28)
100
-
101
-
102
- ### Features
103
-
104
- * first simba.js release ([d10fa01](https://github.com/AnthonyLzq/simba.js/commit/d10fa0199a8bff941da186c33fc16b512295a037))
105
- * updated package name and added standard-version command ([d0d0906](https://github.com/AnthonyLzq/simba.js/commit/d0d09064587a814f97d7a63b865b28a6f05030ad))