rigjs 2.0.0-alpha.0 → 2.0.0-alpha.11

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/demo/.env.oem1 ADDED
@@ -0,0 +1,4 @@
1
+ OUT_PUT_DIR = dist/ykp/test/oem1
2
+ NODE_ENV = test
3
+ BUILD_TYPE = test_ome1
4
+ VUE_APP_BASE_URL = 'http://localhost:9001'
package/demo/.env.oem2 ADDED
@@ -0,0 +1,4 @@
1
+ OUT_PUT_DIR = dist/ykp/test/oem2
2
+ NODE_ENV = test
3
+ BUILD_TYPE = test_ome2
4
+ VUE_APP_BASE_URL = 'http://localhost:9001'
@@ -1,9 +1,55 @@
1
1
  {
2
- tree_schema: '{app}/{env}/{oem}',
2
+ tree_schema: 'ykp/{env}/{oem}',
3
3
  source: {
4
4
  root_path: 'dist',
5
5
  },
6
- target: {},
7
- endpoints: {},
8
- groups: [],
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: 'cross-env PUBLIC_PATH=$public_path npx vue-cli-service build --mode 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: 'cross-env PUBLIC_PATH=$public_path npx vue-cli-service build --mode 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",
@@ -11,7 +13,9 @@
11
13
  },
12
14
  "dependencies": {
13
15
  "core-js": "^3.8.3",
14
- "vue": "^2.6.14"
16
+ "vue": "^2.6.14",
17
+ "rig-test-1": "git+ssh://git@github.com:FlashHand/rig-test-1.git#1.0.1",
18
+ "rig-test-2": "git+ssh://git@github.com:FlashHand/rig-test-2.git#1.0.1"
15
19
  },
16
20
  "devDependencies": {
17
21
  "@babel/core": "^7.12.16",
@@ -1,7 +1,12 @@
1
1
  [
2
- // {
3
- // name: "your project name",
4
- // source: "git ssh url",
5
- // version: "semver version(like 1.0.0)",
6
- // },
2
+ {
3
+ name: "rig-test-1",
4
+ source: "git@github.com:FlashHand/rig-test-1.git",
5
+ version: "1.0.1",
6
+ },
7
+ {
8
+ name: "rig-test-2",
9
+ source: "git@github.com:FlashHand/rig-test-2.git",
10
+ version: "1.0.1",
11
+ },
7
12
  ]
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
  }
@@ -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
  })