@anthonylzq/simba.js 1.9.1 → 2.0.2
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/README.md +55 -27
- package/lib/index.js +1 -1
- package/lib/src/functions/docker.js +2 -2
- package/lib/src/functions/eslint.js +1 -1
- package/lib/src/functions/express.js +458 -350
- package/lib/src/functions/tsconfig.js +38 -8
- package/lib/src/installation.js +1 -3
- package/package.json +8 -4
- package/CHANGELOG.md +0 -124
|
@@ -6,7 +6,8 @@ const writeFile = require('../utils/writeFile')
|
|
|
6
6
|
*/
|
|
7
7
|
module.exports = async projectName => {
|
|
8
8
|
const data = {
|
|
9
|
-
|
|
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": "
|
|
29
|
-
"rootDir": "
|
|
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": "
|
|
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": [
|
|
83
|
-
|
|
83
|
+
"include": [
|
|
84
|
+
"src",
|
|
85
|
+
"test",
|
|
86
|
+
"tests",
|
|
87
|
+
"__test__"
|
|
88
|
+
],
|
|
89
|
+
"exclude": [
|
|
90
|
+
"node_modules"
|
|
91
|
+
]
|
|
84
92
|
}
|
|
85
93
|
`,
|
|
86
|
-
|
|
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.
|
|
118
|
+
await writeFile(`${projectName}/${data.base.file}`, data.base.content)
|
|
119
|
+
await writeFile(`${projectName}/${data.prod.file}`, data.prod.content)
|
|
90
120
|
}
|
package/lib/src/installation.js
CHANGED
|
@@ -56,7 +56,7 @@ module.exports = async ({
|
|
|
56
56
|
cliProgress.Presets.shades_classic
|
|
57
57
|
)
|
|
58
58
|
|
|
59
|
-
const prodPackages = `${manager} 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": "
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "set up a modern backend app by running one command",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"directories": {
|
|
@@ -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.
|
|
36
|
+
"underscore": "^1.13.2",
|
|
37
37
|
"yargs": "^17.3.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"eslint": "^8.
|
|
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,124 +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.9.1](https://github.com/AnthonyLzq/simba.js/compare/v1.9.0...v1.9.1) (2021-12-14)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
* updated packages in example folder and .eslint rules ([b7bed74](https://github.com/AnthonyLzq/simba.js/commit/b7bed74fcd58f89abdffb7a06f87e4d808059af8))
|
|
11
|
-
|
|
12
|
-
## [1.9.0](https://github.com/AnthonyLzq/simba.js/compare/v1.8.0...v1.9.0) (2021-12-13)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### Features
|
|
16
|
-
|
|
17
|
-
* updated packages and example folder to include license and heroku config ([7267e7a](https://github.com/AnthonyLzq/simba.js/commit/7267e7ab40bf7333d566d7e90d85ad4f4357b731))
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Bug Fixes
|
|
21
|
-
|
|
22
|
-
* linted eslint.js file ([a47ea79](https://github.com/AnthonyLzq/simba.js/commit/a47ea795e2f6cf4363bd82ed05fc2c31b4fa8a26))
|
|
23
|
-
|
|
24
|
-
## [1.8.0](https://github.com/AnthonyLzq/simba.js/compare/v1.7.0...v1.8.0) (2021-12-13)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
### Features
|
|
28
|
-
|
|
29
|
-
* implemented baseUrl config with ts and webpack to avoid "../../.. ..." ([9b9e9d2](https://github.com/AnthonyLzq/simba.js/commit/9b9e9d20cae8b4bbdaef58364220512514dac1a4))
|
|
30
|
-
* updated docker file and ignored git folder to be generated manually by docker ([33c1b0d](https://github.com/AnthonyLzq/simba.js/commit/33c1b0df9cfac4e686ece884aa3102e9ad49e6ab))
|
|
31
|
-
* updated docs ([ba72b64](https://github.com/AnthonyLzq/simba.js/commit/ba72b643ea45af7ce7dd7a9adaf8b4f27eacd266))
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### Bug Fixes
|
|
35
|
-
|
|
36
|
-
* fixed eslint ignore ([1405884](https://github.com/AnthonyLzq/simba.js/commit/1405884ab10cf869d6811fbf588ba0b0efb04de2))
|
|
37
|
-
* fixed mongo connection ([57f8580](https://github.com/AnthonyLzq/simba.js/commit/57f85803701253be2308b1c45f537db5b59c92d4))
|
|
38
|
-
|
|
39
|
-
## [1.7.0](https://github.com/AnthonyLzq/simba.js/compare/v1.6.0...v1.7.0) (2021-12-12)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Features
|
|
43
|
-
|
|
44
|
-
* updated docs and minor changes ([e6b32ca](https://github.com/AnthonyLzq/simba.js/commit/e6b32ca309603544e3506c9d18717f0e45ef0457))
|
|
45
|
-
|
|
46
|
-
## [1.6.0](https://github.com/AnthonyLzq/simba.js/compare/v1.5.0...v1.6.0) (2021-12-12)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### Features
|
|
50
|
-
|
|
51
|
-
* implemented default mongo connection to local database ([1e66e98](https://github.com/AnthonyLzq/simba.js/commit/1e66e982b03eca5c2c3846a10ad827150683da21))
|
|
52
|
-
|
|
53
|
-
## [1.5.0](https://github.com/AnthonyLzq/simba.js/compare/v1.3.1...v1.5.0) (2021-12-12)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Features
|
|
57
|
-
|
|
58
|
-
* moving response function to the global variables and cleaning user route ([52f44aa](https://github.com/AnthonyLzq/simba.js/commit/52f44aadad180816d710b1e03dcc1c809b2be424))
|
|
59
|
-
* simplified the code ([dde8f2e](https://github.com/AnthonyLzq/simba.js/commit/dde8f2e27f86f60321af2f12b53546227d0ffe64))
|
|
60
|
-
|
|
61
|
-
## [1.4.0](https://github.com/AnthonyLzq/simba.js/compare/v1.3.1...v1.4.0) (2021-12-12)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
### Features
|
|
65
|
-
|
|
66
|
-
* simplified the code ([dde8f2e](https://github.com/AnthonyLzq/simba.js/commit/dde8f2e27f86f60321af2f12b53546227d0ffe64))
|
|
67
|
-
|
|
68
|
-
### [1.3.1](https://github.com/AnthonyLzq/simba.js/compare/v1.3.0...v1.3.1) (2021-12-12)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### Features
|
|
72
|
-
|
|
73
|
-
* updated docs ([809afaa](https://github.com/AnthonyLzq/simba.js/commit/809afaad2c1c3046fab509842118064ec6a61d5f))
|
|
74
|
-
|
|
75
|
-
## [1.3.0](https://github.com/AnthonyLzq/simba.js/compare/v1.2.0...v1.3.0) (2021-12-12)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
### Features
|
|
79
|
-
|
|
80
|
-
* implemented eslint rules ([748fb91](https://github.com/AnthonyLzq/simba.js/commit/748fb91a031102855dd7ba08344cc1ec3e181a4f))
|
|
81
|
-
* 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))
|
|
82
|
-
|
|
83
|
-
## [1.2.0](https://github.com/AnthonyLzq/simba.js/compare/v1.1.3...v1.2.0) (2021-10-18)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
### Features
|
|
87
|
-
|
|
88
|
-
* implemented support for project names with more than a word and updated dependencies ([2600413](https://github.com/AnthonyLzq/simba.js/commit/2600413bf7a5ef92e554738066e9bc4aea892f6f))
|
|
89
|
-
|
|
90
|
-
### [1.1.3](https://github.com/AnthonyLzq/simba.js/compare/v1.1.2...v1.1.3) (2021-10-17)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
### Bug Fixes
|
|
94
|
-
|
|
95
|
-
* fixed bin path ([bf194ff](https://github.com/AnthonyLzq/simba.js/commit/bf194ff21e6aaf63dd1a80c104b8a3567f0887b1))
|
|
96
|
-
|
|
97
|
-
### [1.1.2](https://github.com/AnthonyLzq/simba.js/compare/v1.1.1...v1.1.2) (2021-10-17)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
### Bug Fixes
|
|
101
|
-
|
|
102
|
-
* updated eslint package (eslint-config-airbnb -> eslint-config-airbnb-base) ([06547bc](https://github.com/AnthonyLzq/simba.js/commit/06547bc618e79f9f6e47e3b0fbd188358befe408))
|
|
103
|
-
|
|
104
|
-
### [1.1.1](https://github.com/AnthonyLzq/simba.js/compare/v1.0.1...v1.1.1) (2021-10-17)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
### Features
|
|
108
|
-
|
|
109
|
-
* added new eslint package and some new rules ([d79426c](https://github.com/AnthonyLzq/simba.js/commit/d79426c23fc899128d68c8b2e79ed7c5c0e4b18b))
|
|
110
|
-
|
|
111
|
-
### [1.0.1](https://github.com/AnthonyLzq/simba.js/compare/v1.0.0...v1.0.1) (2021-10-01)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
### Bug Fixes
|
|
115
|
-
|
|
116
|
-
* flag for unlicensed ([6b20a5b](https://github.com/AnthonyLzq/simba.js/commit/6b20a5b8a9ad60e5278b38252849fe5c3b2d54a4))
|
|
117
|
-
|
|
118
|
-
## 1.0.0 (2021-09-28)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
### Features
|
|
122
|
-
|
|
123
|
-
* first simba.js release ([d10fa01](https://github.com/AnthonyLzq/simba.js/commit/d10fa0199a8bff941da186c33fc16b512295a037))
|
|
124
|
-
* updated package name and added standard-version command ([d0d0906](https://github.com/AnthonyLzq/simba.js/commit/d0d09064587a814f97d7a63b865b28a6f05030ad))
|