瀏覽代碼

Update build config

Export declaration files from TypeScript.
tags/0.3.0
TheoryOfNekomata 4 年之前
父節點
當前提交
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"


Loading…
取消
儲存