@builder.io/mitosis-cli 0.0.12 → 0.0.13-0
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/dist/__tests__/cli-integration.test.js +1 -1
- package/dist/build/build.js +21 -15
- package/dist/build/helpers/babel-transform-expression.js +2 -2
- package/dist/build/helpers/compile-vue-file.js +8 -8
- package/dist/build/helpers/compile-vue-v2-file.js +10 -8
- package/dist/build/helpers/compile-vue-v2-file.test.js +1 -1
- package/dist/build/helpers/get-simple-id.js +1 -1
- package/dist/build/helpers/transpile-optional-chaining.js +1 -1
- package/dist/build/helpers/transpile-solid-file.js +2 -2
- package/dist/build/helpers/transpile-vue-binding-expression.js +2 -2
- package/dist/build/helpers/transpile.js +2 -2
- package/dist/cli.js +2 -4
- package/dist/commands/build.js +2 -2
- package/dist/commands/compile.js +3 -3
- package/dist/commands/new.js +6 -6
- package/dist/extensions/cli-extension.js +1 -1
- package/dist/helpers/get-mitosis-config.js +1 -1
- package/dist/templates/library-simple/package-lock.json +2590 -0
- package/dist/templates/library-simple/src/components/my-component.lite.jsx +1 -1
- package/dist/templates/library-simple/src/components/my-component.lite.tsx +6 -6
- package/dist/templates/library-simple/src/index.js +1 -1
- package/dist/templates/library-simple/src/index.ts +1 -1
- package/dist/types/build/helpers/transpile.d.ts +1 -1
- package/docs/plugins.md +11 -11
- package/package.json +3 -7
|
@@ -15,4 +15,4 @@ function MyComponent(props) {
|
|
|
15
15
|
</div>);
|
|
16
16
|
}
|
|
17
17
|
exports.default = MyComponent;
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXktY29tcG9uZW50LmxpdGUuanN4Iiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL3RlbXBsYXRlcy9saWJyYXJ5LXNpbXBsZS9zcmMvY29tcG9uZW50cy9teS1jb21wb25lbnQubGl0ZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSw2RkFBNkY7QUFDN0Ysa0RBQWdEO0FBQ2hELCtDQUFxRDtBQU1yRCxTQUF3QixXQUFXLENBQUMsS0FBYztJQUNoRCxJQUFNLEtBQUssR0FBRyxJQUFBLGtCQUFRLEVBQUM7UUFDckIsSUFBSSxFQUFFLE9BQU87S0FDZCxDQUFDLENBQUM7SUFFSCxPQUFPLENBQ0wsQ0FBQyxHQUFHLENBQ0Y7TUFBQSxDQUFDLGNBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUFDLENBQzFCO1FBQUEsQ0FBQyxLQUFLLENBQ0osR0FBRyxDQUFDLENBQUMsRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FDdEIsS0FBSyxDQUFDLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUNsQixRQUFRLENBQUMsQ0FBQyxVQUFDLEtBQUssSUFBSyxPQUFBLENBQUMsS0FBSyxDQUFDLElBQUksR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxFQUFqQyxDQUFpQyxDQUFDLEVBRTNEO01BQUEsRUFBRSxjQUFJLENBQ047O0lBQ0YsRUFBRSxHQUFHLENBQUMsQ0FDUCxDQUFDO0FBQ0osQ0FBQztBQWpCRCw4QkFpQkMifQ==
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// TODO: get the exports alias working here so this is just `import '@builder.io/mitosis/jsx'
|
|
2
|
-
import '@builder.io/mitosis/dist/src/jsx-types'
|
|
3
|
-
import { useState, Show } from '@builder.io/mitosis'
|
|
2
|
+
import '@builder.io/mitosis/dist/src/jsx-types';
|
|
3
|
+
import { useState, Show } from '@builder.io/mitosis';
|
|
4
4
|
|
|
5
5
|
type MyProps = {
|
|
6
|
-
showInput?: boolean
|
|
7
|
-
}
|
|
6
|
+
showInput?: boolean;
|
|
7
|
+
};
|
|
8
8
|
|
|
9
9
|
export default function MyComponent(props: MyProps) {
|
|
10
10
|
const state = useState({
|
|
11
11
|
name: 'Steve',
|
|
12
|
-
})
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<div>
|
|
@@ -22,5 +22,5 @@ export default function MyComponent(props: MyProps) {
|
|
|
22
22
|
</Show>
|
|
23
23
|
Hello! I can run in React, Vue, Solid, or Liquid!
|
|
24
24
|
</div>
|
|
25
|
-
)
|
|
25
|
+
);
|
|
26
26
|
}
|
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.RecommendedProducts = void 0;
|
|
7
7
|
var my_component_lite_1 = require("./components/my-component.lite");
|
|
8
8
|
Object.defineProperty(exports, "RecommendedProducts", { enumerable: true, get: function () { return __importDefault(my_component_lite_1).default; } });
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdGVtcGxhdGVzL2xpYnJhcnktc2ltcGxlL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxvRUFBZ0Y7QUFBdkUseUlBQUEsT0FBTyxPQUF1QiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as RecommendedProducts } from './components/my-component.lite'
|
|
1
|
+
export { default as RecommendedProducts } from './components/my-component.lite';
|
package/docs/plugins.md
CHANGED
|
@@ -17,13 +17,13 @@ A command is a file that looks something like this:
|
|
|
17
17
|
// commands/foo.js
|
|
18
18
|
|
|
19
19
|
module.exports = {
|
|
20
|
-
run: toolbox => {
|
|
21
|
-
const { print, filesystem } = toolbox
|
|
20
|
+
run: (toolbox) => {
|
|
21
|
+
const { print, filesystem } = toolbox;
|
|
22
22
|
|
|
23
|
-
const desktopDirectories = filesystem.subdirectories(`~/Desktop`)
|
|
24
|
-
print.info(desktopDirectories)
|
|
25
|
-
}
|
|
26
|
-
}
|
|
23
|
+
const desktopDirectories = filesystem.subdirectories(`~/Desktop`);
|
|
24
|
+
print.info(desktopDirectories);
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
An extension lets you add additional features to the `toolbox`.
|
|
@@ -31,13 +31,13 @@ An extension lets you add additional features to the `toolbox`.
|
|
|
31
31
|
```js
|
|
32
32
|
// extensions/bar-extension.js
|
|
33
33
|
|
|
34
|
-
module.exports = toolbox => {
|
|
35
|
-
const { print } = toolbox
|
|
34
|
+
module.exports = (toolbox) => {
|
|
35
|
+
const { print } = toolbox;
|
|
36
36
|
|
|
37
37
|
toolbox.bar = () => {
|
|
38
|
-
print.info('Bar!')
|
|
39
|
-
}
|
|
40
|
-
}
|
|
38
|
+
print.info('Bar!');
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
This is then accessible in your plugin's commands as `toolbox.bar`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/mitosis-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13-0",
|
|
4
4
|
"description": "mitosis CLI",
|
|
5
5
|
"types": "build/types/types.d.ts",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"copy-templates": "if [ -e ./src/templates ]; then cp -a ./src/templates ./dist/; fi",
|
|
19
19
|
"build": "npm run format && npm run clean-build && npm run compile && npm run copy-templates",
|
|
20
20
|
"prepublishOnly": "npm run build",
|
|
21
|
+
"release:dev": "npm run build && npm version prerelease --no-git-tag-version && ALLOW_PUBLISH=true npm publish --tag dev",
|
|
21
22
|
"release:patch": "npm version patch && npm publish",
|
|
22
23
|
"test": "jest",
|
|
23
24
|
"watch": "jest --watch",
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
"license": "MIT",
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@babel/preset-typescript": "^7.15.0",
|
|
38
|
-
"@builder.io/mitosis": "0.0.
|
|
39
|
+
"@builder.io/mitosis": "0.0.49",
|
|
39
40
|
"@types/fs-extra": "^9.0.8",
|
|
40
41
|
"@types/lodash": "^4.14.171",
|
|
41
42
|
"@vue/compiler-sfc": "^3.1.5",
|
|
@@ -49,7 +50,6 @@
|
|
|
49
50
|
"lodash": "^4.17.21",
|
|
50
51
|
"micromatch": "^4.0.4",
|
|
51
52
|
"parse5": "^3.0.3",
|
|
52
|
-
"prettier": "^2.3.2",
|
|
53
53
|
"vue-template-es2015-compiler": "^1.9.1",
|
|
54
54
|
"vue-template-validator": "^1.1.5"
|
|
55
55
|
},
|
|
@@ -61,9 +61,5 @@
|
|
|
61
61
|
"ts-jest": "^24.1.0",
|
|
62
62
|
"ts-node": "^8.4.1",
|
|
63
63
|
"typescript": "^4.5.4"
|
|
64
|
-
},
|
|
65
|
-
"prettier": {
|
|
66
|
-
"semi": false,
|
|
67
|
-
"singleQuote": true
|
|
68
64
|
}
|
|
69
65
|
}
|