@plotdb/srcbuild 0.0.47 → 0.0.49
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/dist/ext/pug.js +17 -6
- package/dist/main.js +21 -14
- package/package.json +1 -1
package/dist/ext/pug.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by LiveScript 1.6.0
|
|
2
|
-
var fs, path, fsExtra, pug, livescript, uglifyJs, uglifycss, stylus, jsYaml, marked, colors, base, aux, pugbuild;
|
|
2
|
+
var fs, path, fsExtra, pug, livescript, uglifyJs, uglifycss, stylus, jsYaml, marked, colors, base, aux, cwd, pugbuild;
|
|
3
3
|
fs = require('fs');
|
|
4
4
|
path = require('path');
|
|
5
5
|
fsExtra = require('fs-extra');
|
|
@@ -13,6 +13,7 @@ marked = require('marked');
|
|
|
13
13
|
colors = require('@plotdb/colors');
|
|
14
14
|
base = require('./base');
|
|
15
15
|
aux = require('../aux');
|
|
16
|
+
cwd = process.cwd();
|
|
16
17
|
pugbuild = function(opt){
|
|
17
18
|
opt == null && (opt = {});
|
|
18
19
|
this.i18n = opt.i18n || null;
|
|
@@ -200,11 +201,21 @@ pugbuild.prototype = import$(Object.create(base.prototype), {
|
|
|
200
201
|
return null;
|
|
201
202
|
},
|
|
202
203
|
map: function(file, intl){
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
204
|
+
var alt;
|
|
205
|
+
if (~file.indexOf(this.srcdir)) {
|
|
206
|
+
return {
|
|
207
|
+
src: file,
|
|
208
|
+
desh: file.replace(this.srcdir, path.join(this.desdir, intl)).replace(/.pug$/, '.html'),
|
|
209
|
+
desv: file.replace(this.srcdir, path.join(this.viewdir, intl)).replace(/.pug/, '.js')
|
|
210
|
+
};
|
|
211
|
+
} else {
|
|
212
|
+
alt = path.resolve(path.join('/', path.relative('.', file)));
|
|
213
|
+
return {
|
|
214
|
+
src: file,
|
|
215
|
+
desh: path.join(cwd, this.desdir, '.@root', intl, alt).replace(/.pug$/, '.html'),
|
|
216
|
+
desv: path.join(cwd, this.viewdir, '.@root', intl, alt).replace(/.pug$/, '.js')
|
|
217
|
+
};
|
|
218
|
+
}
|
|
208
219
|
},
|
|
209
220
|
build: function(files){
|
|
210
221
|
var _, lngs, ref$, consume, this$ = this;
|
package/dist/main.js
CHANGED
|
@@ -12,25 +12,32 @@ module.exports = {
|
|
|
12
12
|
base: base,
|
|
13
13
|
i18n: i18n,
|
|
14
14
|
lsp: function(opt){
|
|
15
|
-
var base, adapters, ref$, watcher;
|
|
15
|
+
var base, i$, len$, b, adapters, ref$, watcher;
|
|
16
16
|
opt == null && (opt = {});
|
|
17
17
|
base = opt.base || 'web';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
base = Array.isArray(base)
|
|
19
|
+
? base
|
|
20
|
+
: [base];
|
|
21
|
+
for (i$ = 0, len$ = base.length; i$ < len$; ++i$) {
|
|
22
|
+
b = base[i$];
|
|
23
|
+
adapters = [
|
|
24
|
+
new lsc(import$((ref$ = {
|
|
25
|
+
base: b
|
|
26
|
+
}, ref$.logger = opt.logger, ref$.i18n = opt.i18n, ref$.ignored = opt.ignored, ref$), opt.lsc || {})), new stylus(import$((ref$ = {
|
|
27
|
+
base: b
|
|
28
|
+
}, ref$.logger = opt.logger, ref$.i18n = opt.i18n, ref$.ignored = opt.ignored, ref$), opt.stylus || {})), new pug(import$((ref$ = {
|
|
29
|
+
base: b
|
|
30
|
+
}, ref$.logger = opt.logger, ref$.i18n = opt.i18n, ref$.ignored = opt.ignored, ref$), opt.pug || {})), new bundle(import$((ref$ = {
|
|
31
|
+
base: b
|
|
32
|
+
}, ref$.logger = opt.logger, ref$.i18n = opt.i18n, ref$.ignored = opt.ignored, ref$), opt.bundle || {}))
|
|
33
|
+
].map(fn$);
|
|
34
|
+
}
|
|
31
35
|
return watcher = new watch((ref$ = {
|
|
32
36
|
adapters: adapters
|
|
33
37
|
}, ref$.logger = opt.logger, ref$.i18n = opt.i18n, ref$.ignored = opt.ignored, ref$));
|
|
38
|
+
function fn$(it){
|
|
39
|
+
return it.getAdapter();
|
|
40
|
+
}
|
|
34
41
|
}
|
|
35
42
|
};
|
|
36
43
|
function import$(obj, src){
|