feat: use types for css modules
This commit is contained in:
parent
8663e0d3bb
commit
afc6922bc7
@ -16,7 +16,7 @@ npm i -D esbuild-plugin-postcss2
|
||||
|
||||
## Usage
|
||||
|
||||
Add to the plugin to your esbuild plugins:
|
||||
Add the plugin to your esbuild plugins:
|
||||
|
||||
```js
|
||||
const esbuild = require("esbuild");
|
||||
|
||||
5
build.js
5
build.js
@ -13,9 +13,4 @@ const production = process.env.NODE_ENV === "production",
|
||||
outfile: `./dist/index${format === "cjs" ? "" : "." + format}.js`
|
||||
});
|
||||
}
|
||||
|
||||
copyFile("./src/modules.d.ts", "./dist/modules.d.ts", (err) => {
|
||||
if (err) throw err;
|
||||
console.log("[modules.d.ts] copied");
|
||||
});
|
||||
})();
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "NODE_ENV=production node build.js && tsc --emitDeclarationOnly",
|
||||
"build": "NODE_ENV=production node build.js",
|
||||
"dev": "NODE_ENV=development node build.js",
|
||||
"test": "yarn build && cd test && mocha 'index.js' --no-timeout --exit",
|
||||
"fmt": "prettier --write .",
|
||||
@ -20,11 +20,12 @@
|
||||
"pre-commit": "prettier --write . && git add -A"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
"dist",
|
||||
"src/modules.d.ts"
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.esm.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"types": "src/modules.d.ts",
|
||||
"dependencies": {
|
||||
"autoprefixer": "^10.2.4",
|
||||
"fs-extra": "^9.1.0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user