@zbryikt/template 2.3.21 → 2.3.22
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +21 -17
- package/bin/cli.js +3 -4
- package/package.json +2 -2
package/README.md
CHANGED
@@ -27,30 +27,30 @@ you can also add following in your own package.json:
|
|
27
27
|
},
|
28
28
|
|
29
29
|
|
30
|
-
optional
|
30
|
+
optional server config json file specified via `-c` option for altering default port and other config:
|
31
|
+
|
32
|
+
{ "port": 3012 }
|
31
33
|
|
32
|
-
{
|
33
|
-
"port": 3012
|
34
|
-
}
|
35
34
|
|
36
35
|
Port will be randomized unused port if not specified. For more about options, see the Options section below.
|
37
36
|
|
38
37
|
|
39
38
|
## Start Kit
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
`sample` folder serves as a starting point to bootstrap a project. It contains following files:
|
41
|
+
|
42
|
+
- `package.json`: a simple package.json with necessary dependencies. You need to update repo info in this.
|
43
|
+
- `LICENSE`: default MIT.
|
44
|
+
- `config.json`: config file used by template.
|
45
|
+
- `deploy`: if you use gh-pages of github, this automatically push your static/ directory to gh-pages branch.
|
46
46
|
you need to have a gh-pages branch at first.
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
47
|
+
- `README.md`: a dummy readme. edit it as necessary.
|
48
|
+
- `src/`: template style source code folder. check `@plotdb/srcbuild` for more information.
|
49
|
+
- `src/ls/`: LiveScript code, built to static/js/
|
50
|
+
- `src/pug/`: Pug code, built to static/
|
51
|
+
- `src/styl/`: Stylus code, built to static/css/
|
52
|
+
- `static/`: generated files or other assets.
|
53
|
+
- `locales/`: i18n translation files based on `i18next`.
|
54
54
|
|
55
55
|
|
56
56
|
## Custom API
|
@@ -88,12 +88,16 @@ server.init accepts config with following options:
|
|
88
88
|
- `defaultNS` - default namespace. default `default`
|
89
89
|
- `fallbackNS` - fallback namespace when failed to match with desired namespace. default `default`.
|
90
90
|
|
91
|
+
for using `@zbryikt/template` as a command line tool, config file specified by `-c` option also support following options:
|
92
|
+
|
93
|
+
- `lsp`: an object passed to `srcbuild.lsp` as options. check `@plotdb/srcbuild` for more information.
|
91
94
|
|
92
95
|
watch.init accepts config with following options:
|
93
96
|
|
94
97
|
- `watcher`
|
95
98
|
- `ignores`: files to ignored ( not watched ). array of regular expression against file names.
|
96
|
-
- `assets`: array of node module names to be copied to `static/assets` folder.
|
99
|
+
- `assets`: (deprecated) array of node module names to be copied to `static/assets` folder.
|
100
|
+
- replaced by `fedep`. will be removed in future release
|
97
101
|
|
98
102
|
|
99
103
|
## Additional information
|
package/bin/cli.js
CHANGED
@@ -53,13 +53,12 @@ main = {
|
|
53
53
|
return server.init(this.opt).then(function(){
|
54
54
|
return srcbuild.i18n(this$.opt.i18n);
|
55
55
|
}).then(function(i18n){
|
56
|
-
|
57
|
-
|
58
|
-
i18n: i18n,
|
56
|
+
var ref$;
|
57
|
+
return srcbuild.lsp((ref$ = import$({
|
59
58
|
bundle: {
|
60
59
|
configFile: 'bundle.json'
|
61
60
|
}
|
62
|
-
});
|
61
|
+
}, this$.opt.lsp || {}), ref$.base = '.', ref$.i18n = i18n, ref$));
|
63
62
|
});
|
64
63
|
}
|
65
64
|
};
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "bin/lib/index.js",
|
6
6
|
"description": "simple, quick template for bootstrap a page",
|
7
|
-
"version": "2.3.
|
7
|
+
"version": "2.3.22",
|
8
8
|
"files": [
|
9
9
|
"bin/**/*"
|
10
10
|
],
|
@@ -22,7 +22,7 @@
|
|
22
22
|
},
|
23
23
|
"dependencies": {
|
24
24
|
"@loadingio/debounce.js": "0.0.1",
|
25
|
-
"@plotdb/srcbuild": "^0.0.
|
25
|
+
"@plotdb/srcbuild": "^0.0.24",
|
26
26
|
"chokidar": "^3.0.0",
|
27
27
|
"colors": "^1.3.3",
|
28
28
|
"express": "^4.16.4",
|