@ray-js/builder-mp 0.5.7-beta-1 → 0.5.7-beta-2

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.
Files changed (2) hide show
  1. package/lib/build.js +8 -3
  2. package/package.json +5 -5
package/lib/build.js CHANGED
@@ -62,7 +62,12 @@ function build(options, context) {
62
62
  if (debug) {
63
63
  process.env.REMAX_DEBUG = 'true'; // ray 运行时日志
64
64
  }
65
- const outputPath = (0, shared_1.resolvePath)([output, target], { cwd });
65
+ let outputTarget = target;
66
+ // 适配
67
+ if (target === 'thing') {
68
+ outputTarget = 'tuya';
69
+ }
70
+ const outputPath = (0, shared_1.resolvePath)([output, outputTarget], { cwd });
66
71
  shared_1.log.info(LOG_PREFIX, '@ray-core/cli:'.green, `v${package_json_1.default.version}`);
67
72
  shared_1.log.info(LOG_PREFIX, 'cwd:'.green, cwd.underline);
68
73
  shared_1.log.info(LOG_PREFIX, 'outputDir:'.green, outputPath.underline);
@@ -208,9 +213,9 @@ function build(options, context) {
208
213
  // FIXME: ray 支持注册其他平台适配器
209
214
  remaxApi.registerAdapterPlugins = function (target) {
210
215
  // @ts-ignore
211
- if (target === 'tuya') {
216
+ if (target === 'thing') {
212
217
  this.adapter.target = target;
213
- this.adapter.packageName = '@ray-js/remax-tuya';
218
+ this.adapter.packageName = '@ray-js/adapter';
214
219
  const packagePath = this.adapter.packageName + '/node';
215
220
  let plugin = require(packagePath).default || require(packagePath);
216
221
  plugin = typeof plugin === 'function' ? plugin() : plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/builder-mp",
3
- "version": "0.5.7-beta-1",
3
+ "version": "0.5.7-beta-2",
4
4
  "description": "Ray builder for mini program",
5
5
  "keywords": [
6
6
  "ray"
@@ -28,9 +28,9 @@
28
28
  "@ray-core/build-store": "^0.0.x",
29
29
  "@ray-core/cli": "^0.0.x",
30
30
  "@ray-core/ray": "^0.0.x",
31
- "@ray-js/remax-tuya": "^0.5.7-beta-1",
32
- "@ray-js/shared": "^0.5.7-beta-1",
33
- "@ray-js/types": "^0.5.7-beta-1",
31
+ "@ray-js/adapter": "^0.5.7-beta-2",
32
+ "@ray-js/shared": "^0.5.7-beta-2",
33
+ "@ray-js/types": "^0.5.7-beta-2",
34
34
  "babel-loader": "^8.2.3",
35
35
  "babel-plugin-minify-dead-code-elimination": "^0.5.1",
36
36
  "babel-plugin-transform-prune-unused-imports": "^1.0.1",
@@ -61,6 +61,6 @@
61
61
  "email": "tuyafe@tuya.com"
62
62
  }
63
63
  ],
64
- "gitHead": "5e99e8896916d6d41ac4008c20e1ae8ca6e028c7",
64
+ "gitHead": "290d921f04a74cf0df8415c91bd33119e6f8e11e",
65
65
  "repository": {}
66
66
  }