@nzz/q-cli 1.5.4 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.vscode/settings.json +5 -0
- package/README.md +16 -1
- package/bin/commands/bootstrap.js +6 -0
- package/dev-server/routes/rendering-info.js +0 -1
- package/dev-server/routes/tool-default.js +0 -2
- package/dev-server/server.js +3 -0
- package/package.json +1 -1
- package/skeletons/custom-code-skeleton/.nvmrc +1 -1
- package/skeletons/custom-code-skeleton/.vscode/settings.json +5 -0
- package/skeletons/custom-code-skeleton/README.md +17 -6
- package/skeletons/custom-code-skeleton/index.d.ts +3 -0
- package/skeletons/custom-code-skeleton/package-lock.json +5563 -791
- package/skeletons/custom-code-skeleton/package.json +22 -12
- package/skeletons/custom-code-skeleton/q.config.json +2 -2
- package/skeletons/custom-code-skeleton/rollup.config.js +116 -70
- package/skeletons/custom-code-skeleton/src/App.scss +5 -0
- package/skeletons/custom-code-skeleton/src/App.svelte +3 -7
- package/skeletons/custom-code-skeleton/src/interfaces.ts +0 -0
- package/skeletons/custom-code-skeleton/src/{main-prod.js → main-prod.ts} +1 -0
- package/skeletons/custom-code-skeleton/src/main.scss +1 -0
- package/skeletons/custom-code-skeleton/src/main.ts +18 -0
- package/skeletons/custom-code-skeleton/tsconfig.json +15 -0
- package/skeletons/server-skeleton/auth/routes.js +0 -9
- package/skeletons/server-skeleton/index.js +1 -3
- package/skeletons/tool-skeleton/.nvmrc +1 -1
- package/skeletons/tool-skeleton/.travis.yml +26 -0
- package/skeletons/tool-skeleton/.vscode/settings.json +5 -0
- package/skeletons/tool-skeleton/Dockerfile +1 -1
- package/skeletons/tool-skeleton/LICENSE +20 -0
- package/skeletons/tool-skeleton/README.md +1 -1
- package/skeletons/tool-skeleton/index.js +1 -6
- package/skeletons/tool-skeleton/package-lock.json +8540 -2741
- package/skeletons/tool-skeleton/package.json +24 -12
- package/skeletons/tool-skeleton/rollup.config.js +75 -0
- package/skeletons/tool-skeleton/routes/fixtures/data.js +1 -3
- package/skeletons/tool-skeleton/routes/rendering-info/web.js +43 -20
- package/skeletons/tool-skeleton/routes/routes.js +1 -1
- package/skeletons/tool-skeleton/routes/script.js +4 -5
- package/skeletons/tool-skeleton/routes/stylesheet.js +4 -5
- package/skeletons/tool-skeleton/sass.config.js +66 -0
- package/skeletons/tool-skeleton/scripts_src/default.js +3 -0
- package/skeletons/tool-skeleton/styles_src/_variables.scss +1 -0
- package/skeletons/tool-skeleton/styles_src/main.scss +2 -0
- package/skeletons/tool-skeleton/test/e2e-tests.js +4 -6
- package/skeletons/tool-skeleton/views/dynamic/YourTool.scss +5 -0
- package/skeletons/tool-skeleton/views/dynamic/YourTool.svelte +19 -0
- package/skeletons/tool-skeleton/views/static/App.scss +5 -0
- package/skeletons/tool-skeleton/views/static/App.svelte +21 -0
- package/skeletons/tool-skeleton/views/static/components/Footer.svelte +31 -0
- package/skeletons/tool-skeleton/views/static/components/Header.svelte +7 -0
- package/skeletons/custom-code-skeleton/src/main.js +0 -10
- package/skeletons/tool-skeleton/styles_src/default.scss +0 -4
- package/skeletons/tool-skeleton/tasks/build.js +0 -98
package/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Q cli [![Build Status](https://travis-ci.com/nzzdev/Q-cli.svg?branch=dev)](https://travis-ci.com/nzzdev/Q-cli)
|
2
2
|
|
3
|
-
**Maintainer**: [
|
3
|
+
**Maintainer**: [Nicolas Staub](https://github.com/fromdusttilldawn)
|
4
4
|
|
5
5
|
## Table of contents
|
6
6
|
|
@@ -26,6 +26,21 @@ nvm use
|
|
26
26
|
npm install
|
27
27
|
```
|
28
28
|
|
29
|
+
For testing local changes of Q-cli, one can link the local package to the global installation of Q-cli:
|
30
|
+
|
31
|
+
```bash
|
32
|
+
cd Q-cli
|
33
|
+
npm link
|
34
|
+
```
|
35
|
+
|
36
|
+
Q commands will now use the local Q-cli.
|
37
|
+
|
38
|
+
To unlink, simply install Q-cli again globally:
|
39
|
+
|
40
|
+
```bash
|
41
|
+
npm install @nzz/q-cli -g
|
42
|
+
```
|
43
|
+
|
29
44
|
[to the top](#table-of-contents)
|
30
45
|
|
31
46
|
## Functionality
|
@@ -4,6 +4,7 @@ const replaceInFile = require("replace-in-file");
|
|
4
4
|
const chalk = require("chalk");
|
5
5
|
const errorColor = chalk.red;
|
6
6
|
const successColor = chalk.green;
|
7
|
+
const warningColor = chalk.yellow;
|
7
8
|
|
8
9
|
module.exports = async function (type, name, basedir) {
|
9
10
|
if (fs.existsSync(basedir)) {
|
@@ -31,6 +32,11 @@ module.exports = async function (type, name, basedir) {
|
|
31
32
|
);
|
32
33
|
await replaceInFile(replaceOptions);
|
33
34
|
console.log(successColor(`Q ${type} is now bootstrapped in ${basedir}`));
|
35
|
+
|
36
|
+
if (type === "tool")
|
37
|
+
console.log(
|
38
|
+
warningColor("Search for 'TODO:' inside the new tool to get started!")
|
39
|
+
);
|
34
40
|
} catch (error) {
|
35
41
|
console.error(
|
36
42
|
errorColor(
|
@@ -52,7 +52,6 @@ module.exports = {
|
|
52
52
|
allowUnknown: true,
|
53
53
|
},
|
54
54
|
},
|
55
|
-
cors: true,
|
56
55
|
},
|
57
56
|
handler: async (request, h) => {
|
58
57
|
let payload = null;
|
@@ -89,7 +88,6 @@ module.exports = {
|
|
89
88
|
allowUnknown: true,
|
90
89
|
},
|
91
90
|
},
|
92
|
-
cors: true,
|
93
91
|
},
|
94
92
|
handler: async (request, h) => {
|
95
93
|
if (request.query.appendItemToPayload) {
|
package/dev-server/server.js
CHANGED
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
16
|
@@ -1,15 +1,26 @@
|
|
1
|
-
##
|
1
|
+
## Custom code boilerplate
|
2
2
|
|
3
|
-
Install the dependencies
|
3
|
+
Install the dependencies
|
4
4
|
|
5
5
|
```bash
|
6
6
|
npm install
|
7
7
|
```
|
8
8
|
|
9
|
-
|
9
|
+
#### Running it locally
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
Regular layout
|
12
|
+
```
|
13
|
+
npm start
|
14
|
+
```
|
15
|
+
|
16
|
+
Longform standard
|
17
|
+
```
|
18
|
+
npm run start-ls
|
19
|
+
```
|
20
|
+
|
21
|
+
Longform Visual
|
22
|
+
```
|
23
|
+
npm run start-lv
|
13
24
|
```
|
14
25
|
|
15
|
-
Navigate to [
|
26
|
+
Navigate to [http://0.0.0.0:5555](http://0.0.0.0:5555). You should see your app running. Edit a component file in `src`, save it and see the changes in the browser.
|