wirejs-scripts 3.0.2 → 3.0.3
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/bin.js +7 -1
- package/configs/webpack.config.js +0 -4
- package/package.json +1 -1
package/bin.js
CHANGED
|
@@ -12,6 +12,7 @@ import { rimraf } from 'rimraf';
|
|
|
12
12
|
import { JSDOM } from 'jsdom';
|
|
13
13
|
import { useJSDOM } from 'wirejs-dom/v2';
|
|
14
14
|
import { requiresContext, Context, CookieJar } from 'wirejs-resources';
|
|
15
|
+
import { prebuildApi } from 'wirejs-resources/internal';
|
|
15
16
|
|
|
16
17
|
const CWD = process.cwd();
|
|
17
18
|
const webpackConfig = webpackConfigure(process.env, process.argv);
|
|
@@ -440,8 +441,13 @@ const engine = {
|
|
|
440
441
|
// explicit exit forces lingering child processes to die.
|
|
441
442
|
logger.log('stopping')
|
|
442
443
|
process.exit();
|
|
443
|
-
}
|
|
444
|
+
},
|
|
444
445
|
|
|
446
|
+
async ['prebuild-api']() {
|
|
447
|
+
logger.log("prebuilding api...");
|
|
448
|
+
await prebuildApi();
|
|
449
|
+
logger.log("api prebuild finished");
|
|
450
|
+
},
|
|
445
451
|
};
|
|
446
452
|
|
|
447
453
|
if (typeof engine[action] === 'function') {
|
|
@@ -23,10 +23,6 @@ marked.setOptions({
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
const BUILD_ID = (new Date()).getTime();
|
|
27
|
-
|
|
28
|
-
fs.writeFileSync('./src/build_id.json', JSON.stringify(BUILD_ID.toString()));
|
|
29
|
-
|
|
30
26
|
function distPath({ subpathOut = '', subpathIn = '', extensionOut } = {}) {
|
|
31
27
|
return function ({ context, absoluteFilename }) {
|
|
32
28
|
const prefixIn = path.resolve(context, subpathIn);
|