create-nohejs 1.0.0 → 1.0.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/lib/gitignore.d.ts +2 -0
- package/lib/gitignore.js +133 -0
- package/lib/index.js +7 -1
- package/lib/template/app/client/Main.lua +1 -0
- package/lib/template/app/fxmanifest.js +9 -0
- package/lib/template/app/server/Main.lua +1 -0
- package/lib/template/nohe.config.js +3 -3
- package/lib/template/package.json +6 -4
- package/lib/template/public/favicon.ico +0 -0
- package/lib/template/public/index.html +12 -9
- package/lib/template/store/Main.js +4 -3
- package/lib/template/view/App.vue +96 -23
- package/lib/template/view/assets/vue.svg +1 -0
- package/lib/template/view/components/HelloWorld.vue +32 -0
- package/lib/template/view/main.js +3 -3
- package/package.json +1 -1
- package/lib/template/module/core.js +0 -11
- package/lib/template/module/fxmanifest.js +0 -13
- package/lib/template/nohe.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n.pnpm-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Snowpack dependency directory (https://snowpack.dev/)\nweb_modules/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional stylelint cache\n.stylelintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variable files\n.env\n.env.development.local\n.env.test.local\n.env.production.local\n.env.local\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n.parcel-cache\n\n# Next.js build output\n.next\nout\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n# Comment in the public line in if your project uses Gatsby and not Next.js\n# https://nextjs.org/blog/next-9-1#public-directory-support\n# public\n\n# vuepress build output\n.vuepress/dist\n\n# vuepress v2.x temp and cache directory\n.temp\n.cache\n\n# Docusaurus cache and generated files\n.docusaurus\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\n# Stores VSCode versions used for testing VSCode extensions\n.vscode-test\n\n# yarn v2\n.yarn/cache\n.yarn/unplugged\n.yarn/build-state.yml\n.yarn/install-state.gz\n.pnp.*\nbuild/\npackage-lock.json\nnohe.config.js";
|
|
2
|
+
export default _default;
|
package/lib/gitignore.js
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
export default `# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
lerna-debug.log*
|
|
8
|
+
.pnpm-debug.log*
|
|
9
|
+
|
|
10
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
11
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
12
|
+
|
|
13
|
+
# Runtime data
|
|
14
|
+
pids
|
|
15
|
+
*.pid
|
|
16
|
+
*.seed
|
|
17
|
+
*.pid.lock
|
|
18
|
+
|
|
19
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
20
|
+
lib-cov
|
|
21
|
+
|
|
22
|
+
# Coverage directory used by tools like istanbul
|
|
23
|
+
coverage
|
|
24
|
+
*.lcov
|
|
25
|
+
|
|
26
|
+
# nyc test coverage
|
|
27
|
+
.nyc_output
|
|
28
|
+
|
|
29
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
30
|
+
.grunt
|
|
31
|
+
|
|
32
|
+
# Bower dependency directory (https://bower.io/)
|
|
33
|
+
bower_components
|
|
34
|
+
|
|
35
|
+
# node-waf configuration
|
|
36
|
+
.lock-wscript
|
|
37
|
+
|
|
38
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
39
|
+
build/Release
|
|
40
|
+
|
|
41
|
+
# Dependency directories
|
|
42
|
+
node_modules/
|
|
43
|
+
jspm_packages/
|
|
44
|
+
|
|
45
|
+
# Snowpack dependency directory (https://snowpack.dev/)
|
|
46
|
+
web_modules/
|
|
47
|
+
|
|
48
|
+
# TypeScript cache
|
|
49
|
+
*.tsbuildinfo
|
|
50
|
+
|
|
51
|
+
# Optional npm cache directory
|
|
52
|
+
.npm
|
|
53
|
+
|
|
54
|
+
# Optional eslint cache
|
|
55
|
+
.eslintcache
|
|
56
|
+
|
|
57
|
+
# Optional stylelint cache
|
|
58
|
+
.stylelintcache
|
|
59
|
+
|
|
60
|
+
# Microbundle cache
|
|
61
|
+
.rpt2_cache/
|
|
62
|
+
.rts2_cache_cjs/
|
|
63
|
+
.rts2_cache_es/
|
|
64
|
+
.rts2_cache_umd/
|
|
65
|
+
|
|
66
|
+
# Optional REPL history
|
|
67
|
+
.node_repl_history
|
|
68
|
+
|
|
69
|
+
# Output of 'npm pack'
|
|
70
|
+
*.tgz
|
|
71
|
+
|
|
72
|
+
# Yarn Integrity file
|
|
73
|
+
.yarn-integrity
|
|
74
|
+
|
|
75
|
+
# dotenv environment variable files
|
|
76
|
+
.env
|
|
77
|
+
.env.development.local
|
|
78
|
+
.env.test.local
|
|
79
|
+
.env.production.local
|
|
80
|
+
.env.local
|
|
81
|
+
|
|
82
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
83
|
+
.cache
|
|
84
|
+
.parcel-cache
|
|
85
|
+
|
|
86
|
+
# Next.js build output
|
|
87
|
+
.next
|
|
88
|
+
out
|
|
89
|
+
|
|
90
|
+
# Nuxt.js build / generate output
|
|
91
|
+
.nuxt
|
|
92
|
+
dist
|
|
93
|
+
|
|
94
|
+
# Gatsby files
|
|
95
|
+
.cache/
|
|
96
|
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
97
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
98
|
+
# public
|
|
99
|
+
|
|
100
|
+
# vuepress build output
|
|
101
|
+
.vuepress/dist
|
|
102
|
+
|
|
103
|
+
# vuepress v2.x temp and cache directory
|
|
104
|
+
.temp
|
|
105
|
+
.cache
|
|
106
|
+
|
|
107
|
+
# Docusaurus cache and generated files
|
|
108
|
+
.docusaurus
|
|
109
|
+
|
|
110
|
+
# Serverless directories
|
|
111
|
+
.serverless/
|
|
112
|
+
|
|
113
|
+
# FuseBox cache
|
|
114
|
+
.fusebox/
|
|
115
|
+
|
|
116
|
+
# DynamoDB Local files
|
|
117
|
+
.dynamodb/
|
|
118
|
+
|
|
119
|
+
# TernJS port file
|
|
120
|
+
.tern-port
|
|
121
|
+
|
|
122
|
+
# Stores VSCode versions used for testing VSCode extensions
|
|
123
|
+
.vscode-test
|
|
124
|
+
|
|
125
|
+
# yarn v2
|
|
126
|
+
.yarn/cache
|
|
127
|
+
.yarn/unplugged
|
|
128
|
+
.yarn/build-state.yml
|
|
129
|
+
.yarn/install-state.gz
|
|
130
|
+
.pnp.*
|
|
131
|
+
build/
|
|
132
|
+
package-lock.json
|
|
133
|
+
nohe.config.js`;
|
package/lib/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import path from 'path';
|
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
import { info } from './chat/index.js';
|
|
7
7
|
import { execa } from 'execa';
|
|
8
|
+
import gitignore from './gitignore.js';
|
|
8
9
|
var root;
|
|
9
10
|
var data = {};
|
|
10
11
|
const Init = async () => {
|
|
@@ -26,8 +27,13 @@ const Init = async () => {
|
|
|
26
27
|
const a = path.dirname(paths);
|
|
27
28
|
const ruta = path.join(a, '.');
|
|
28
29
|
await Folder(ruta + '/template', root);
|
|
30
|
+
var render = ejs.render(gitignore, {});
|
|
31
|
+
fs.writeFile(root + '/.gitignore', render, err => {
|
|
32
|
+
if (err)
|
|
33
|
+
throw err;
|
|
34
|
+
});
|
|
29
35
|
try {
|
|
30
|
-
await execa({ shell: true, stdio: 'inherit' }) `cd ${args[0]} && npm install nohejs`;
|
|
36
|
+
await execa({ shell: true, stdio: 'inherit' }) `cd ${args[0]} && npm install nohejs nohecli`;
|
|
31
37
|
info(`[ {{cyan}}info{{end}} ] Completed Installation`);
|
|
32
38
|
info(`[ {{cyan}}info{{end}} ] cd ${args[0]} and npm run dev`);
|
|
33
39
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
print('NoheJS Client-side')
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
print('NoheJS Server-side')
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
"name": "<%= name %>",
|
|
3
3
|
"version": "1.0.0",
|
|
4
4
|
"description": "",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
-
"
|
|
7
|
+
"dev": "nohe start",
|
|
8
|
+
"build": "nohe build",
|
|
9
|
+
"clean": "nohe clean"
|
|
8
10
|
},
|
|
9
|
-
"author": "
|
|
10
|
-
"license": "
|
|
11
|
+
"author": "",
|
|
12
|
+
"license": "ISC"
|
|
11
13
|
}
|
|
Binary file
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
|
|
8
|
+
<title>NoheJS + Vue3</title>
|
|
9
|
+
</head>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
<div id="app"></div>
|
|
13
|
+
<script src="@/main.js"></script>
|
|
14
|
+
</body>
|
|
12
15
|
</html>
|
|
@@ -1,37 +1,110 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<a href="https://vuejs.org/" target="_blank">
|
|
4
|
+
<img src="@/assets/vue.svg" class="logo vue" alt="Vue logo" />
|
|
5
|
+
</a>
|
|
6
|
+
</div>
|
|
7
|
+
<HelloWorld :msg="Main.msg" />
|
|
3
8
|
</template>
|
|
4
9
|
|
|
5
10
|
<script setup>
|
|
11
|
+
import Main from 'Store/Main'
|
|
12
|
+
import HelloWorld from './components/HelloWorld.vue'
|
|
6
13
|
</script>
|
|
7
14
|
|
|
8
15
|
<style>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
:root {
|
|
17
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
18
|
+
line-height: 1.5;
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
|
|
21
|
+
color-scheme: light dark;
|
|
22
|
+
color: rgba(255, 255, 255, 0.87);
|
|
23
|
+
background-color: #242424;
|
|
24
|
+
|
|
25
|
+
font-synthesis: none;
|
|
26
|
+
text-rendering: optimizeLegibility;
|
|
27
|
+
-webkit-font-smoothing: antialiased;
|
|
28
|
+
-moz-osx-font-smoothing: grayscale;
|
|
29
|
+
-webkit-text-size-adjust: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
a {
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
color: #9F1A8F;
|
|
35
|
+
text-decoration: inherit;
|
|
36
|
+
}
|
|
37
|
+
a:hover {
|
|
38
|
+
color: #535bf2;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
body {
|
|
42
|
+
margin: 0;
|
|
43
|
+
display: flex;
|
|
44
|
+
place-items: center;
|
|
45
|
+
min-width: 320px;
|
|
46
|
+
min-height: 100vh;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
h1 {
|
|
50
|
+
font-size: 3.2em;
|
|
51
|
+
line-height: 1.1;
|
|
18
52
|
}
|
|
19
53
|
|
|
20
|
-
|
|
21
|
-
|
|
54
|
+
button {
|
|
55
|
+
border-radius: 8px;
|
|
56
|
+
border: 1px solid transparent;
|
|
57
|
+
padding: 0.6em 1.2em;
|
|
58
|
+
font-size: 1em;
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
font-family: inherit;
|
|
61
|
+
background-color: #1a1a1a;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
transition: border-color 0.25s;
|
|
64
|
+
}
|
|
65
|
+
button:hover {
|
|
66
|
+
border-color: #9F1A8F;
|
|
67
|
+
}
|
|
68
|
+
button:focus,
|
|
69
|
+
button:focus-visible {
|
|
70
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
22
71
|
}
|
|
23
72
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
textarea,
|
|
27
|
-
select {
|
|
28
|
-
font: inherit;
|
|
73
|
+
.card {
|
|
74
|
+
padding: 2em;
|
|
29
75
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
76
|
+
|
|
77
|
+
#app {
|
|
78
|
+
max-width: 1280px;
|
|
79
|
+
margin: 0 auto;
|
|
80
|
+
padding: 2rem;
|
|
81
|
+
text-align: center;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media (prefers-color-scheme: light) {
|
|
85
|
+
:root {
|
|
86
|
+
color: #213547;
|
|
87
|
+
background-color: #ffffff;
|
|
88
|
+
}
|
|
89
|
+
a:hover {
|
|
90
|
+
color: #9F1A8F;
|
|
91
|
+
}
|
|
92
|
+
button {
|
|
93
|
+
background-color: #f9f9f9;
|
|
94
|
+
}
|
|
33
95
|
}
|
|
34
|
-
|
|
35
|
-
|
|
96
|
+
.logo {
|
|
97
|
+
height: 6em;
|
|
98
|
+
padding: 1.5em;
|
|
99
|
+
will-change: filter;
|
|
100
|
+
transition: filter 300ms;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.logo:hover {
|
|
104
|
+
filter: drop-shadow(0 0 2em #9F1A8Faa);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.logo.vue:hover {
|
|
108
|
+
filter: drop-shadow(0 0 2em #42b883aa);
|
|
36
109
|
}
|
|
37
|
-
</style>
|
|
110
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<h1>{{ props.msg }}</h1>
|
|
3
|
+
|
|
4
|
+
<div class="card">
|
|
5
|
+
<button type="button" @click="Main.count++">count is {{ Main.count }}</button>
|
|
6
|
+
<p>
|
|
7
|
+
Edit
|
|
8
|
+
<code>components/HelloWorld.vue</code> to test HMR
|
|
9
|
+
</p>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<p>
|
|
13
|
+
Install
|
|
14
|
+
<a href="https://github.com/vuejs/language-tools" target="_blank">Volar</a>
|
|
15
|
+
in your IDE for a better DX
|
|
16
|
+
</p>
|
|
17
|
+
<p class="read-the-docs">Click on the Farm and Vue logos to learn more</p>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup>
|
|
21
|
+
import { ref } from 'vue'
|
|
22
|
+
import Main from 'Store/Main'
|
|
23
|
+
|
|
24
|
+
const props = defineProps(['msg'])
|
|
25
|
+
const count = ref(0)
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style scoped>
|
|
29
|
+
.read-the-docs {
|
|
30
|
+
color: #888;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createApp } from 'vue'
|
|
2
|
-
import App from
|
|
1
|
+
import { createApp } from 'vue';
|
|
2
|
+
import App from './App.vue';
|
|
3
3
|
|
|
4
|
-
createApp(App).mount('#app')
|
|
4
|
+
createApp(App).mount('#app');
|
package/package.json
CHANGED
package/lib/template/nohe.js
DELETED