lvyjs 0.1.3 → 0.1.4
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/bin/index.js +13 -11
- package/lib/loader/store.js +6 -1
- package/lib/main.js +2 -2
- package/lib/plugins/loader-css.d.ts +1 -8
- package/lib/plugins/loader-files.d.ts +1 -8
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -12,17 +12,18 @@ if (args.includes('build')) {
|
|
|
12
12
|
const jsFile = join(currentDirPath, '../lib/index.js')
|
|
13
13
|
const jsdir = relative(process.cwd(), jsFile)
|
|
14
14
|
const argsx = args.filter(arg => arg !== 'build')
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
15
|
+
let tsxDir = join(currentDirPath, '../../tsx/dist/cli.mjs')
|
|
16
|
+
console.log('tsxDir', tsxDir)
|
|
17
|
+
if (!existsSync(tsxDir)) {
|
|
18
|
+
tsxDir = join(currentDirPath, '../node_modules/tsx/dist/cli.mjs')
|
|
19
|
+
}
|
|
20
|
+
const msg = fork(tsxDir, [jsdir, '--lvy-build', ...argsx], {
|
|
21
|
+
stdio: 'inherit',
|
|
22
|
+
env: Object.assign({}, process.env, {
|
|
23
|
+
PKG_DIR: pkgFilr
|
|
24
|
+
}),
|
|
25
|
+
shell: process.platform === 'win32'
|
|
26
|
+
})
|
|
26
27
|
if (msg.error) {
|
|
27
28
|
console.error(msg.error)
|
|
28
29
|
process.exit()
|
|
@@ -37,6 +38,7 @@ if (args.includes('build')) {
|
|
|
37
38
|
'--lvy-dev'
|
|
38
39
|
]
|
|
39
40
|
let tsxDir = join(currentDirPath, '../../tsx/dist/cli.mjs')
|
|
41
|
+
console.log('tsxDir', tsxDir)
|
|
40
42
|
if (!existsSync(tsxDir)) {
|
|
41
43
|
tsxDir = join(currentDirPath, '../node_modules/tsx/dist/cli.mjs')
|
|
42
44
|
}
|
package/lib/loader/store.js
CHANGED
package/lib/main.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { register } from 'node:module'
|
|
1
|
+
import { register } from 'node:module';
|
|
2
2
|
|
|
3
|
-
register('./loader.js', import.meta.url)
|
|
3
|
+
register('./loader.js', import.meta.url);
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { InputPluginOption } from 'rollup';
|
|
2
|
-
|
|
3
1
|
type RollupStylesCSSImportOptions = {
|
|
4
2
|
include?: RegExp;
|
|
5
3
|
};
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
declare const rollupStylesCSSImport: ({ include }?: RollupStylesCSSImportOptions) => InputPluginOption;
|
|
11
4
|
|
|
12
|
-
export {
|
|
5
|
+
export type { RollupStylesCSSImportOptions };
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { InputPluginOption } from 'rollup';
|
|
2
|
-
|
|
3
1
|
type RollupAssetsOptions = {
|
|
4
2
|
filter?: RegExp;
|
|
5
3
|
};
|
|
6
|
-
/**
|
|
7
|
-
* @param {Object} options
|
|
8
|
-
* @returns {Object}
|
|
9
|
-
*/
|
|
10
|
-
declare const rollupAssets: ({ filter }?: RollupAssetsOptions) => InputPluginOption;
|
|
11
4
|
|
|
12
|
-
export {
|
|
5
|
+
export type { RollupAssetsOptions };
|