slicejs-cli 1.0.22 → 1.0.24

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.
@@ -50,15 +50,15 @@ function createComponent(componentName, category, properties) {
50
50
 
51
51
  // Determinar la ruta del archivo
52
52
 
53
- const componentDir = path.join(__dirname, '../../../../Slice/Components', category, className);
54
-
53
+ let componentDir = path.join(__dirname, '../../../../Slice/Components', category, className);
54
+ componentDir=componentDir.slice(1);
55
55
  // Asegurarse de que el directorio del componente exista
56
56
  fs.ensureDirSync(componentDir);
57
-
57
+
58
58
  // Determinar la ruta del archivo
59
- const componentPath = path.join(componentDir, fileName);
60
-
61
- console.log(componentPath);
59
+ let componentPath = path.join(componentDir, fileName);
60
+
61
+
62
62
 
63
63
  // Verificar si el archivo ya existe
64
64
  if (fs.existsSync(componentPath)) {
@@ -82,3 +82,4 @@ function isValidComponentName(componentName) {
82
82
 
83
83
  export default createComponent;
84
84
 
85
+ createComponent('test', 'Visual', 'hola');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slicejs-cli",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "Command client for developing web applications with Slice.js",
5
5
  "main": "client.js",
6
6
  "scripts": {