slicejs-cli 1.0.39 → 1.0.41

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/client.js CHANGED
@@ -12,11 +12,10 @@ sliceClient
12
12
  .description('Client for managing framework components');
13
13
 
14
14
  sliceClient
15
- .command('init <projectType>')
15
+ .command('init')
16
16
  .description('Initialize the project')
17
- .action((projectType) => {
18
- if(!projectType) projectType = 'basic';
19
- initializeProject(projectType);
17
+ .action(() => {
18
+ initializeProject("basic");
20
19
  });
21
20
 
22
21
  sliceClient
@@ -14,8 +14,9 @@ export default async function initializeProject(projectType) {
14
14
  }
15
15
 
16
16
  // Directorio de destino en la raíz del proyecto
17
- let srcDir = path.join(__dirname,'../../PROJECT_TEMPLATES/Basic/src' )
18
-
17
+ const destinationDir = path.join(__dirname, '../../../../Slice');
18
+ const destinationSrc = path.join(__dirname, '../../../../src')
19
+ const srcDir = path.join(__dirname, '../../PROJECT_TEMPLATES/Basic/src')
19
20
 
20
21
  // Verificar si el directorio de destino ya existe
21
22
  if (fs.existsSync(destinationDir)) {
@@ -25,7 +26,7 @@ export default async function initializeProject(projectType) {
25
26
 
26
27
  // Copiar el contenido del directorio de origen al directorio de destino
27
28
  await fs.copy(sliceDir, destinationDir, { recursive: true });
28
- await fs.copy(srcDir, destinationDir, {recursive:true})
29
+ await fs.copy(srcDir, destinationSrc, { recursive: true });
29
30
 
30
31
  Print.success('Proyecto inicializado correctamente.');
31
32
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slicejs-cli",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "description": "Command client for developing web applications with Slice.js framework",
5
5
  "main": "client.js",
6
6
  "scripts": {