Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import commonjs from 'rollup-plugin-commonjs'
import babel from 'rollup-plugin-babel'
import minify from 'rollup-plugin-babel-minify'
import postcss from 'rollup-plugin-postcss'
import dts from "rollup-plugin-dts"
import { name, version, dependencies, peerDependencies } from '../package.json'

const PATHS = {
Expand Down Expand Up @@ -124,9 +125,17 @@ const MinifiedUMDConfig = createBaseConfig(function(config) {
})
})

const TypescriptTypesConfig = {
input: path.resolve(__dirname, '..', 'types', 'shards-react.d.ts'),
output: [{ file: "dist/shards-react.d.ts", format: "es" }],
plugins: [dts()],
external: ['react']
}

module.exports = [
TypescriptTypesConfig,
CommonJSConfig,
ESModulesConfig,
UMDConfig,
MinifiedUMDConfig
MinifiedUMDConfig,
]
4 changes: 4 additions & 0 deletions components/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ class Dropdown extends React.Component {
}

Dropdown.propTypes = {
/**
* The class name.
*/
className: PropTypes.string,
/**
* Whether it is open, or not.
*/
Expand Down
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,29 @@
"path": "./dist/*.js"
}
],
"types": "dist/shards-react.d.ts",
"devDependencies": {
"@babel/preset-env": "^7.1.6",
"@babel/preset-react": "^7.0.0",
"@types/react": "^16.9.11",
"@wessberg/rollup-plugin-ts": "^1.1.78",
"bundlesize": "^0.17.0",
"eslint": "^5.9.0",
"eslint-plugin-react": "^7.11.1",
"prop-types": "^15.6.2",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"prop-types": "^15.6.2",
"rimraf": "^2.6.2",
"rollup": "^0.67.3",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-babel-minify": "^6.2.0",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-dts": "^1.1.12",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-postcss": "^1.6.3"
"rollup-plugin-postcss": "^1.6.3",
"rollup-plugin-typescript": "^1.0.1",
"tslib": "^1.10.0",
"typescript": "^3.7.2"
},
"dependencies": {
"bootstrap": "^4.1.3",
Expand Down
Loading