Skip to content

Commit

Permalink
chore: 类型调整
Browse files Browse the repository at this point in the history
  • Loading branch information
caijf committed Oct 14, 2022
1 parent 50bdfc0 commit 9009abc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"build:dist": "rm -rf dist && rollup -c",
"build:doc": "npm run doc",
"doc": "rm -rf docs && jsdoc -c conf.json",
"open:doc": "open ./docs/index.html",
"doc:open": "open ./docs/index.html",
"prettier": "prettier --write 'src/**/*.js' && prettier --write 'test/**/*.js'",
"lint-staged": "lint-staged",
"lint-staged:js": "eslint --ext .js",
Expand All @@ -28,7 +28,7 @@
"lint:fix": "eslint src --ext .js --fix",
"commit": "cz",
"prepublishOnly": "npm test && npm run build",
"types": "tsc"
"types": "rm -rf types && tsc"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -99,4 +99,4 @@
"dependencies": {
"@babel/runtime": "^7.14.0"
}
}
}
2 changes: 2 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function toCamel(str) {

const globalVarName = toCamel(pkg.name);

// TODO cjs/es/types 使用 rollup 构建

export default {
input: './src/index.js',
output: [
Expand Down
1 change: 1 addition & 0 deletions src/utils/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-ignore
import { version } from '../../package.json';

const config = {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./types", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
// "removeComments": true, /* Do not emit comments to output. */
Expand Down

0 comments on commit 9009abc

Please sign in to comment.