@vureact/compiler-core 1.1.0 → 1.1.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vureact/compiler-core v1.1.
|
|
2
|
+
* @vureact/compiler-core v1.1.1
|
|
3
3
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -1411,6 +1411,7 @@ function resolveLessSass(source, options) {
|
|
|
1411
1411
|
} else if (lang === "scss" || lang === "sass") {
|
|
1412
1412
|
result.code = resolveSassSync(source, filename);
|
|
1413
1413
|
}
|
|
1414
|
+
result.code = resolveImportExtensions(result.code);
|
|
1414
1415
|
return result;
|
|
1415
1416
|
}
|
|
1416
1417
|
function resolveLessSync(source, filename) {
|
|
@@ -1462,6 +1463,12 @@ function resolveSassSync(source, filename) {
|
|
|
1462
1463
|
const result = sass.compileString(source, options);
|
|
1463
1464
|
return result.css;
|
|
1464
1465
|
}
|
|
1466
|
+
function resolveImportExtensions(code) {
|
|
1467
|
+
if (code.includes(".less") || code.includes(".scss") || code.includes(".sass")) {
|
|
1468
|
+
return code.replaceAll(/\.(less|scss|sass)(?=['")])/g, ".css");
|
|
1469
|
+
}
|
|
1470
|
+
return code;
|
|
1471
|
+
}
|
|
1465
1472
|
|
|
1466
1473
|
// src/core/parse/sfc/process/resolve-styles.ts
|
|
1467
1474
|
function resolveStyles(descriptor, ctx, result) {
|
|
@@ -5094,7 +5101,7 @@ function transform(ast, ctx, options) {
|
|
|
5094
5101
|
}
|
|
5095
5102
|
|
|
5096
5103
|
// package.json
|
|
5097
|
-
var version = "1.1.
|
|
5104
|
+
var version = "1.1.1";
|
|
5098
5105
|
var bin = {
|
|
5099
5106
|
vureact: "./bin/vureact.js"
|
|
5100
5107
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10;/**
|
|
2
|
-
* @vureact/compiler-core v1.1.
|
|
2
|
+
* @vureact/compiler-core v1.1.1
|
|
3
3
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -1411,6 +1411,7 @@ function resolveLessSass(source, options) {
|
|
|
1411
1411
|
} else if (lang === "scss" || lang === "sass") {
|
|
1412
1412
|
result.code = resolveSassSync(source, filename);
|
|
1413
1413
|
}
|
|
1414
|
+
result.code = resolveImportExtensions(result.code);
|
|
1414
1415
|
return result;
|
|
1415
1416
|
}
|
|
1416
1417
|
function resolveLessSync(source, filename) {
|
|
@@ -1462,6 +1463,12 @@ function resolveSassSync(source, filename) {
|
|
|
1462
1463
|
const result = sass.compileString(source, options);
|
|
1463
1464
|
return result.css;
|
|
1464
1465
|
}
|
|
1466
|
+
function resolveImportExtensions(code) {
|
|
1467
|
+
if (code.includes(".less") || code.includes(".scss") || code.includes(".sass")) {
|
|
1468
|
+
return code.replaceAll(/\.(less|scss|sass)(?=['")])/g, ".css");
|
|
1469
|
+
}
|
|
1470
|
+
return code;
|
|
1471
|
+
}
|
|
1465
1472
|
|
|
1466
1473
|
// src/core/parse/sfc/process/resolve-styles.ts
|
|
1467
1474
|
function resolveStyles(descriptor, ctx, result) {
|
|
@@ -5094,7 +5101,7 @@ function transform(ast, ctx, options) {
|
|
|
5094
5101
|
}
|
|
5095
5102
|
|
|
5096
5103
|
// package.json
|
|
5097
|
-
var version = "1.1.
|
|
5104
|
+
var version = "1.1.1";
|
|
5098
5105
|
var bin = {
|
|
5099
5106
|
vureact: "./bin/vureact.js"
|
|
5100
5107
|
};
|
package/lib/cli.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @vureact/compiler-core v1.1.
|
|
3
|
+
* @vureact/compiler-core v1.1.1
|
|
4
4
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
calcElapsedTime,
|
|
13
13
|
normalizePath,
|
|
14
14
|
version
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2ESB4I6I.esm.js";
|
|
16
16
|
|
|
17
17
|
// src/cli/index.ts
|
|
18
18
|
import { cac } from "cac";
|
package/lib/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict"; function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
3
|
-
* @vureact/compiler-core v1.1.
|
|
3
|
+
* @vureact/compiler-core v1.1.1
|
|
4
4
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkGWLPQNHNjs = require('./chunk-GWLPQNHN.js');
|
|
16
16
|
|
|
17
17
|
// src/cli/index.ts
|
|
18
18
|
var _cac = require('cac');
|
|
@@ -28,7 +28,7 @@ async function resolveAction(root, options) {
|
|
|
28
28
|
const projectRoot = root ? _path2.default.resolve(process.cwd(), root) : process.cwd();
|
|
29
29
|
const userConfig = await loadUserConfig(projectRoot);
|
|
30
30
|
const finalConfig = mergeConfig(projectRoot, options, userConfig);
|
|
31
|
-
const compiler = new (0,
|
|
31
|
+
const compiler = new (0, _chunkGWLPQNHNjs.VuReact)(finalConfig);
|
|
32
32
|
await compiler.execute();
|
|
33
33
|
if (finalConfig.watch) {
|
|
34
34
|
setupWatcher(compiler, finalConfig);
|
|
@@ -82,7 +82,7 @@ function mergeConfig(projectRoot, options, userConfig) {
|
|
|
82
82
|
}
|
|
83
83
|
function setupWatcher(compiler, config) {
|
|
84
84
|
const spinner = _ora2.default.call(void 0, );
|
|
85
|
-
const cmpHelper = new (0,
|
|
85
|
+
const cmpHelper = new (0, _chunkGWLPQNHNjs.Helper)(config);
|
|
86
86
|
const watcher = _chokidar2.default.watch(cmpHelper.getInputPath(), {
|
|
87
87
|
ignored: cmpHelper.getExcludes(),
|
|
88
88
|
persistent: true,
|
|
@@ -117,7 +117,7 @@ function setupWatcher(compiler, config) {
|
|
|
117
117
|
const fn = processors[ext];
|
|
118
118
|
const unit = await fn(filePath);
|
|
119
119
|
cmpHelper.printCoreLogs();
|
|
120
|
-
cmpHelper.printCompileInfo(filePath,
|
|
120
|
+
cmpHelper.printCompileInfo(filePath, _chunkGWLPQNHNjs.calcElapsedTime.call(void 0, startTime));
|
|
121
121
|
if (unit) {
|
|
122
122
|
await _optionalChain([config, 'access', _11 => _11.onChange, 'optionalCall', _12 => _12(event, unit)]);
|
|
123
123
|
}
|
|
@@ -126,7 +126,7 @@ function setupWatcher(compiler, config) {
|
|
|
126
126
|
await compiler.processAsset(filePath);
|
|
127
127
|
cmpHelper.print(
|
|
128
128
|
_kleur2.default.blue("Copied Asset"),
|
|
129
|
-
_kleur2.default.dim(
|
|
129
|
+
_kleur2.default.dim(_chunkGWLPQNHNjs.normalizePath.call(void 0, cmpHelper.relativePath(filePath)))
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
132
|
spinner.stop();
|
|
@@ -139,7 +139,7 @@ function setupWatcher(compiler, config) {
|
|
|
139
139
|
await compiler.removeOutputPath(filePath, type2);
|
|
140
140
|
cmpHelper.print(
|
|
141
141
|
_kleur2.default.yellow("Removed"),
|
|
142
|
-
_kleur2.default.dim(
|
|
142
|
+
_kleur2.default.dim(_chunkGWLPQNHNjs.normalizePath.call(void 0, cmpHelper.relativePath(filePath)))
|
|
143
143
|
);
|
|
144
144
|
};
|
|
145
145
|
if (type === "unlink") {
|
|
@@ -173,7 +173,7 @@ function resolveOptions(command) {
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
// src/cli/index.ts
|
|
176
|
-
var [programName] = Object.keys(
|
|
176
|
+
var [programName] = Object.keys(_chunkGWLPQNHNjs.bin);
|
|
177
177
|
var cli = _cac.cac.call(void 0, programName);
|
|
178
178
|
var buildCommand = cli.command("build [root]", "Compile Vue3 to React (one-time)");
|
|
179
179
|
resolveOptions(buildCommand).action((root, options) => {
|
|
@@ -183,4 +183,4 @@ var watchCommand = cli.command("watch [root]", "Compile Vue3 to React and watch
|
|
|
183
183
|
resolveOptions(watchCommand).action((root, options) => {
|
|
184
184
|
resolveAction(root, { ...options, watch: true });
|
|
185
185
|
});
|
|
186
|
-
cli.help().version(
|
|
186
|
+
cli.help().version(_chunkGWLPQNHNjs.version).parse();
|
package/lib/compiler-core.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vureact/compiler-core v1.1.
|
|
2
|
+
* @vureact/compiler-core v1.1.1
|
|
3
3
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
parseOnlyScript,
|
|
19
19
|
parseSFC,
|
|
20
20
|
transform
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2ESB4I6I.esm.js";
|
|
22
22
|
export {
|
|
23
23
|
BaseCompiler,
|
|
24
24
|
CacheKey,
|
package/lib/compiler-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* @vureact/compiler-core v1.1.
|
|
2
|
+
* @vureact/compiler-core v1.1.1
|
|
3
3
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkGWLPQNHNjs = require('./chunk-GWLPQNHN.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -33,4 +33,4 @@ var _chunkP26R53VOjs = require('./chunk-P26R53VO.js');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
exports.BaseCompiler =
|
|
36
|
+
exports.BaseCompiler = _chunkGWLPQNHNjs.BaseCompiler; exports.CacheKey = _chunkGWLPQNHNjs.CacheKey; exports.FileCompiler = _chunkGWLPQNHNjs.FileCompiler; exports.Helper = _chunkGWLPQNHNjs.Helper; exports.VuReact = _chunkGWLPQNHNjs.VuReact; exports.defineConfig = _chunkGWLPQNHNjs.defineConfig; exports.generate = _chunkGWLPQNHNjs.generate; exports.generateComponent = _chunkGWLPQNHNjs.generateComponent; exports.generateOnlyScript = _chunkGWLPQNHNjs.generateOnlyScript; exports.parse = _chunkGWLPQNHNjs.parse; exports.parseOnlyScript = _chunkGWLPQNHNjs.parseOnlyScript; exports.parseSFC = _chunkGWLPQNHNjs.parseSFC; exports.transform = _chunkGWLPQNHNjs.transform;
|
package/package.json
CHANGED