create-nodality-vue 1.0.0-beta.11 → 1.0.0-beta.2
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/bin/index.js +1 -1
- package/package.json +25 -9
- package/templates/index.html +0 -12
- package/templates/src/App.vue +0 -43
- package/templates/src/components/HelloWorld.vue +0 -37
- package/templates/src/main.js +0 -4
- package/templates/vite.config.js +0 -6
package/bin/index.js
CHANGED
package/package.json
CHANGED
@@ -1,28 +1,44 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-nodality-vue",
|
3
|
-
"version": "1.0.0-beta.
|
3
|
+
"version": "1.0.0-beta.2",
|
4
4
|
"description": "A scaffolding tool for creating Vue.js projects integrated with Nodality.",
|
5
5
|
"main": "bin/index.js",
|
6
6
|
"bin": {
|
7
7
|
"create-nodality-vue": "./bin/index.js"
|
8
8
|
},
|
9
|
-
"
|
10
|
-
"
|
11
|
-
|
12
|
-
],
|
13
|
-
"scripts": {},
|
9
|
+
"scripts": {
|
10
|
+
"test": "echo \"No tests specified\" && exit 0"
|
11
|
+
},
|
14
12
|
"keywords": [
|
15
13
|
"nodality",
|
16
14
|
"vue",
|
17
15
|
"scaffolding",
|
18
|
-
"create"
|
16
|
+
"create",
|
17
|
+
"frontend"
|
19
18
|
],
|
20
19
|
"author": "Filip Vabrousek",
|
21
20
|
"license": "MIT",
|
22
21
|
"dependencies": {
|
23
|
-
"fs-extra": "^11.1.0"
|
22
|
+
"fs-extra": "^11.1.0",
|
23
|
+
"nodality": "^1.0.0-beta.4"
|
24
|
+
},
|
25
|
+
"devDependencies": {
|
26
|
+
"eslint": "^8.45.0",
|
27
|
+
"prettier": "^3.0.0"
|
24
28
|
},
|
25
29
|
"engines": {
|
26
30
|
"node": ">=16.0.0"
|
27
|
-
}
|
31
|
+
},
|
32
|
+
"files": [
|
33
|
+
"bin/",
|
34
|
+
"templates/"
|
35
|
+
],
|
36
|
+
"repository": {
|
37
|
+
"type": "git",
|
38
|
+
"url": "https://github.com/nodalityjs/create-nodality-vue.git"
|
39
|
+
},
|
40
|
+
"bugs": {
|
41
|
+
"url": "https://github.com/nodalityjs/create-nodality-vue/issues"
|
42
|
+
},
|
43
|
+
"homepage": "https://github.com/nodalityjs/create-nodality-vue#readme"
|
28
44
|
}
|
package/templates/index.html
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<meta charset="UTF-8" />
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
|
-
<title>My Nodality Vue App</title>
|
7
|
-
</head>
|
8
|
-
<body>
|
9
|
-
<div id="app"></div>
|
10
|
-
<script type="module" src="/src/main.js"></script>
|
11
|
-
</body>
|
12
|
-
</html>
|
package/templates/src/App.vue
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<HelloWorld :text="textInstance" v-model:msg="welcomeMessage"/>
|
3
|
-
</template>
|
4
|
-
|
5
|
-
<script>
|
6
|
-
import HelloWorld from './components/HelloWorld.vue'
|
7
|
-
import {Text} from "nodality";
|
8
|
-
export default {
|
9
|
-
name: 'App',
|
10
|
-
components: {
|
11
|
-
HelloWorld
|
12
|
-
},
|
13
|
-
|
14
|
-
watch: {
|
15
|
-
// Watch for changes to welcomeMessage and recreate the instance
|
16
|
-
welcomeMessage() {
|
17
|
-
console.log(this.welcomeMessage) // THIS WORKS
|
18
|
-
this.textInstance = new Text(this.welcomeMessage).set({ size: "S1", color: "#1abc9c" });
|
19
|
-
},
|
20
|
-
},
|
21
|
-
data() {
|
22
|
-
return {
|
23
|
-
welcomeMessage: "Welcome to Your Vue.js App", // Define a reactive property
|
24
|
-
textInstance: null
|
25
|
-
}
|
26
|
-
},
|
27
|
-
created() {
|
28
|
-
// Initialize the Text instance when the component is created
|
29
|
-
this.textInstance = new Text(this.welcomeMessage).set({ size: "S1", color: "#1abc9c" });
|
30
|
-
},
|
31
|
-
}
|
32
|
-
</script>
|
33
|
-
|
34
|
-
<style>
|
35
|
-
#app {
|
36
|
-
font-family: Avenir, Helvetica, Arial, sans-serif;
|
37
|
-
-webkit-font-smoothing: antialiased;
|
38
|
-
-moz-osx-font-smoothing: grayscale;
|
39
|
-
text-align: center;
|
40
|
-
color: #2c3e50;
|
41
|
-
margin-top: 60px;
|
42
|
-
}
|
43
|
-
</style>
|
@@ -1,37 +0,0 @@
|
|
1
|
-
<script setup>
|
2
|
-
import { useTemplateRef, onMounted, defineProps, defineEmits, watch } from 'vue'
|
3
|
-
|
4
|
-
// Define props to accept the msg value
|
5
|
-
const props = defineProps({
|
6
|
-
msg: String,
|
7
|
-
text: Object
|
8
|
-
})
|
9
|
-
|
10
|
-
const emit = defineEmits(['update:msg'])
|
11
|
-
|
12
|
-
// the first argument must match the ref value in the template
|
13
|
-
const input = useTemplateRef('my-input')
|
14
|
-
let mycomp = useTemplateRef('my-comp')
|
15
|
-
|
16
|
-
onMounted(() => {
|
17
|
-
input.value.focus()
|
18
|
-
let ela = props.text.render();//document.createElement("h1");
|
19
|
-
mycomp.value.appendChild(ela);
|
20
|
-
})
|
21
|
-
|
22
|
-
watch(() => props.msg, () => { // 12:21:57 Wow!!!
|
23
|
-
|
24
|
-
mycomp.value.innerHTML = ""; // Clear existing content
|
25
|
-
const element = props.text.render(); // Call the render method
|
26
|
-
mycomp.value.appendChild(element);
|
27
|
-
})
|
28
|
-
|
29
|
-
function updateMessage(event) {
|
30
|
-
emit('update:msg', event.target.value)
|
31
|
-
}
|
32
|
-
</script>
|
33
|
-
|
34
|
-
<template>
|
35
|
-
<input ref="my-input" :value="msg" @input="updateMessage" />
|
36
|
-
<div ref="my-comp"/>
|
37
|
-
</template>
|
package/templates/src/main.js
DELETED