generator-nitro 6.0.2 → 6.0.6
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/generators/app/index.js
CHANGED
|
@@ -33,6 +33,7 @@ module.exports = class extends Generator {
|
|
|
33
33
|
|
|
34
34
|
this._git = {
|
|
35
35
|
root: false,
|
|
36
|
+
projet: false,
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
this.option('name', {
|
|
@@ -102,17 +103,21 @@ module.exports = class extends Generator {
|
|
|
102
103
|
const dest = this.destinationPath();
|
|
103
104
|
const gitRoot = findGitRoot(dest).replace('.git', '');
|
|
104
105
|
let gitPath = false;
|
|
106
|
+
let projectPath = false;
|
|
105
107
|
|
|
106
108
|
if (gitRoot) {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
const relativeGitRoot = path.relative(dest, gitRoot);
|
|
110
|
+
const relativeProjectRoot = path.relative(gitRoot, dest);
|
|
111
|
+
if (relativeGitRoot) {
|
|
112
|
+
gitPath = `${relativeGitRoot.replace(/\\/g, '/')}/`;
|
|
113
|
+
projectPath = `./${relativeProjectRoot.replace(/\\/g, '/')}`;
|
|
110
114
|
} else {
|
|
111
115
|
gitPath = './';
|
|
112
116
|
}
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
this._git.root = gitPath;
|
|
120
|
+
this._git.project = projectPath;
|
|
116
121
|
} catch (e) {
|
|
117
122
|
this.log(chalk.red(e.message));
|
|
118
123
|
}
|
|
@@ -124,7 +129,7 @@ module.exports = class extends Generator {
|
|
|
124
129
|
// check whether there is already a nitro application in place and we only have to update the application
|
|
125
130
|
const json = this.fs.readJSON(this.destinationPath('.yo-rc.json'), { new: true });
|
|
126
131
|
|
|
127
|
-
if (!json.new) {
|
|
132
|
+
if (!json.new && json['generator-nitro']) {
|
|
128
133
|
// update existing application
|
|
129
134
|
return this.prompt([
|
|
130
135
|
{
|
|
@@ -279,6 +284,7 @@ module.exports = class extends Generator {
|
|
|
279
284
|
|
|
280
285
|
const tplFiles = [
|
|
281
286
|
// files to process with copyTpl
|
|
287
|
+
'.husky/pre-commit',
|
|
282
288
|
'config/default.js',
|
|
283
289
|
'config/default/exporter.js',
|
|
284
290
|
'config/default/gulp.js',
|
|
@@ -417,6 +423,7 @@ module.exports = class extends Generator {
|
|
|
417
423
|
options: this.options,
|
|
418
424
|
git: {
|
|
419
425
|
root: this._git.root,
|
|
426
|
+
project: this._git.project,
|
|
420
427
|
}
|
|
421
428
|
};
|
|
422
429
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
16.13.
|
|
1
|
+
16.13.2
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"nitro:update": "npm uninstall generator-nitro && npm install generator-nitro@latest --save-dev --save-exact && yo nitro",
|
|
21
21
|
"update-dependencies": "npm-check-updates -u",
|
|
22
22
|
"\n# MISC ------- ": "",
|
|
23
|
-
"postinstall": "<% if (git.root) { %>cd <%= git.root %> && husky install
|
|
23
|
+
"postinstall": "<% if (git.root) { %>cd <%= git.root %> && husky install <% if (git.project) { %><%= git.project %>/.husky <% } %>&& <% } %><% if (options.themes) { %>npm rebuild node-sass && <% } %>env-linter<% if (git.root) { %> --hooksInstalled<% } %> --saveExact --dependenciesExactVersion --lts",
|
|
24
24
|
"\n# LINT/TEST ------- ": "",
|
|
25
25
|
"check-node-version": "check-node-version --print --package",
|
|
26
26
|
"cypress-test": "npm run build && cross-env PORT=8888 NITRO_MODE=test npm-run-all --parallel --race test:cypress:serve cypress-test:open",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@gondel/plugin-hot": "1.2.7",
|
|
86
86
|
"@khanacademy/tota11y": "0.2.0",
|
|
87
87
|
"bootstrap": "5.1.3",<% } %>
|
|
88
|
-
"core-js": "3.
|
|
88
|
+
"core-js": "3.20.2"<% if (options.exampleCode) { %>,
|
|
89
89
|
"flatpickr": "4.6.9",
|
|
90
90
|
"handlebars": "4.7.7",
|
|
91
91
|
"jquery": "3.6.0",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"svg4everybody": "2.1.9"<% } %>
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {<% if (options.jsCompiler === 'js') { %>
|
|
99
|
-
"@babel/eslint-parser": "7.16.
|
|
99
|
+
"@babel/eslint-parser": "7.16.5",<% } %>
|
|
100
100
|
"@namics/eslint-config": "9.1.1",
|
|
101
101
|
"@namics/prettier-config": "2.0.1",
|
|
102
102
|
"@namics/stylelint-config": "1.1.2",
|
|
@@ -105,35 +105,35 @@
|
|
|
105
105
|
"@nitro/exporter": "<%= version %>",
|
|
106
106
|
"@nitro/gulp": "<%= version %>",
|
|
107
107
|
"@nitro/webpack": "<%= version %>",<% if (options.jsCompiler === 'ts') { %>
|
|
108
|
-
"@types/bootstrap": "5.1.
|
|
109
|
-
"@types/jquery": "3.5.
|
|
108
|
+
"@types/bootstrap": "5.1.8",<% if (options.exampleCode ) { %>
|
|
109
|
+
"@types/jquery": "3.5.12",<% } %>
|
|
110
110
|
"@types/svg4everybody": "2.1.2",
|
|
111
111
|
"@types/webpack-env": "1.16.3",<% } %>
|
|
112
|
-
"backstopjs": "6.0.
|
|
112
|
+
"backstopjs": "6.0.4",
|
|
113
113
|
"check-node-version": "4.2.1",
|
|
114
114
|
"commitizen": "4.2.4",
|
|
115
115
|
"config": "3.3.6",
|
|
116
116
|
"cross-env": "7.0.3",
|
|
117
|
-
"cypress": "9.1
|
|
117
|
+
"cypress": "9.2.1",
|
|
118
118
|
"cz-conventional-changelog": "3.3.0",
|
|
119
119
|
"env-linter": "0.5.1",
|
|
120
120
|
"eslint": "7.32.0",
|
|
121
|
-
"eslint-plugin-import": "2.25.
|
|
121
|
+
"eslint-plugin-import": "2.25.4",
|
|
122
122
|
"extend": "3.0.2",
|
|
123
123
|
"generator-nitro": "<%= version %>",
|
|
124
124
|
"gulp": "4.0.2",
|
|
125
125
|
"husky": "7.0.4",
|
|
126
126
|
"license-checker": "25.0.1",
|
|
127
|
-
"lighthouse": "9.
|
|
128
|
-
"lint-staged": "12.1.
|
|
127
|
+
"lighthouse": "9.2.0",
|
|
128
|
+
"lint-staged": "12.1.7",<% if (options.themes) { %>
|
|
129
129
|
"node-sass": "6.0.1",<% } %>
|
|
130
|
-
"npm-check-updates": "12.0
|
|
130
|
+
"npm-check-updates": "12.1.0",
|
|
131
131
|
"npm-run-all": "4.1.5",
|
|
132
132
|
"opener": "1.5.2",
|
|
133
|
-
"prettier": "2.
|
|
133
|
+
"prettier": "2.5.1",
|
|
134
134
|
"rimraf": "3.0.2",
|
|
135
135
|
"stylelint": "13.13.1",<% if (options.jsCompiler === 'ts') { %>
|
|
136
|
-
"typescript": "4.5.
|
|
136
|
+
"typescript": "4.5.4",<% } %>
|
|
137
137
|
"webpack-cli": "4.9.1",
|
|
138
138
|
"yo": "4.3.0"
|
|
139
139
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generator-nitro",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.6",
|
|
4
4
|
"description": "Yeoman generator for the nitro frontend framework",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "merkle-open/generator-nitro",
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
"glob": "7.2.0",
|
|
41
41
|
"got": "11.8.3",
|
|
42
42
|
"lodash": "4.17.21",
|
|
43
|
-
"yeoman-generator": "5.
|
|
43
|
+
"yeoman-generator": "5.5.2",
|
|
44
44
|
"yosay": "2.0.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@namics/eslint-config": "9.1.1",
|
|
48
48
|
"ejs": "3.1.6",
|
|
49
49
|
"eslint": "7.32.0",
|
|
50
|
-
"eslint-plugin-import": "2.25.
|
|
50
|
+
"eslint-plugin-import": "2.25.4",
|
|
51
51
|
"fs-extra": "10.0.0",
|
|
52
|
-
"jasmine": "3.
|
|
52
|
+
"jasmine": "3.99.0",
|
|
53
53
|
"yeoman-assert": "3.1.1",
|
|
54
54
|
"yeoman-test": "6.2.0"
|
|
55
55
|
}
|