create-nodality-vue 1.0.0-beta.2 → 1.0.0-beta.3
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/package.json
CHANGED
@@ -1,44 +1,28 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-nodality-vue",
|
3
|
-
"version": "1.0.0-beta.
|
3
|
+
"version": "1.0.0-beta.3",
|
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
|
-
|
9
|
+
"files": [
|
10
|
+
"bin/",
|
11
|
+
"templates/"
|
12
|
+
],
|
13
|
+
"scripts": {},
|
12
14
|
"keywords": [
|
13
15
|
"nodality",
|
14
16
|
"vue",
|
15
17
|
"scaffolding",
|
16
|
-
"create"
|
17
|
-
"frontend"
|
18
|
+
"create"
|
18
19
|
],
|
19
20
|
"author": "Filip Vabrousek",
|
20
21
|
"license": "MIT",
|
21
22
|
"dependencies": {
|
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"
|
23
|
+
"fs-extra": "^11.1.0"
|
28
24
|
},
|
29
25
|
"engines": {
|
30
26
|
"node": ">=16.0.0"
|
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"
|
27
|
+
}
|
44
28
|
}
|
@@ -0,0 +1,12 @@
|
|
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>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<template>
|
2
|
+
<div id="app">
|
3
|
+
<HelloWorld :text="textInstance" v-model:msg="welcomeMessage" />
|
4
|
+
</div>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
import HelloWorld from "./components/HelloWorld.vue";
|
9
|
+
import { Text } from "nodality";
|
10
|
+
|
11
|
+
export default {
|
12
|
+
data() {
|
13
|
+
return {
|
14
|
+
welcomeMessage: "Welcome to Nodality + Vue.js",
|
15
|
+
textInstance: null,
|
16
|
+
};
|
17
|
+
},
|
18
|
+
created() {
|
19
|
+
this.textInstance = new Text(this.welcomeMessage).set({
|
20
|
+
size: "S1",
|
21
|
+
color: "#1abc9c",
|
22
|
+
});
|
23
|
+
},
|
24
|
+
};
|
25
|
+
</script>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<input v-model="message" @input="updateText" placeholder="Edit me" />
|
4
|
+
<div ref="renderedText" />
|
5
|
+
</div>
|
6
|
+
</template>
|
7
|
+
|
8
|
+
<script>
|
9
|
+
export default {
|
10
|
+
props: {
|
11
|
+
text: Object,
|
12
|
+
msg: String,
|
13
|
+
},
|
14
|
+
data() {
|
15
|
+
return {
|
16
|
+
message: this.msg || "",
|
17
|
+
};
|
18
|
+
},
|
19
|
+
watch: {
|
20
|
+
message(newValue) {
|
21
|
+
this.$emit("update:msg", newValue);
|
22
|
+
},
|
23
|
+
},
|
24
|
+
mounted() {
|
25
|
+
this.renderText();
|
26
|
+
},
|
27
|
+
updated() {
|
28
|
+
this.renderText();
|
29
|
+
},
|
30
|
+
methods: {
|
31
|
+
updateText(event) {
|
32
|
+
this.text.set({ text: event.target.value }).render(this.$refs.renderedText);
|
33
|
+
},
|
34
|
+
renderText() {
|
35
|
+
this.$refs.renderedText.innerHTML = "";
|
36
|
+
this.text.render(this.$refs.renderedText);
|
37
|
+
},
|
38
|
+
},
|
39
|
+
};
|
40
|
+
</script>
|