rigjs 2.0.0-alpha → 2.0.0-alpha.0
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 +55 -32
- package/demo/babel.config.js +5 -0
- package/demo/cicd.rig.json5 +4 -45
- package/demo/jsconfig.json +19 -0
- package/demo/package.json +43 -14
- package/demo/package.rig.json5 +0 -1
- package/demo/public/favicon.ico +0 -0
- package/demo/public/index.html +17 -0
- package/demo/src/App.vue +28 -0
- package/demo/src/assets/logo.png +0 -0
- package/demo/src/components/HelloWorld.vue +58 -0
- package/demo/src/main.js +8 -0
- package/demo/vue.config.js +4 -0
- package/demo/yarn.lock +5633 -21
- package/lib/deploy/index.ts +0 -1
- package/lib/init/cicd.rig.json5 +5 -13
- package/lib/init/index.js +28 -5
- package/package.json +1 -1
- package/demo/test.js +0 -18
package/lib/deploy/index.ts
CHANGED
package/lib/init/cicd.rig.json5
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
tree_schema: ''
|
|
2
|
+
tree_schema: '{app}/{env}/{oem}',
|
|
3
3
|
source: {
|
|
4
|
-
|
|
4
|
+
root_path: 'dist',
|
|
5
5
|
},
|
|
6
|
-
target: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
access_token: '',
|
|
10
|
-
root_path: '/',
|
|
11
|
-
},
|
|
12
|
-
predefines: {},//relpace special string in your bundle,so you can use the same bundle in different enviroments without building multiple times.
|
|
13
|
-
endpoints: [],
|
|
14
|
-
alias: []
|
|
6
|
+
target: {},
|
|
7
|
+
endpoints: {},
|
|
8
|
+
groups: [],
|
|
15
9
|
}
|
|
16
|
-
|
|
17
|
-
|
package/lib/init/index.js
CHANGED
|
@@ -45,16 +45,39 @@ const load = async () => {
|
|
|
45
45
|
console.log(chalk.green('rig_helper.js already exists~'));
|
|
46
46
|
} else {
|
|
47
47
|
console.log(chalk.green('create rig_helper.js'));
|
|
48
|
-
let
|
|
49
|
-
|
|
48
|
+
let template = `const json5 = require('json5');
|
|
49
|
+
const fs = require('fs');
|
|
50
|
+
const getPkgs = () => {
|
|
51
|
+
\tlet pkgArr = json5.parse(fs.readFileSync('./package.rig.json5'));
|
|
52
|
+
\tlet flatPkgArr = pkgArr.map((item, index) => {
|
|
53
|
+
\t\treturn item.name;
|
|
54
|
+
\t});
|
|
55
|
+
\tconsole.log(flatPkgArr);
|
|
56
|
+
\treturn flatPkgArr;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
module.exports = {
|
|
60
|
+
\tgetPkgs
|
|
61
|
+
}
|
|
62
|
+
`
|
|
63
|
+
fs.writeFileSync(`${process.cwd()}/rig_helper.js`, template);
|
|
50
64
|
}
|
|
51
65
|
if (fs.existsSync(`${process.cwd()}/cicd.rig.json5`)) {
|
|
52
66
|
console.log(chalk.green('cicd.rig.json5 already exists~'));
|
|
53
67
|
} else {
|
|
54
68
|
console.log(chalk.green('create cicd.rig.json5'));
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
-
|
|
69
|
+
let template = `{
|
|
70
|
+
tree_schema: '{app}/{env}/{oem}',
|
|
71
|
+
source: {
|
|
72
|
+
root_path: 'dist',
|
|
73
|
+
},
|
|
74
|
+
target: {},
|
|
75
|
+
endpoints: {},
|
|
76
|
+
groups: [],
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
fs.writeFileSync(`${process.cwd()}/cicd.rig.json5`, template);
|
|
80
|
+
|
|
58
81
|
}
|
|
59
82
|
//检查rigs是否存在
|
|
60
83
|
if (fs.existsSync('./rigs') && fs.lstatSync('./rigs').isDirectory()) {
|
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.0",
|
|
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",
|
package/demo/test.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// const fs = require('fs');
|
|
2
|
-
// let pkgStr = fs.readFileSync('package.json').toString();
|
|
3
|
-
// let pkg = JSON.parse(pkgStr);
|
|
4
|
-
// console.log(pkg);
|
|
5
|
-
// pkg.info = 'test';
|
|
6
|
-
// // fs.('package.json');
|
|
7
|
-
// fs.writeFileSync('package.json', JSON.stringify(pkg,null,2));
|
|
8
|
-
// pkgStr = fs.readFileSync('package.json').toString();
|
|
9
|
-
// pkg = JSON.parse(pkgStr);
|
|
10
|
-
// console.log(pkg);
|
|
11
|
-
//
|
|
12
|
-
console.log(/^([a-z]+-){1,3}([0-9]+)(\.([0-9]+)){3}$/.test('a-a-1.2.1.1'));
|
|
13
|
-
//cmd
|
|
14
|
-
// console.log(/^(\.([0-9]+)){3}$/.test('a-a-1.2.1.1'));
|
|
15
|
-
console.log('a-a-1.2.1.1'.split(/(?<=[a-z])-(?=[0-9])/));
|
|
16
|
-
|
|
17
|
-
//抓取版本
|
|
18
|
-
|