dctc 1.0.0 → 1.0.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.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
- # dctc(dctc)
2
- Dynamically compile TSX/TS files and execute them.
1
+ # dynamic-compile-tsx-commond(dctc)
2
+ Dynamically compile TSX/TS file and execute it.
3
3
 
4
4
  ## Usage
5
5
  ```
package/lib/complie_es.js CHANGED
@@ -6,7 +6,6 @@
6
6
  * @returns {Promise<string>} - The compiled code.
7
7
  * @author pipi
8
8
  */
9
-
10
9
  const fs = require('fs'); // Import the file system module
11
10
  const path = require('path'); // Import the path module
12
11
  const chalk = require("chalk");
@@ -27,13 +27,13 @@ module.exports = async function (filePath) {
27
27
  // Configure Vite build options
28
28
  const viteConfig = defineConfig({
29
29
  overrides: {
30
- fs: 'browserify-fs', // 替换 `fs` 模块
31
- path: 'path-browserify', // 替换 `path` 模块
32
- // 其他需要替换的模块
30
+ fs: 'browserify-fs', // Use browserify-fs for file system access
31
+ path: 'path-browserify', // Use path-browserify for path manipulation
32
+ // Add other overrides as needed
33
33
  },
34
34
  build: {
35
- target: 'node18', // Compile for Node.js environment
36
- format: 'cjs', // Output format as CommonJS
35
+ target: 'node18',
36
+ format: 'cjs',
37
37
  lib: {
38
38
  entry: absoluteFilePath, // Specify the entry file
39
39
  formats: ['cjs'], // Specify the output format
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dctc",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Dynamically compile TSX/TS files and execute them.",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "repository": {
20
20
  "type": "git",
21
- "url": "git+https://github.com/SteamedBread2333/dctc.git"
21
+ "url": "git+https://github.com/SteamedBread2333/dynamic-compile-tsx-commond.git"
22
22
  },
23
23
  "keywords": [
24
24
  "dynamically",
@@ -29,9 +29,9 @@
29
29
  "author": "pipi",
30
30
  "license": "MIT",
31
31
  "bugs": {
32
- "url": "https://github.com/SteamedBread2333/dctc/issues"
32
+ "url": "https://github.com/SteamedBread2333/dynamic-compile-tsx-commond/issues"
33
33
  },
34
- "homepage": "https://github.com/SteamedBread2333/dctc#readme",
34
+ "homepage": "https://github.com/SteamedBread2333/dynamic-compile-tsx-commond#readme",
35
35
  "dependencies": {
36
36
  "chalk": "^4.1.2",
37
37
  "commander": "^13.1.0",