rigjs 2.0.0-alpha.14 → 2.0.0-alpha.17
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/built/index.js +41 -41
- package/lib/build/index.ts +6 -2
- package/package.json +1 -1
package/lib/build/index.ts
CHANGED
|
@@ -5,6 +5,8 @@ import shell from 'shelljs';
|
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import fs from 'fs';
|
|
7
7
|
|
|
8
|
+
const JSON5 = require('json5');
|
|
9
|
+
|
|
8
10
|
const replaceDefine = (target: string, defines?: Define) => {
|
|
9
11
|
const dirs = fs.readdirSync(target);
|
|
10
12
|
for (let dir of dirs) {
|
|
@@ -42,9 +44,11 @@ export default async (cmd: any) => {
|
|
|
42
44
|
ep.build = ep.build.replace(regexPublicPath, ep.publicPath);
|
|
43
45
|
try {
|
|
44
46
|
//替换define中的$public_path
|
|
45
|
-
|
|
47
|
+
Object.keys(ep.defines).forEach(key=>{
|
|
48
|
+
ep.defines[key] = ep.defines[key].replace(regexPublicPath, ep.publicPath);
|
|
49
|
+
})
|
|
46
50
|
} catch (e) {
|
|
47
|
-
console.log(e.message);
|
|
51
|
+
console.log('JSON5 error:', ep.defines,e.message);
|
|
48
52
|
}
|
|
49
53
|
console.log('exec build:', ep, ep.build, ep.defines);
|
|
50
54
|
shell.exec(ep.build);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rigjs",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.17",
|
|
4
4
|
"description": "A multi-repos dev tool based on yarn and git.Rig is inspired by cocoapods. Not like those monorepo solutions,rig is a tool for organizing multi-repos.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"modular",
|