mirror of
https://github.com/alexgo-io/clarity-codegen.git
synced 2026-01-12 06:24:19 +08:00
chore: add esm support
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
node_modules
|
||||
lib
|
||||
dist
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
"name": "clarity-codegen",
|
||||
"version": "0.2.6",
|
||||
"main": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"lib/"
|
||||
"lib/",
|
||||
"dist/"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
@@ -12,7 +14,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "pnpm run build",
|
||||
"build": "rm -rf lib && tsc -p tsconfig.json"
|
||||
"build": "rm -rf lib && tsc -p tsconfig.json && tsc -p tsconfig.cjs.json"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@stacks/transactions": "^6.5.2",
|
||||
|
||||
9
tsconfig.cjs.json
Normal file
9
tsconfig.cjs.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
||||
"module": "commonjs" /* Specify what module code is generated. */,
|
||||
"declaration": false /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
|
||||
"outDir": "./lib" /* Specify an output folder for all emitted files. */,
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
||||
|
||||
/* Language and Environment */
|
||||
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
||||
"target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
||||
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
||||
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
||||
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
||||
@@ -24,9 +24,9 @@
|
||||
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
|
||||
/* Modules */
|
||||
"module": "commonjs" /* Specify what module code is generated. */,
|
||||
"module": "ESNext" /* Specify what module code is generated. */,
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
"moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
@@ -47,7 +47,7 @@
|
||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
||||
"outDir": "./lib" /* Specify an output folder for all emitted files. */,
|
||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
||||
// "removeComments": true, /* Disable emitting comments. */
|
||||
// "noEmit": true, /* Disable emitting files from a compilation. */
|
||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||
|
||||
Reference in New Issue
Block a user