@plotdb/srcbuild 0.0.35 → 0.0.39
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/CHANGELOG.md +204 -0
- package/dist/adapter.js +16 -4
- package/dist/aux.js +1 -1
- package/dist/ext/bundle.js +1 -1
- package/dist/ext/lsc.js +1 -1
- package/dist/ext/pug.js +2 -2
- package/dist/ext/stylus.js +1 -1
- package/dist/watch.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
## v0.0.39
|
|
4
|
+
|
|
5
|
+
- bug fix: pug build fails when pug file is empty
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## v0.0.38
|
|
9
|
+
|
|
10
|
+
- upgrade @loadingio/debounce.js
|
|
11
|
+
- tweak dependency range syntax
|
|
12
|
+
- audit and fix cached-path-relative vulnerability
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## v0.0.37
|
|
16
|
+
|
|
17
|
+
- bug fix: crash when iterating to a symlink pointing to a non-existed file.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## v0.0.36
|
|
21
|
+
|
|
22
|
+
- use `@plotdb/colors` to replace `colors`
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## v0.0.35
|
|
26
|
+
|
|
27
|
+
- upgrade marked for vulnerability fixing
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## v0.0.34
|
|
31
|
+
|
|
32
|
+
- support legacy syntax in libLoader for script loading
|
|
33
|
+
- fix bug: `libLoader.root` doesn't work properly
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## v0.0.33
|
|
37
|
+
|
|
38
|
+
- support relative path in bundle.json
|
|
39
|
+
- add test case for bundler
|
|
40
|
+
- use local script for testing
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## v0.0.32
|
|
44
|
+
|
|
45
|
+
- bug fix: `defer` in libLoader should be by default true.
|
|
46
|
+
- bug fix: stylus extension doesn't provide correct path for dependencies.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## v0.0.31
|
|
50
|
+
|
|
51
|
+
- bug fix: the `script` and `css` mixin supports should be done by `postParse` plugin instead of code modification.
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## v0.0.30
|
|
55
|
+
|
|
56
|
+
- directly support `script` and `css` mixin in pug compiling.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## v0.0.29
|
|
60
|
+
|
|
61
|
+
- bug fix: bundle not rebuild when bundle config file updated
|
|
62
|
+
- bug fix: bundler exception not caught
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## v0.0.28
|
|
66
|
+
|
|
67
|
+
- totally remove `compress` option to prevent unwanted side effect of code removal
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## v0.0.27
|
|
71
|
+
|
|
72
|
+
- dont compress unused in pug lsc filter for our potential use of custom script block design in @plotdb/block
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## v0.0.26
|
|
76
|
+
|
|
77
|
+
- remove log
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## v0.0.25
|
|
81
|
+
|
|
82
|
+
- pass `ignored` to adapter to bypass unnecessary files to save time
|
|
83
|
+
- by default minimize javascript and css in pug filter.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## v0.0.24
|
|
87
|
+
|
|
88
|
+
- set `doctype` to `html` also in `pug-cli` to prevent `t="t"` generation.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## v0.0.23
|
|
92
|
+
|
|
93
|
+
- set `doctype` to `html` to prevent `t="t"` generation.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## v0.0.22
|
|
97
|
+
|
|
98
|
+
- add `srcbuild-pug` command for building pug with extapi
|
|
99
|
+
- fix yaml loading issue by using `load` instead of `safe-load`.
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## v0.0.21
|
|
103
|
+
|
|
104
|
+
- fix module resolving path bug
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## v0.0.20
|
|
108
|
+
|
|
109
|
+
- resolve module path from basedir in ext/pug.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
## v0.0.19
|
|
113
|
+
|
|
114
|
+
- bump stylus version to 0.55.0 for removing deprecated dependencies
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## v0.0.18
|
|
118
|
+
|
|
119
|
+
- fix bug: lsc builder doesn't build unless glslify is enabled
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## v0.0.17
|
|
123
|
+
|
|
124
|
+
- support `json` API for reading json file in pug
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## v0.0.16
|
|
128
|
+
|
|
129
|
+
- fix bug: glslify transformed by browserify should have basedir from src file dir.
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
## v0.0.15
|
|
133
|
+
|
|
134
|
+
- upgrade `path-parse` to fix vulnerability
|
|
135
|
+
- support glslify transfomration by option `use-glslify`
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## v0.0.14
|
|
139
|
+
|
|
140
|
+
- add `i18n.intlbase` and `i18n.langauge` pug api and deprecate `intlbase` pug api.
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
## v0.0.13
|
|
144
|
+
|
|
145
|
+
- fix bug: incorrect parameter passing in view/pug to ext/pug
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## v0.0.12
|
|
149
|
+
|
|
150
|
+
- add bundling sample code
|
|
151
|
+
- fix bundling file path shown in log
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## v0.0.11
|
|
155
|
+
|
|
156
|
+
- fix bug: `desdir` and `base` not passed to pug in pug view constructor
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
## v0.0.10
|
|
160
|
+
|
|
161
|
+
- fix bug: basedir should be opt.basedir
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
## v0.0.9
|
|
165
|
+
|
|
166
|
+
- support pug view engine for express
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
## v0.0.8
|
|
170
|
+
|
|
171
|
+
- fix bug: trying to get mtime of a non-existed file.
|
|
172
|
+
- support options for files to ignore. by default, ignore `.git` folders.
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
## v0.0.7
|
|
176
|
+
|
|
177
|
+
- simplify log
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
## v0.0.6
|
|
181
|
+
|
|
182
|
+
- trap exception during `log-dependencies` and prevent from further building.
|
|
183
|
+
- keep old dependency if `log-dependencies` fails.
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
## v0.0.5
|
|
187
|
+
|
|
188
|
+
- support bundling
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
## v0.0.4
|
|
192
|
+
|
|
193
|
+
- fix bug in ext/pug: basedir doesn't exist when initing, causing problem when getting dependencies. use path.resolve(srcdir) instead.
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
## v0.0.3
|
|
197
|
+
|
|
198
|
+
- fix typo
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
## v0.0.2
|
|
202
|
+
|
|
203
|
+
- fix bug: let pug use correct filename and basedir parameter. resolve pug files correctly
|
|
204
|
+
|
package/dist/adapter.js
CHANGED
|
@@ -142,14 +142,20 @@ adapter.prototype = import$(Object.create(Object.prototype), {
|
|
|
142
142
|
var mtimes, recurse, this$ = this;
|
|
143
143
|
mtimes = {};
|
|
144
144
|
recurse = function(file){
|
|
145
|
-
var that;
|
|
145
|
+
var that, stat, e;
|
|
146
146
|
if (that = mtimes[file]) {
|
|
147
147
|
return that;
|
|
148
148
|
}
|
|
149
149
|
if (!fs.existsSync(file)) {
|
|
150
150
|
return 0;
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
try {
|
|
153
|
+
stat = fs.statSync(file);
|
|
154
|
+
} catch (e$) {
|
|
155
|
+
e = e$;
|
|
156
|
+
return 0;
|
|
157
|
+
}
|
|
158
|
+
return mtimes[file] = Math.max.apply(Math, [+stat.mtime].concat(Array.from(this$.depends.by[file] || []).map(function(f){
|
|
153
159
|
return recurse(f);
|
|
154
160
|
})));
|
|
155
161
|
};
|
|
@@ -164,7 +170,7 @@ adapter.prototype = import$(Object.create(Object.prototype), {
|
|
|
164
170
|
var initBuilds, recurse, t1, this$ = this;
|
|
165
171
|
initBuilds = [];
|
|
166
172
|
recurse = function(root){
|
|
167
|
-
var len1, len2, files, i$, len$, file, e, results$ = [];
|
|
173
|
+
var len1, len2, files, i$, len$, file, stat, e, results$ = [];
|
|
168
174
|
if (!fs.existsSync(root)) {
|
|
169
175
|
return;
|
|
170
176
|
}
|
|
@@ -179,7 +185,13 @@ adapter.prototype = import$(Object.create(Object.prototype), {
|
|
|
179
185
|
});
|
|
180
186
|
for (i$ = 0, len$ = files.length; i$ < len$; ++i$) {
|
|
181
187
|
file = files[i$];
|
|
182
|
-
|
|
188
|
+
try {
|
|
189
|
+
stat = fs.statSync(file);
|
|
190
|
+
} catch (e$) {
|
|
191
|
+
e = e$;
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
if (stat.isDirectory()) {
|
|
183
195
|
recurse(file);
|
|
184
196
|
}
|
|
185
197
|
if (!this$.isSupported(file)) {
|
package/dist/aux.js
CHANGED
package/dist/ext/bundle.js
CHANGED
|
@@ -5,7 +5,7 @@ path = require('path');
|
|
|
5
5
|
fsExtra = require('fs-extra');
|
|
6
6
|
uglifyJs = require('uglify-js');
|
|
7
7
|
uglifycss = require('uglifycss');
|
|
8
|
-
colors = require('colors');
|
|
8
|
+
colors = require('@plotdb/colors');
|
|
9
9
|
base = require('./base');
|
|
10
10
|
aux = require('../aux');
|
|
11
11
|
adapter = require('../adapter');
|
package/dist/ext/lsc.js
CHANGED
|
@@ -6,7 +6,7 @@ stream = require('stream');
|
|
|
6
6
|
fsExtra = require('fs-extra');
|
|
7
7
|
livescript = require('livescript');
|
|
8
8
|
uglifyJs = require('uglify-js');
|
|
9
|
-
colors = require('colors');
|
|
9
|
+
colors = require('@plotdb/colors');
|
|
10
10
|
base = require('./base');
|
|
11
11
|
aux = require('../aux');
|
|
12
12
|
adapter = require('../adapter');
|
package/dist/ext/pug.js
CHANGED
|
@@ -10,7 +10,7 @@ uglifycss = require('uglifycss');
|
|
|
10
10
|
stylus = require('stylus');
|
|
11
11
|
jsYaml = require('js-yaml');
|
|
12
12
|
marked = require('marked');
|
|
13
|
-
colors = require('colors');
|
|
13
|
+
colors = require('@plotdb/colors');
|
|
14
14
|
base = require('./base');
|
|
15
15
|
aux = require('../aux');
|
|
16
16
|
pugbuild = function(opt){
|
|
@@ -61,7 +61,7 @@ pugbuild.prototype = import$(Object.create(base.prototype), {
|
|
|
61
61
|
return this$.pugResolve.apply(this$, args);
|
|
62
62
|
},
|
|
63
63
|
postParse: function(dom, opt){
|
|
64
|
-
if (dom.nodes[0].type
|
|
64
|
+
if (!(dom.nodes[0] && dom.nodes[0].type === 'Doctype')) {
|
|
65
65
|
return dom;
|
|
66
66
|
}
|
|
67
67
|
dom.nodes.splice(1, 0, {
|
package/dist/ext/stylus.js
CHANGED
|
@@ -5,7 +5,7 @@ path = require('path');
|
|
|
5
5
|
fsExtra = require('fs-extra');
|
|
6
6
|
stylus = require('stylus');
|
|
7
7
|
uglifycss = require('uglifycss');
|
|
8
|
-
colors = require('colors');
|
|
8
|
+
colors = require('@plotdb/colors');
|
|
9
9
|
base = require('./base');
|
|
10
10
|
aux = require('../aux');
|
|
11
11
|
adapter = require('../adapter');
|
package/dist/watch.js
CHANGED
|
@@ -4,7 +4,7 @@ fs = require('fs');
|
|
|
4
4
|
path = require('path');
|
|
5
5
|
fsExtra = require('fs-extra');
|
|
6
6
|
chokidar = require('chokidar');
|
|
7
|
-
colors = require('colors');
|
|
7
|
+
colors = require('@plotdb/colors');
|
|
8
8
|
debounce = require('@loadingio/debounce.js');
|
|
9
9
|
aux = require('./aux');
|
|
10
10
|
watch = function(opt){
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "zbryikt",
|
|
3
3
|
"name": "@plotdb/srcbuild",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.39",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"files": [
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"npm": ">=6.4.1"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@loadingio/debounce.js": "
|
|
29
|
+
"@loadingio/debounce.js": "^1.0.1",
|
|
30
30
|
"anymatch": "^3.1.2",
|
|
31
31
|
"browserify": "^17.0.0",
|
|
32
32
|
"chokidar": "^3.5.1",
|
|
33
|
-
"colors": "^
|
|
33
|
+
"@plotdb/colors": "^0.0.1",
|
|
34
34
|
"fs-extra": "^9.1.0",
|
|
35
35
|
"glslify": "^7.1.1",
|
|
36
36
|
"i18next": "^19.9.2",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"require-reload": "^0.2.2",
|
|
44
44
|
"stylus": "^0.55.0",
|
|
45
45
|
"uglify-js": "^3.13.1",
|
|
46
|
-
"uglifycss": "0.0.29",
|
|
46
|
+
"uglifycss": "^0.0.29",
|
|
47
47
|
"yargs": "^17.2.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|