babel-plugin-hylid-bridge 2.12.0-alpha.32 → 2.12.0-alpha.34
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/generateJSAPIs.js +1 -1
- package/lib/index.js +3 -3
- package/package.json +2 -2
package/lib/generateJSAPIs.js
CHANGED
|
@@ -48,7 +48,7 @@ function generateJSAPIs(targets) {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
// 生成文件
|
|
51
|
-
var outPath = _path.default.join(lib, 'lib', 'babel-
|
|
51
|
+
var outPath = _path.default.join(lib, 'lib', 'babel-compact.js');
|
|
52
52
|
var codes = ['// hylid-bridge babel 插件生成', "export * from './index'", "export { default } from './index'", (0, _generator.default)(ast).code];
|
|
53
53
|
_fsExtra.default.writeFileSync(outPath, codes.join('\n'));
|
|
54
54
|
}
|
package/lib/index.js
CHANGED
|
@@ -32,20 +32,20 @@ var _default = exports.default = function _default(core, opts) {
|
|
|
32
32
|
var userAppEnvPath = (0, _helper.getUserAppEnvPath)(opts === null || opts === void 0 ? void 0 : opts.appEnvPath);
|
|
33
33
|
var polyfillDir = opts === null || opts === void 0 ? void 0 : opts.polyfillDir;
|
|
34
34
|
var transformMy = (_opts$transformMy = opts === null || opts === void 0 ? void 0 : opts.transformMy) !== null && _opts$transformMy !== void 0 ? _opts$transformMy : false;
|
|
35
|
-
// 生成 babel-
|
|
35
|
+
// 生成 babel-compact 文件
|
|
36
36
|
(0, _generateJSAPIs.default)(targets);
|
|
37
37
|
return {
|
|
38
38
|
name: 'babel-plugin-hylid-bridge',
|
|
39
39
|
visitor: {
|
|
40
40
|
ImportDeclaration: function ImportDeclaration(path) {
|
|
41
41
|
if (path.node.source.value === libraryName) {
|
|
42
|
-
path.node.source = core.types.stringLiteral("".concat(libraryName, "/babel-
|
|
42
|
+
path.node.source = core.types.stringLiteral("".concat(libraryName, "/babel-compact"));
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
ExportNamedDeclaration: function ExportNamedDeclaration(path) {
|
|
46
46
|
var _path$node$source;
|
|
47
47
|
if (((_path$node$source = path.node.source) === null || _path$node$source === void 0 ? void 0 : _path$node$source.value) === libraryName) {
|
|
48
|
-
path.node.source = core.types.stringLiteral("".concat(libraryName, "/babel-
|
|
48
|
+
path.node.source = core.types.stringLiteral("".concat(libraryName, "/babel-compact"));
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
MemberExpression: function MemberExpression(path, state) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-plugin-hylid-bridge",
|
|
3
|
-
"version": "2.12.0-alpha.
|
|
3
|
+
"version": "2.12.0-alpha.34",
|
|
4
4
|
"description": "babel-plugin-hylid-bridge",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/babel-plugin-tester": "^9.0.7",
|
|
24
24
|
"babel-plugin-tester": "^10.1.0",
|
|
25
|
-
"hylid-bridge": "^2.12.0-alpha.
|
|
25
|
+
"hylid-bridge": "^2.12.0-alpha.34"
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"registry": "https://registry.npmjs.org/",
|