@ray-js/ray 0.6.21 → 0.6.22-beta-1

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/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
1
  export * from '@ray-js/framework'
2
2
  export * from '@ray-js/components'
3
3
  export * from '@ray-js/api'
4
+ export { default as location } from '@ray-js/location'
5
+ export { default as r } from '@ray-js/router'
6
+ export { default as platform } from '@ray-js/env'
package/index.js CHANGED
@@ -1 +1,3 @@
1
- export * from './main'
1
+ // 构建web、小程序时,导入的模块 `import * form 'ray';`
2
+
3
+ export * from './unified'
package/main/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Ray
2
+
3
+ 应用的入口文件,开发者不会直接接触到
package/main/index.js ADDED
@@ -0,0 +1,18 @@
1
+ // web构建入口文件
2
+
3
+ import { createApp } from '@ray-js/framework'
4
+ import app from '@/app'
5
+ import * as globalConfig from '@/global.config'
6
+ import * as routesConfig from '@/routes.config'
7
+
8
+ const { routes, tabBar = {}, _PAGES_ = [] } = routesConfig
9
+ const globalConfigDefault = globalConfig.default || {}
10
+ const globalConfigTarget = globalConfig[process.env.PLATFORM] || {}
11
+
12
+ createApp({
13
+ app,
14
+ routes,
15
+ tabBar,
16
+ globalConfig: { ...globalConfigTarget, ...globalConfigDefault },
17
+ pages: _PAGES_,
18
+ })
@@ -0,0 +1,11 @@
1
+ // 小程序(tuya、wechat等)构建入口文件
2
+
3
+ import { createRouter } from '@ray-js/router-mp'
4
+
5
+ const routes = require('@/routes.config')
6
+
7
+ createRouter({
8
+ routes: routes.routes || [],
9
+ tabBar: routes.tabBar || {},
10
+ subpackages: routes.subpackages || routes.subPackages || [],
11
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ray",
3
- "version": "0.6.21",
3
+ "version": "0.6.22-beta-1",
4
4
  "description": "ray",
5
5
  "keywords": [
6
6
  "ray"
@@ -11,17 +11,18 @@
11
11
  "files": [
12
12
  "index.js",
13
13
  "index.d.ts",
14
- "main.js",
15
- "main.mini.js"
14
+ "unified.js",
15
+ "unified.mini.js",
16
+ "main"
16
17
  ],
17
18
  "publishConfig": {
18
19
  "access": "public",
19
20
  "registry": "https://registry.npmjs.org"
20
21
  },
21
22
  "dependencies": {
22
- "@ray-js/api": "^0.6.21",
23
- "@ray-js/components": "^0.6.21",
24
- "@ray-js/framework": "^0.6.21"
23
+ "@ray-js/api": "^0.6.22-beta-1",
24
+ "@ray-js/components": "^0.6.22-beta-1",
25
+ "@ray-js/framework": "^0.6.22-beta-1"
25
26
  },
26
27
  "maintainers": [
27
28
  {
@@ -29,6 +30,6 @@
29
30
  "ezmail": "tuyafe@tuya.com"
30
31
  }
31
32
  ],
32
- "gitHead": "cbb81571d068e6997e9b1fe95198c1b0275112e7",
33
+ "gitHead": "2e905a1820d0adfc0a6ca8cf3ecf1f3a584a0d44",
33
34
  "repository": {}
34
35
  }
@@ -13,3 +13,6 @@ export {
13
13
  } from '@ray-js/framework'
14
14
  export * from '@ray-js/components'
15
15
  export * from '@ray-js/api'
16
+ export { default as r } from '@ray-js/router'
17
+ export { default as location } from '@ray-js/location'
18
+ export { default as platform } from '@ray-js/env'
@@ -0,0 +1,6 @@
1
+ export * from '@ray-js/framework'
2
+ export * from '@ray-js/components'
3
+ export * from '@ray-js/api'
4
+ export { default as r } from '@ray-js/router'
5
+ export { default as location } from '@ray-js/location'
6
+ export { default as platform } from '@ray-js/env'
package/main.mini.js DELETED
@@ -1,3 +0,0 @@
1
- export * from '@ray-js/framework'
2
- export * from '@ray-js/components'
3
- export * from '@ray-js/api'