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 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
- const msg = fork(
16
- join(currentDirPath, '../../tsx/dist/cli.mjs'),
17
- [jsdir, '--lvy-build', ...argsx],
18
- {
19
- stdio: 'inherit',
20
- env: Object.assign({}, process.env, {
21
- PKG_DIR: pkgFilr
22
- }),
23
- shell: process.platform === 'win32'
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
  }
@@ -28,5 +28,10 @@ const initConfig = async () => {
28
28
  }
29
29
  }
30
30
  };
31
+ /**
32
+ * @param param0
33
+ * @returns
34
+ */
35
+ const defineConfig = (optoins) => optoins;
31
36
 
32
- export { initConfig };
37
+ export { defineConfig, initConfig };
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 { type RollupStylesCSSImportOptions, rollupStylesCSSImport };
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 { type RollupAssetsOptions, rollupAssets };
5
+ export type { RollupAssetsOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lvyjs",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "tsx compile script",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",