@plotdb/srcbuild 0.0.62 → 0.0.64

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
@@ -70,6 +70,7 @@ and the common options for `init` are as following:
70
70
  - `srcdir`: directory for source files. should be relative to `base`. default `src` if omitted.
71
71
  - `desdir`: directory for built files. should be relative to `base`. default `static` if omitted.
72
72
  - `logger`: logger for log output. use `console` if omitted.
73
+ - `initScan`: default true. if true, run a directory scanning for files to build when adapter is initing.
73
74
 
74
75
  check `src/ext/lsc.ls` or `src/ext/pug.ls` for example.
75
76
 
package/dist/adapter.js CHANGED
@@ -11,6 +11,7 @@ adapter = function(opt){
11
11
  this.opt = opt;
12
12
  this.base = opt.base || '.';
13
13
  this.log = opt.logger || aux.logger;
14
+ this.initScan = opt.initScan != null ? opt.initScan : true;
14
15
  this.ignored = (opt.watcher || (opt.watcher = {})).ignored || [];
15
16
  this.depends = {
16
17
  on: {},
@@ -168,6 +169,9 @@ adapter.prototype = import$(Object.create(Object.prototype), {
168
169
  },
169
170
  init: function(){
170
171
  var initBuilds, recurse, t1, this$ = this;
172
+ if (!this.initScan) {
173
+ return Promise.resolve();
174
+ }
171
175
  initBuilds = [];
172
176
  recurse = function(root){
173
177
  var len1, len2, files, i$, len$, file, stat, e, results$ = [];
package/dist/ext/base.js CHANGED
@@ -48,7 +48,8 @@ basebuild.prototype = import$(Object.create(Object.prototype), {
48
48
  },
49
49
  resolve: function(file){
50
50
  return this$.resolve(file);
51
- }
51
+ },
52
+ initScan: opt.initScan
52
53
  });
53
54
  return this.adapter.init();
54
55
  },
@@ -478,7 +478,7 @@ build.prototype = import$(Object.create(base.prototype), {
478
478
  var codesrc, specsrc, deps, ref$, ref1$;
479
479
  if (o.type === 'block') {
480
480
  return this$.mgr.bundle({
481
- blocks: o.codesrc || (o.codesrc = [])
481
+ blocks: (o.src || (o.src = [])).concat(o.codesrc || (o.codesrc = []))
482
482
  }).then(function(r){
483
483
  var deps, codesrc, specsrc, ref$, ref1$;
484
484
  if (!(r && r.deps)) {
package/dist/pug-cli CHANGED
@@ -8,7 +8,8 @@ yargs = require('yargs');
8
8
  pug = require('pug');
9
9
  pugbuild = require("./ext/pug");
10
10
  opt = {
11
- basedir: '.'
11
+ basedir: '.',
12
+ initScan: false
12
13
  };
13
14
  argv = yargs.option('base', {
14
15
  alias: 'b',
package/dist/pug-cli.js CHANGED
@@ -7,7 +7,8 @@ yargs = require('yargs');
7
7
  pug = require('pug');
8
8
  pugbuild = require("./ext/pug");
9
9
  opt = {
10
- basedir: '.'
10
+ basedir: '.',
11
+ initScan: false
11
12
  };
12
13
  argv = yargs.option('base', {
13
14
  alias: 'b',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "zbryikt",
3
3
  "name": "@plotdb/srcbuild",
4
- "version": "0.0.62",
4
+ "version": "0.0.64",
5
5
  "description": "",
6
6
  "main": "./dist/main.js",
7
7
  "files": [