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.
- package/PROJECT_TEMPLATES/Basic/Slice/Components/components.js +12 -0
- package/PROJECT_TEMPLATES/Basic/src/Views/LandingPage/index.html +18 -0
- package/PROJECT_TEMPLATES/Basic/src/Views/LandingPage/index.js +23 -0
- package/PROJECT_TEMPLATES/Basic/src/Views/LandingPage/style.css +0 -0
- package/commands/init/init.js +3 -1
- package/package.json +1 -1
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Provider/TestProvider/TestProvider.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Service/FetchManager/FetchManager.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Service/IndexedDbManager/IndexedDbManager.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Service/LocalStorageManager/LocalStorageManager.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Service/Translator/Translator.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Controller/Controller.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Debugger/Debugger.css +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Debugger/Debugger.html +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Debugger/Debugger.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Logger/Log.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Logger/Logger.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/StylesManager/CustomStylesManager/CustomStylesManager.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/StylesManager/StylesManager.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/StylesManager/ThemeManager/ThemeManager.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Visual/TestComponent/TestComponent.css +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Visual/TestComponent/TestComponent.html +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Visual/TestComponent/TestComponent.js +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Slice.js → Slice/Slice.js} +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Styles → Slice/Styles}/Custom/custom.css +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Themes → Slice/Themes}/Dark.css +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Themes → Slice/Themes}/Light.css +0 -0
- /package/PROJECT_TEMPLATES/Basic/{Themes → Slice/Themes}/Slice.css +0 -0
- /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
|
+
|
|
File without changes
|
package/commands/init/init.js
CHANGED
|
@@ -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
|
-
|
|
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
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Service/Translator/Translator.js
RENAMED
|
File without changes
|
/package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Controller/Controller.js
RENAMED
|
File without changes
|
/package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Debugger/Debugger.css
RENAMED
|
File without changes
|
/package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Debugger/Debugger.html
RENAMED
|
File without changes
|
/package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Debugger/Debugger.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/PROJECT_TEMPLATES/Basic/{Components → Slice/Components}/Structural/Logger/Logger.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|