slicejs-cli 1.0.44 → 1.0.45
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/commands/Validations.js
CHANGED
|
@@ -11,7 +11,6 @@ export default class Validations{
|
|
|
11
11
|
const categoryVariations = {
|
|
12
12
|
'Service': ['service', 'servicio', 'serv', 's'],
|
|
13
13
|
'Visual': ['visual', 'vis', 'v'],
|
|
14
|
-
'Provider': ['provider', 'proveedor', 'prov' , 'p'],
|
|
15
14
|
'Structural': ['structural', 'estructural', 'est', 'st']
|
|
16
15
|
};
|
|
17
16
|
|
|
@@ -10,7 +10,6 @@ export default function listComponents() {
|
|
|
10
10
|
|
|
11
11
|
const visualComponents = fs.readdirSync(`${SlicePath}/Visual`);
|
|
12
12
|
const services = fs.readdirSync(`${SlicePath}/Service`);
|
|
13
|
-
const providers = fs.readdirSync(`${SlicePath}/Provider`);
|
|
14
13
|
const structuralComponents = fs.readdirSync(`${SlicePath}/Structural`)
|
|
15
14
|
|
|
16
15
|
|
|
@@ -24,10 +23,6 @@ export default function listComponents() {
|
|
|
24
23
|
componentMap.set(component, "Service");
|
|
25
24
|
});
|
|
26
25
|
|
|
27
|
-
providers.forEach(component => {
|
|
28
|
-
componentMap.set(component, "Provider");
|
|
29
|
-
});
|
|
30
|
-
|
|
31
26
|
structuralComponents.forEach(component => {
|
|
32
27
|
componentMap.set(component, "Structural");
|
|
33
28
|
});
|
package/package.json
CHANGED
package/post.js
CHANGED
|
@@ -30,15 +30,15 @@ fs.promises.access(projectPackageJsonPath, fs.constants.F_OK)
|
|
|
30
30
|
return fs.promises.writeFile(projectPackageJsonPath, JSON.stringify(projectPackageJson, null, 2), 'utf8');
|
|
31
31
|
})
|
|
32
32
|
.then(() => {
|
|
33
|
-
console.log('
|
|
33
|
+
console.log('SliceJS CLI commands added to package.json.');
|
|
34
34
|
})
|
|
35
35
|
.catch(err => {
|
|
36
36
|
if (err.code === 'ENOENT') {
|
|
37
37
|
// El archivo package.json no existe, así que creamos uno nuevo con los comandos
|
|
38
38
|
const defaultPackageJson = {
|
|
39
|
-
name:
|
|
39
|
+
name: "project-name", // Utiliza el nombre de la carpeta como nombre del proyecto
|
|
40
40
|
version: '1.0.0',
|
|
41
|
-
description: '
|
|
41
|
+
description: 'Project description',
|
|
42
42
|
main: 'index.js',
|
|
43
43
|
scripts: {
|
|
44
44
|
'slice:init': 'node node_modules/slicejs-cli/client.js init',
|
|
@@ -58,7 +58,7 @@ fs.promises.access(projectPackageJsonPath, fs.constants.F_OK)
|
|
|
58
58
|
}
|
|
59
59
|
})
|
|
60
60
|
.then(() => {
|
|
61
|
-
console.log('
|
|
61
|
+
console.log('Created package.json with SliceJS CLI commands.');
|
|
62
62
|
})
|
|
63
63
|
.catch(err => {
|
|
64
64
|
console.error('Error:', err);
|