slicejs-cli 1.0.37 → 1.0.39

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.
Files changed (29) hide show
  1. package/PROJECT_TEMPLATES/Basic/Slice/Components/components.js +12 -0
  2. package/PROJECT_TEMPLATES/Basic/src/Views/LandingPage/index.html +18 -0
  3. package/PROJECT_TEMPLATES/Basic/src/Views/LandingPage/index.js +23 -0
  4. package/PROJECT_TEMPLATES/Basic/src/Views/LandingPage/style.css +0 -0
  5. package/commands/init/init.js +3 -1
  6. package/package.json +1 -1
  7. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Provider/TestProvider/TestProvider.js +0 -0
  8. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Service/FetchManager/FetchManager.js +0 -0
  9. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Service/IndexedDbManager/IndexedDbManager.js +0 -0
  10. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Service/LocalStorageManager/LocalStorageManager.js +0 -0
  11. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Service/Translator/Translator.js +0 -0
  12. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Controller/Controller.js +0 -0
  13. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Debugger/Debugger.css +0 -0
  14. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Debugger/Debugger.html +0 -0
  15. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Debugger/Debugger.js +0 -0
  16. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Logger/Log.js +0 -0
  17. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Logger/Logger.js +0 -0
  18. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/StylesManager/CustomStylesManager/CustomStylesManager.js +0 -0
  19. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/StylesManager/StylesManager.js +0 -0
  20. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/StylesManager/ThemeManager/ThemeManager.js +0 -0
  21. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Visual/TestComponent/TestComponent.css +0 -0
  22. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Visual/TestComponent/TestComponent.html +0 -0
  23. /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Visual/TestComponent/TestComponent.js +0 -0
  24. /package/PROJECT_TEMPLATES/Basic/{Slice.js → Slice/Slice.js} +0 -0
  25. /package/PROJECT_TEMPLATES/Basic/{Styles → Slice/Styles}/Custom/custom.css +0 -0
  26. /package/PROJECT_TEMPLATES/Basic/{Themes → Slice/Themes}/Dark.css +0 -0
  27. /package/PROJECT_TEMPLATES/Basic/{Themes → Slice/Themes}/Light.css +0 -0
  28. /package/PROJECT_TEMPLATES/Basic/{Themes → Slice/Themes}/Slice.css +0 -0
  29. /package/PROJECT_TEMPLATES/Basic/{sliceConfig.json → Slice/sliceConfig.json} +0 -0
@@ -0,0 +1,12 @@
1
+ const components = {
2
+ "TestComponent": "Visual",
3
+ "FetchManager": "Service",
4
+ "IndexedDbManager": "Service",
5
+ "LocalStorageManager": "Service",
6
+ "Translator": "Service",
7
+ "TestProvider": "Provider",
8
+ "Controller": "Structural",
9
+ "Debugger": "Structural",
10
+ "Logger": "Structural",
11
+ "StylesManager": "Structural"
12
+ }; export default components;
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Document</title>
8
+ <link rel="stylesheet" href="style.css">
9
+ </head>
10
+
11
+ <body>
12
+ <div>Slice web Framework</div>
13
+ <button id="boton"></button>
14
+ <script src="../../../Slice/Slice.js" type="module"></script>
15
+ <script src="index.js" type="module"></script>
16
+ </body>
17
+
18
+ </html>
@@ -0,0 +1,23 @@
1
+ const boton = document.getElementById("boton");
2
+
3
+ let theme = "Light";
4
+ await slice.stylesManager.setTheme("Light");
5
+ boton.innerHTML = "Cambiar al tema Dark";
6
+
7
+ boton.addEventListener("click", async () => {
8
+ if (theme === "Slice") {
9
+ await slice.stylesManager.setTheme("Light");
10
+ theme = "Light";
11
+ boton.innerHTML = "Cambiar al tema Dark";
12
+ } else if (theme === "Light") {
13
+ await slice.stylesManager.setTheme("Dark");
14
+ theme = "Dark";
15
+ boton.innerHTML = "Cambiar al tema Slice";
16
+ } else if (theme === "Dark") {
17
+ await slice.stylesManager.setTheme("Slice");
18
+ theme = "Slice";
19
+ boton.innerHTML = "Cambiar al tema Light";
20
+ }
21
+ // console.log(theme);
22
+ });
23
+
@@ -14,7 +14,8 @@ export default async function initializeProject(projectType) {
14
14
  }
15
15
 
16
16
  // Directorio de destino en la raíz del proyecto
17
- const destinationDir = path.join(__dirname, '../../../../Slice');
17
+ let srcDir = path.join(__dirname,'../../PROJECT_TEMPLATES/Basic/src' )
18
+
18
19
 
19
20
  // Verificar si el directorio de destino ya existe
20
21
  if (fs.existsSync(destinationDir)) {
@@ -24,6 +25,7 @@ export default async function initializeProject(projectType) {
24
25
 
25
26
  // Copiar el contenido del directorio de origen al directorio de destino
26
27
  await fs.copy(sliceDir, destinationDir, { recursive: true });
28
+ await fs.copy(srcDir, destinationDir, {recursive:true})
27
29
 
28
30
  Print.success('Proyecto inicializado correctamente.');
29
31
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slicejs-cli",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
4
4
  "description": "Command client for developing web applications with Slice.js framework",
5
5
  "main": "client.js",
6
6
  "scripts": {