@plotdb/srcbuild 0.0.68 → 0.0.70

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/README.md CHANGED
@@ -83,7 +83,7 @@ Except common options, each builder may support different options:
83
83
  - `intlbase`: base dir to place i18n files. for example, `intl` part of `/intl/zh-TW/index.html`. default `intl`.
84
84
  - `i18n`: an optional i18n object having the same interface with `i18next`
85
85
  - when provided, enable i18n building with following additional features:
86
- - source files will be built to multiple locations based on i18n config, such as `/intl/zh-TW/index.html`.
86
+ - if `buildIntl` is set to true, build source files to locations by i18n config like `/intl/zh-TW/index.html`.
87
87
  - an additional function `i18n` will be available during pug compilation.
88
88
  - `i18n(text)`: translate `text` based on the `i18n` object provided.
89
89
  - `language()`: return current language. ( e.g., `zh-TW` )
@@ -92,7 +92,10 @@ Except common options, each builder may support different options:
92
92
  - additionally, a pug filter `i18n` is also available, which can be used like:
93
93
 
94
94
  span:i18n translate this text
95
+
95
96
  - `noView`: default false. when true, js view files ( generated to `viewdir` ) won't be built.
97
+ - `buildIntl`: default true. when true build locale-based files under `static/intl/` and `.view/intl`
98
+ - requires `i18n`; omitted if `i18n` is not available
96
99
  - `viewdir`: default `.view`. a directory for storing prebuilt pug files ( in .js format )
97
100
  - `bundler`: default null. Auto packing will be possible only if this is provided.
98
101
  - `locals`: additional local variables for pug context when compiling.
package/dist/ext/pug.js CHANGED
@@ -30,6 +30,7 @@ pugbuild = function(opt){
30
30
  }, opt));
31
31
  this.viewdir = path.normalize(path.join(this.base, opt.viewdir || '.view'));
32
32
  this._noView = opt.noView || false;
33
+ this._buildIntl = opt.buildIntl != null ? opt.buildIntl : true;
33
34
  return this;
34
35
  };
35
36
  pugbuild.prototype = import$(Object.create(base.prototype), {
@@ -381,7 +382,7 @@ pugbuild.prototype = import$(Object.create(base.prototype), {
381
382
  return results$;
382
383
  });
383
384
  };
384
- lngs = [''].concat(this.i18n
385
+ lngs = [''].concat(this.i18n && this._buildIntl
385
386
  ? ((ref$ = this.i18n).options || (ref$.options = {})).lng || []
386
387
  : []);
387
388
  consume = function(i){
@@ -423,7 +424,7 @@ pugbuild.prototype = import$(Object.create(base.prototype), {
423
424
  }
424
425
  });
425
426
  };
426
- lngs = [''].concat(this.i18n
427
+ lngs = [''].concat(this.i18n && this._buildIntl
427
428
  ? ((ref$ = this.i18n).options || (ref$.options = {})).lng || []
428
429
  : []);
429
430
  consume = function(i){
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "zbryikt",
3
3
  "name": "@plotdb/srcbuild",
4
- "version": "0.0.68",
4
+ "version": "0.0.70",
5
5
  "description": "",
6
6
  "main": "./dist/main.js",
7
7
  "files": [
@@ -27,15 +27,15 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@loadingio/debounce.js": "^1.0.1",
30
- "@plotdb/block": "^5.0.2",
31
- "@plotdb/colors": "^0.0.1",
30
+ "@plotdb/block": "^5.7.2",
31
+ "@plotdb/colors": "^0.0.3",
32
32
  "anymatch": "^3.1.2",
33
33
  "browserify": "^17.0.0",
34
34
  "chokidar": "^3.5.1",
35
35
  "fs-extra": "^9.1.0",
36
36
  "glslify": "^7.1.1",
37
37
  "i18next": "^19.9.2",
38
- "i18next-fs-backend": "^1.1.0",
38
+ "i18next-fs-backend": "^2.6.6",
39
39
  "i18next-http-middleware": "^3.1.0",
40
40
  "js-yaml": "^4.0.0",
41
41
  "livescript": "^1.6.0",
@@ -48,19 +48,19 @@
48
48
  "yargs": "^17.2.1"
49
49
  },
50
50
  "devDependencies": {
51
- "@loadingio/bootstrap.ext": "^0.0.9",
52
- "@plotdb/csscope": "^5.0.1",
53
- "@plotdb/rescope": "^5.0.1",
51
+ "@loadingio/bootstrap.ext": "^0.0.12",
52
+ "@plotdb/csscope": "^5.0.4",
53
+ "@plotdb/rescope": "^5.0.17",
54
54
  "@plotdb/semver": "^0.0.3",
55
- "@loadingio/ldquery": "^3.0.4",
55
+ "@loadingio/ldquery": "^3.0.6",
56
56
  "bootstrap": "^4.6.1",
57
57
  "express": "^4.18.2",
58
- "fedep": "^1.1.7",
58
+ "fedep": "^1.6.0",
59
59
  "jsdom": "^20.0.3",
60
- "ldcolor": "^1.0.0",
61
- "ldcover": "^3.2.1",
62
- "ldloader": "^3.0.1",
63
- "ldview": "^1.3.0",
60
+ "ldcolor": "^1.1.3",
61
+ "ldcover": "^3.5.6",
62
+ "ldloader": "^3.0.3",
63
+ "ldview": "^1.7.2",
64
64
  "proxise": "^1.0.1",
65
65
  "shaderlib": "github:zbryikt/shaderlib"
66
66
  },