Bladeren bron

Update build structure

Make TypeScript recognize types.
tags/0.3.0
TheoryOfNekomata 4 jaren geleden
bovenliggende
commit
0dc8d65446
4 gewijzigde bestanden met toevoegingen van 39 en 35 verwijderingen
  1. +17
    -0
      index.ts
  2. +0
    -17
      lib/index.ts
  3. +15
    -16
      rollup.config.js
  4. +7
    -2
      tsconfig.json

+ 17
- 0
index.ts Bestand weergeven

@@ -0,0 +1,17 @@
import Button from './lib/components/Button/Button'
import Checkbox from './lib/components/Checkbox/Checkbox'
import Icon from './lib/components/Icon/Icon'
import RadioButton from './lib/components/RadioButton/RadioButton'
import Select from './lib/components/Select/Select'
import Slider from './lib/components/Slider/Slider'
import TextInput from './lib/components/TextInput/TextInput'

export {
Button,
Checkbox,
Icon,
RadioButton,
Select,
Slider,
TextInput,
}

+ 0
- 17
lib/index.ts Bestand weergeven

@@ -1,17 +0,0 @@
import Button from './components/Button/Button'
import Checkbox from './components/Checkbox/Checkbox'
import Icon from './components/Icon/Icon'
import RadioButton from './components/RadioButton/RadioButton'
import Select from './components/Select/Select'
import Slider from './components/Slider/Slider'
import TextInput from './components/TextInput/TextInput'

export {
Button,
Checkbox,
Icon,
RadioButton,
Select,
Slider,
TextInput,
}

+ 15
- 16
rollup.config.js Bestand weergeven

@@ -4,21 +4,20 @@ import typescript from '@rollup/plugin-typescript'

import pkg from './package.json'

const ENTRY_POINT = './lib/index.ts'
const ENTRY_POINT = './index.ts'

export default [
{
input: ENTRY_POINT,
output: {
dir: pkg.directories.lib,
format: 'cjs',
},
plugins: [
peerDepsExternal({
includeDependencies: true,
}),
typescript(),
process.env.NODE_ENV === 'production' && terser(),
],
export default {
input: ENTRY_POINT,
output: {
dir: pkg.directories.lib,
format: 'cjs',
sourcemap: true,
},
]
plugins: [
peerDepsExternal({
includeDependencies: true,
}),
typescript(),
process.env.NODE_ENV === 'production' && terser(),
],
}

+ 7
- 2
tsconfig.json Bestand weergeven

@@ -19,9 +19,14 @@
"noEmit": true,
"jsx": "react",
"declaration": true,
"declarationDir": "./dist"
"declarationDir": "./dist",
"sourceMap": true
},
"exclude": [
"node_modules"
"node_modules",
"**/*.test.ts",
"**/*.test.tsx",
"utilities/**/*",
"jest.setup.ts"
]
}

Laden…
Annuleren
Opslaan