@plotdb/srcbuild 0.0.47 → 0.0.48

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.
Files changed (2) hide show
  1. package/dist/ext/pug.js +17 -6
  2. 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
- return {
204
- src: file,
205
- desh: file.replace(this.srcdir, path.join(this.desdir, intl)).replace(/.pug$/, '.html'),
206
- desv: file.replace(this.srcdir, path.join(this.viewdir, intl)).replace(/.pug/, '.js')
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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "zbryikt",
3
3
  "name": "@plotdb/srcbuild",
4
- "version": "0.0.47",
4
+ "version": "0.0.48",
5
5
  "description": "",
6
6
  "main": "./dist/main.js",
7
7
  "files": [