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.
@@ -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;
@@ -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,9 @@
1
+ import { defineManifest } from 'nohejs'
2
+
3
+ export default defineManifest({
4
+ "client": [],
5
+ "server": [],
6
+ "shared": [],
7
+ "dependencies": [],
8
+ "lua54": true
9
+ })
@@ -0,0 +1 @@
1
+ print('NoheJS Server-side')
@@ -1,5 +1,5 @@
1
- const { defineConfig } = require('nohejs')
1
+ import { defineConfig } from 'nohejs'
2
2
 
3
- module.exports = defineConfig({
4
- outputDir: './build'
3
+ export default defineConfig({
4
+ "outputDir": './build'
5
5
  })
@@ -2,10 +2,12 @@
2
2
  "name": "<%= name %>",
3
3
  "version": "1.0.0",
4
4
  "description": "",
5
+ "type": "module",
5
6
  "scripts": {
6
- "build": "node nohe build",
7
- "dev": "node nohe server"
7
+ "dev": "nohe start",
8
+ "build": "nohe build",
9
+ "clean": "nohe clean"
8
10
  },
9
- "author": "CQDEV",
10
- "license": "MIT"
11
+ "author": "",
12
+ "license": "ISC"
11
13
  }
Binary file
@@ -1,12 +1,15 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
- <title><%= htmlWebpackPlugin.options.title %></title>
8
- </head>
9
- <body>
10
- <div id="app"></div>
11
- </body>
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,5 +1,6 @@
1
- const { Store } = require('@cq9dev/nohecli')
1
+ import { Store } from 'nohecli'
2
2
 
3
- module.exports = Store('Main', {
4
- "item": "New Storage"
3
+ export default Store('Main', {
4
+ "msg": "NoheJS + Vue",
5
+ "count": 0
5
6
  })
@@ -1,37 +1,110 @@
1
1
  <template>
2
- <div>NOHE TEMPLATE</div>
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
- *::before,
11
- *::after {
12
- box-sizing: border-box;
13
- -webkit-user-drag: none;
14
- user-select: none;
15
- -moz-user-select: none;
16
- -webkit-user-select: none;
17
- -ms-user-select: none;
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
- html {
21
- line-height: 1;
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
- input,
25
- button,
26
- textarea,
27
- select {
28
- font: inherit;
73
+ .card {
74
+ padding: 2em;
29
75
  }
30
- body{
31
- overflow: hidden;
32
- font-family: "Poppins", sans-serif;
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
- img {
35
- max-width: 100%;
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 "./App.vue"
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nohejs",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -1,11 +0,0 @@
1
- const { defineModule } = require('nohejs')
2
-
3
- module.exports = defineModule({
4
- client: [
5
- 'Main'
6
- ],
7
-
8
- server: [
9
- 'Main'
10
- ]
11
- })
@@ -1,13 +0,0 @@
1
- const { defineManifest } = require('nohejs')
2
-
3
- module.exports = defineManifest({
4
- fx_version: 'cerulean',
5
- games: [ "gta5" ],
6
- shared: [],
7
- client: [],
8
- server: [],
9
- exports: [],
10
- dependencies: [],
11
- escrow_ignore: [],
12
- lua54: "yes"
13
- })
@@ -1,2 +0,0 @@
1
- const { Nohe } = require('nohejs')
2
- Nohe()