rigjs 2.0.0-alpha.0 → 2.0.0-alpha.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/built/index.js +351 -36
- package/demo/.env.oem1 +4 -0
- package/demo/.env.oem2 +4 -0
- package/demo/cicd.rig.json5 +50 -4
- package/demo/package.json +2 -0
- package/demo/src/App.vue +6 -0
- package/demo/vue.config.js +5 -1
- package/demo/yarn.lock +437 -13
- package/lib/build/index.ts +31 -3
- package/lib/classes/cicd/CICD.ts +6 -4
- package/lib/classes/cicd/Deploy/AliDeploy.ts +50 -0
- package/lib/classes/cicd/Deploy/CDN.ts +189 -0
- package/lib/classes/cicd/Endpoint.ts +4 -4
- package/lib/define/index.ts +1 -1
- package/lib/deploy/index.ts +55 -40
- package/lib/publish/index.ts +84 -0
- package/lib/rig/index.ts +10 -1
- package/package.json +8 -2
- package/lib/publish/index.js +0 -14
package/demo/.env.oem1
ADDED
package/demo/.env.oem2
ADDED
package/demo/cicd.rig.json5
CHANGED
|
@@ -1,9 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
tree_schema: '
|
|
2
|
+
tree_schema: 'ykp/{env}/{oem}',
|
|
3
3
|
source: {
|
|
4
4
|
root_path: 'dist',
|
|
5
5
|
},
|
|
6
|
-
target: {
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
target: {
|
|
7
|
+
id: 'alicloud',
|
|
8
|
+
type: 'alicloud',
|
|
9
|
+
bucket: 'cdn-rys-com',
|
|
10
|
+
region: 'oss-cn-beijing',
|
|
11
|
+
access_key: '${ak}',
|
|
12
|
+
access_secret: '${as}',
|
|
13
|
+
root_path: '/',
|
|
14
|
+
uri_rewrite: {
|
|
15
|
+
original: 'view-fp',
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
endpoints: {
|
|
19
|
+
'ykp/test/oem1': {
|
|
20
|
+
build: 'yarn build:oem1',
|
|
21
|
+
defines: {
|
|
22
|
+
NGINX_REPLACE_B: 'http://',
|
|
23
|
+
NGINX_REPLACE_A: '替换了',
|
|
24
|
+
},
|
|
25
|
+
domain: 'cdn.rys.com',
|
|
26
|
+
},
|
|
27
|
+
'ykp/test/oem2': {
|
|
28
|
+
// build: 'yarn build:test:oem2',
|
|
29
|
+
build: 'yarn build:oem2',
|
|
30
|
+
defines: {
|
|
31
|
+
NGINX_REPLACE_B: 'http://',
|
|
32
|
+
NGINX_REPLACE_A: '替换了',
|
|
33
|
+
},
|
|
34
|
+
domain: 'cdn.rys.com'
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
groups: [
|
|
38
|
+
{
|
|
39
|
+
name: '%group1',
|
|
40
|
+
level: 'oem',
|
|
41
|
+
includes: [
|
|
42
|
+
'rys',
|
|
43
|
+
'zhs',
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: '%group1',
|
|
48
|
+
level: 'oem',
|
|
49
|
+
includes: [
|
|
50
|
+
'zhs',
|
|
51
|
+
'cy',
|
|
52
|
+
],
|
|
53
|
+
}
|
|
54
|
+
],
|
|
9
55
|
}
|
package/demo/package.json
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve": "vue-cli-service serve",
|
|
7
|
+
"build:oem1": "vue-cli-service build --mode oem1",
|
|
8
|
+
"build:oem2": "vue-cli-service build --mode oem2",
|
|
7
9
|
"build": "vue-cli-service build",
|
|
8
10
|
"lint": "vue-cli-service lint",
|
|
9
11
|
"preinstall": "rig preinstall",
|
package/demo/src/App.vue
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div id="app">
|
|
3
3
|
<img alt="Vue logo" src="./assets/logo.png">
|
|
4
4
|
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
|
5
|
+
<span>test_replace:{{ test_replace}}</span>
|
|
5
6
|
</div>
|
|
6
7
|
</template>
|
|
7
8
|
|
|
@@ -10,6 +11,11 @@ import HelloWorld from './components/HelloWorld.vue'
|
|
|
10
11
|
|
|
11
12
|
export default {
|
|
12
13
|
name: 'App',
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
test_replace: 'NGINX_REPLACE_A'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
13
19
|
components: {
|
|
14
20
|
HelloWorld
|
|
15
21
|
}
|
package/demo/vue.config.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
const { defineConfig } = require('@vue/cli-service')
|
|
2
|
+
console.log(process.env.PUBLIC_PATH)
|
|
3
|
+
|
|
2
4
|
module.exports = defineConfig({
|
|
3
|
-
transpileDependencies: true
|
|
5
|
+
transpileDependencies: true,
|
|
6
|
+
outputDir: process.env.OUT_PUT_DIR,
|
|
7
|
+
publicPath: process.env.PUBLIC_PATH
|
|
4
8
|
})
|