@cerema/cadriciel 1.3.1 → 1.3.3
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/cli/global/init.js +1 -1
- package/cli.js +10 -9
- package/package.json +1 -1
- package/cli/cadriciel/build.js +0 -8
- package/cli/cadriciel/dev.js +0 -8
- package/cli/cadriciel/gen.js +0 -34
- package/cli/cadriciel/logs.js +0 -8
- package/cli/cadriciel/project.js +0 -14
- package/cli/cadriciel/reset.js +0 -8
- package/cli/cadriciel/restart.js +0 -8
- package/cli/cadriciel/rm.js +0 -34
- package/cli/cadriciel/start.js +0 -8
- package/cli/cadriciel/stop.js +0 -8
package/cli/global/init.js
CHANGED
|
@@ -96,7 +96,7 @@ module.exports = (args) => {
|
|
|
96
96
|
|
|
97
97
|
const install_dependencies = (name) => {
|
|
98
98
|
console.log(' ');
|
|
99
|
-
const spinner = ora('Installation des dépendances
|
|
99
|
+
const spinner = ora('Installation des dépendances').start();
|
|
100
100
|
const projectPath = `${process.cwd()}/${name}`;
|
|
101
101
|
|
|
102
102
|
// Check if directory exists
|
package/cli.js
CHANGED
|
@@ -46,18 +46,18 @@ function findCadricielDir(startPath) {
|
|
|
46
46
|
const loadGlobalCommands = () => {
|
|
47
47
|
let dir = fs.readdirSync(__dirname + '/cli/global');
|
|
48
48
|
for (let i = 0; i < dir.length; i++) {
|
|
49
|
-
|
|
50
|
-
'
|
|
51
|
-
|
|
49
|
+
if (dir[i].indexOf('.js') > -1)
|
|
50
|
+
CADRICIEL_GLOBAL_COMMANDS[dir[i].split('.')[0]] = require(__dirname +
|
|
51
|
+
'/cli/global/' +
|
|
52
|
+
dir[i])();
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
55
|
|
|
55
|
-
const loadCadricielCommands = () => {
|
|
56
|
-
let dir = fs.readdirSync(
|
|
56
|
+
const loadCadricielCommands = (path) => {
|
|
57
|
+
let dir = fs.readdirSync(path);
|
|
57
58
|
for (let i = 0; i < dir.length; i++) {
|
|
58
|
-
|
|
59
|
-
'
|
|
60
|
-
dir[i])();
|
|
59
|
+
if (dir[i].indexOf('.js') > -1)
|
|
60
|
+
CADRICIEL_COMMANDS[dir[i].split('.')[0]] = require(path + dir[i])();
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
|
|
@@ -147,6 +147,7 @@ const displayBanner = () => {
|
|
|
147
147
|
console.log(`\n Vous n'êtes pas à l'intérieur d'un projet. `);
|
|
148
148
|
console.log(' ');
|
|
149
149
|
} else {
|
|
150
|
+
loadCadricielCommands(CADRICIEL_PATH + '/../cli/');
|
|
150
151
|
console.log(' ');
|
|
151
152
|
display(CADRICIEL_COMMANDS);
|
|
152
153
|
console.log(' ');
|
|
@@ -157,6 +158,7 @@ const displayBanner = () => {
|
|
|
157
158
|
|
|
158
159
|
const processCommands = (args) => {
|
|
159
160
|
const command = args[0];
|
|
161
|
+
loadCadricielCommands(CADRICIEL_PATH + '/../cli/');
|
|
160
162
|
if (!CADRICIEL_COMMANDS[command]) {
|
|
161
163
|
if (!CADRICIEL_GLOBAL_COMMANDS[command]) {
|
|
162
164
|
log.error('Commande inconnue : ' + command);
|
|
@@ -177,7 +179,6 @@ const processCommands = (args) => {
|
|
|
177
179
|
};
|
|
178
180
|
|
|
179
181
|
loadGlobalCommands();
|
|
180
|
-
loadCadricielCommands();
|
|
181
182
|
|
|
182
183
|
if (process.argv.length <= 2) return displayBanner();
|
|
183
184
|
|
package/package.json
CHANGED
package/cli/cadriciel/build.js
DELETED
package/cli/cadriciel/dev.js
DELETED
package/cli/cadriciel/gen.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
module.exports = (args) => {
|
|
2
|
-
return {
|
|
3
|
-
info: {
|
|
4
|
-
title: 'gen',
|
|
5
|
-
description: `Génération automatique des éléments clés pour votre projet`,
|
|
6
|
-
sub: [
|
|
7
|
-
{
|
|
8
|
-
title: 'api',
|
|
9
|
-
description: `Génération des API`,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
title: 'component',
|
|
13
|
-
description: `Génération de composant angular`,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
title: 'db',
|
|
17
|
-
description: `Gestion de base de données`,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
title: 'page',
|
|
21
|
-
description: `Génération de pages angular`,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
title: 'project',
|
|
25
|
-
description: `Gestion de projet`,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
title: 'service',
|
|
29
|
-
description: `Génération de services angular`,
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
};
|
package/cli/cadriciel/logs.js
DELETED
package/cli/cadriciel/project.js
DELETED
package/cli/cadriciel/reset.js
DELETED
package/cli/cadriciel/restart.js
DELETED
package/cli/cadriciel/rm.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
module.exports = (args) => {
|
|
2
|
-
return {
|
|
3
|
-
info: {
|
|
4
|
-
title: 'rm',
|
|
5
|
-
description: `Suppression automatique des éléments clés pour votre projet`,
|
|
6
|
-
sub: [
|
|
7
|
-
{
|
|
8
|
-
title: 'api',
|
|
9
|
-
description: `Suppression d'une API`,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
title: 'component',
|
|
13
|
-
description: `Suppression de composant angular`,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
title: 'db',
|
|
17
|
-
description: `Suppression de base de données`,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
title: 'page',
|
|
21
|
-
description: `Suppression de pages angular`,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
title: 'project',
|
|
25
|
-
description: `Suppression de projet`,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
title: 'service',
|
|
29
|
-
description: `Suppression de services angular`,
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
};
|
package/cli/cadriciel/start.js
DELETED