express-generator-typescript 2.5.11 → 2.5.12
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/bin/cli.js +8 -26
- package/lib/cli.js +3 -1
- package/lib/express-generator-typescript.js +9 -3
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* created by Sean Maxwell, 5/31/2019
|
|
7
|
-
*/
|
|
3
|
+
const path = require('path'),
|
|
4
|
+
expressGenTs = require('../lib/express-generator-typescript');
|
|
8
5
|
|
|
9
|
-
const path = require('path');
|
|
10
|
-
const expressGenTs = require('../lib/express-generator-typescript');
|
|
11
6
|
|
|
7
|
+
/******************************************************************************
|
|
8
|
+
Run
|
|
9
|
+
******************************************************************************/
|
|
12
10
|
|
|
13
|
-
//
|
|
14
|
-
|
|
11
|
+
// Init
|
|
15
12
|
console.log('Setting up new Express/TypeScript project...');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// **** Process Options **** //
|
|
19
|
-
|
|
20
13
|
const args = process.argv.slice(2);
|
|
21
14
|
|
|
22
15
|
// Setup use yarn
|
|
@@ -27,14 +20,6 @@ if (useYarnIdx > -1) {
|
|
|
27
20
|
args.splice(useYarnIdx, 1);
|
|
28
21
|
}
|
|
29
22
|
|
|
30
|
-
// Setup include authentication
|
|
31
|
-
let withAuth = false;
|
|
32
|
-
const withAuthIdx = args.indexOf('--with-auth');
|
|
33
|
-
if (withAuthIdx > -1) {
|
|
34
|
-
withAuth = true;
|
|
35
|
-
args.splice(withAuthIdx, 1);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
23
|
// Setup destination
|
|
39
24
|
let destination = 'express-gen-ts';
|
|
40
25
|
if (args.length > 0) {
|
|
@@ -42,10 +27,7 @@ if (args.length > 0) {
|
|
|
42
27
|
}
|
|
43
28
|
destination = path.join(process.cwd(), destination);
|
|
44
29
|
|
|
45
|
-
|
|
46
|
-
// **** Call the generator script **** //
|
|
47
|
-
|
|
48
30
|
// Creating new project finished
|
|
49
|
-
expressGenTs(destination, useYarn
|
|
31
|
+
expressGenTs(destination, useYarn).then(() => {
|
|
50
32
|
console.log('Project setup complete!');
|
|
51
33
|
});
|
package/lib/cli.js
CHANGED
|
@@ -4,7 +4,9 @@ const path = require('path'),
|
|
|
4
4
|
expressGenTs = require('../lib/express-generator-typescript');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/******************************************************************************
|
|
8
|
+
Run
|
|
9
|
+
******************************************************************************/
|
|
8
10
|
|
|
9
11
|
// Init
|
|
10
12
|
console.log('Setting up new Express/TypeScript project...');
|
|
@@ -5,7 +5,9 @@ const path = require('path'),
|
|
|
5
5
|
fs = require('fs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/******************************************************************************
|
|
9
|
+
Variables
|
|
10
|
+
******************************************************************************/
|
|
9
11
|
|
|
10
12
|
// Project folder paths
|
|
11
13
|
const PROJECT_FOLDER_PATH = './project-files';
|
|
@@ -28,7 +30,9 @@ const ncpOpts = {
|
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
/******************************************************************************
|
|
34
|
+
Functions
|
|
35
|
+
******************************************************************************/
|
|
32
36
|
|
|
33
37
|
/**
|
|
34
38
|
* Entry point
|
|
@@ -105,6 +109,8 @@ function downloadNodeModules(destination, useYarn) {
|
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
|
|
108
|
-
|
|
112
|
+
/******************************************************************************
|
|
113
|
+
Export
|
|
114
|
+
******************************************************************************/
|
|
109
115
|
|
|
110
116
|
module.exports = expressGenTs;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-generator-typescript",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.12",
|
|
4
4
|
"description": "Generate new Express applications similar to express-generate which but sets it up to use TypeScript instead",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"express-generator-typescript": "node bin/cli.js",
|