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/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: '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
  }
@@ -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
  })