@ray-js/cli 0.6.23 → 0.6.26
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/lib/build.d.ts +1 -1
- package/lib/build.js +14 -25
- package/lib/start.d.ts +1 -1
- package/lib/start.js +14 -25
- package/package.json +9 -9
package/lib/build.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CliOptions } from '@ray-js/types';
|
|
2
|
-
export default function build(options: CliOptions):
|
|
2
|
+
export default function build(options: CliOptions): void;
|
package/lib/build.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
3
|
var t = {};
|
|
13
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -22,21 +13,19 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
14
|
const run_builder_1 = require("./run-builder");
|
|
24
15
|
function build(options) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
});
|
|
16
|
+
const { type = 'app' } = options, restOptions = __rest(options, ["type"]);
|
|
17
|
+
if (type === 'component') {
|
|
18
|
+
const { build: buildComponent } = require('@ray-js/builder-component');
|
|
19
|
+
buildComponent(Object.assign(Object.assign({}, restOptions), { watch: false })).catch((error) => {
|
|
20
|
+
console.log(error);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
(0, run_builder_1.runBuilder)(Object.assign(Object.assign({}, options), { watch: false })).catch((error) => {
|
|
26
|
+
console.log(error);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
41
30
|
}
|
|
42
31
|
exports.default = build;
|
package/lib/start.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CliOptions } from '@ray-js/types';
|
|
2
|
-
export default function start(options: CliOptions):
|
|
2
|
+
export default function start(options: CliOptions): void;
|
package/lib/start.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
3
|
var t = {};
|
|
13
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -22,21 +13,19 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
14
|
const run_builder_1 = require("./run-builder");
|
|
24
15
|
function start(options) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
});
|
|
16
|
+
const { type = 'app' } = options, restOptions = __rest(options, ["type"]);
|
|
17
|
+
if (type === 'component') {
|
|
18
|
+
const { build: buildComponent } = require('@ray-js/builder-component');
|
|
19
|
+
buildComponent(Object.assign(Object.assign({}, restOptions), { watch: true })).catch((error) => {
|
|
20
|
+
console.log(error);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
(0, run_builder_1.runBuilder)(Object.assign(Object.assign({}, options), { watch: true })).catch((error) => {
|
|
26
|
+
console.log(error);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
41
30
|
}
|
|
42
31
|
exports.default = start;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.26",
|
|
4
4
|
"description": "Ray cli",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ray": "./bin/ray"
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"watch": "tsc -p ./tsconfig.build.json --watch"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@ray-js/build-plugin-ray": "^0.6.
|
|
28
|
-
"@ray-js/build-plugin-router": "^0.6.
|
|
29
|
-
"@ray-js/builder-component": "^0.6.
|
|
30
|
-
"@ray-js/builder-mp": "^0.6.
|
|
31
|
-
"@ray-js/builder-web": "^0.6.
|
|
32
|
-
"@ray-js/shared": "^0.6.
|
|
33
|
-
"@ray-js/types": "^0.6.
|
|
27
|
+
"@ray-js/build-plugin-ray": "^0.6.26",
|
|
28
|
+
"@ray-js/build-plugin-router": "^0.6.26",
|
|
29
|
+
"@ray-js/builder-component": "^0.6.26",
|
|
30
|
+
"@ray-js/builder-mp": "^0.6.26",
|
|
31
|
+
"@ray-js/builder-web": "^0.6.26",
|
|
32
|
+
"@ray-js/shared": "^0.6.26",
|
|
33
|
+
"@ray-js/types": "^0.6.26",
|
|
34
34
|
"colors": "1.4.0",
|
|
35
35
|
"commander": "^8.2.0",
|
|
36
36
|
"webpack-chain": "^6.5.1"
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
"email": "tuyafe@tuya.com"
|
|
42
42
|
}
|
|
43
43
|
],
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "219e20327347ffc4fe9444d7b9f864341774432d",
|
|
45
45
|
"repository": {}
|
|
46
46
|
}
|