浏览代码

Update build config

Export declaration files from TypeScript.
tags/0.3.0
父节点
当前提交
f38b649632
共有 4 个文件被更改,包括 17 次插入23 次删除
  1. +7
    -4
      .npmignore
  2. +6
    -3
      package.json
  3. +1
    -15
      rollup.config.js
  4. +3
    -1
      tsconfig.json

+ 7
- 4
.npmignore 查看文件

@@ -1,14 +1,17 @@
.storybook/
coverage/
docs/
lib/
plop/
utilities/
.babelrc
.env
.env.example
lib/index.stories.ts
.editorconfig
.prettierrc
doczrc.js
global.d.ts
jest.config.js
jest.setup.ts
plopfile.js
rollup.config.js
tsconfig.json
yarn.lock
**/*.test.d.ts

+ 6
- 3
package.json 查看文件

@@ -2,8 +2,10 @@
"name": "@tesseract-design/react-common",
"version": "0.0.0",
"description": "Common front-end components for Web using the Tesseract design system, written in React.",
"main": "dist/bundle.cjs.js",
"module": "dist/bundle.esm.js",
"directories": {
"lib": "dist"
},
"main": "dist/index.js",
"repository": "https://code.modal.sh/tesseract-design/react-common.git",
"author": "TheoryOfNekomata <allan.crisostomo@outlook.com>",
"license": "UNLICENSED",
@@ -50,5 +52,6 @@
"react-dom": "16.13.1",
"react-feather": "2.0.3",
"styled-components": "5.1.0"
}
},
"homepage": "https://make.modal.sh/tesseract/web/react/common"
}

+ 1
- 15
rollup.config.js 查看文件

@@ -10,7 +10,7 @@ export default [
{
input: ENTRY_POINT,
output: {
file: pkg.main,
dir: pkg.directories.lib,
format: 'cjs',
},
plugins: [
@@ -21,18 +21,4 @@ export default [
process.env.NODE_ENV === 'production' && terser(),
],
},
{
input: ENTRY_POINT,
output: {
file: pkg.module,
format: 'esm',
},
plugins: [
peerDepsExternal({
includeDependencies: true,
}),
typescript(),
process.env.NODE_ENV === 'production' && terser(),
],
},
]

+ 3
- 1
tsconfig.json 查看文件

@@ -17,7 +17,9 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
"jsx": "react",
"declaration": true,
"declarationDir": "./dist"
},
"exclude": [
"node_modules"


正在加载...
取消
保存