Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Make library tree-shakeable
Browse files Browse the repository at this point in the history
  • Loading branch information
arnemolland committed Aug 8, 2021
1 parent db98e06 commit a9bb724
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
25 changes: 15 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "@gameflow-tv/flume",
"version": "0.1.8",
"version": "0.2.0",
"description": "React implementation of the Flume design system",
"main": "dist/index.js",
"module": "dist/index.es.js",
"module": "dist/index.js",
"files": [
"dist"
],
Expand Down Expand Up @@ -34,7 +33,11 @@
"pre-commit": "yarn format"
}
},
"dependencies": {
"dependencies": {},
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"styled-components": "^5.3.0",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-brands-svg-icons": "^5.15.4",
"@fortawesome/pro-light-svg-icons": "^5.15.4",
Expand All @@ -43,11 +46,6 @@
"@fortawesome/react-fontawesome": "^0.1.15",
"lodash": "^4.17.21"
},
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"styled-components": "^5.3.0"
},
"devDependencies": {
"@mdx-js/loader": "^1.6.22",
"@mdx-js/mdx": "^1.6.22",
Expand Down Expand Up @@ -92,6 +90,13 @@
"storybook": "^6.3.6",
"styled-components": "^5.3.0",
"ts-jest": "^27.0.4",
"typescript": "^4.3.5"
"typescript": "^4.3.5",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-brands-svg-icons": "^5.15.4",
"@fortawesome/pro-light-svg-icons": "^5.15.4",
"@fortawesome/pro-regular-svg-icons": "^5.15.4",
"@fortawesome/pro-solid-svg-icons": "^5.15.4",
"@fortawesome/react-fontawesome": "^0.1.15",
"lodash": "^4.17.21"
}
}
12 changes: 3 additions & 9 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,12 @@ import peerDepsExternal from "rollup-plugin-peer-deps-external"
import typescript from "@rollup/plugin-typescript"
import postcss from "rollup-plugin-postcss"

import pkg from "./package.json"

// eslint-disable-next-line import/no-anonymous-default-export
export default {
input: "./src/index.ts",
output: [
{
file: pkg.main,
format: "cjs",
sourcemap: true
},
{
file: pkg.module,
dir: "dist",
format: "esm",
sourcemap: true
}
Expand All @@ -27,5 +20,6 @@ export default {
commonjs(),
typescript(),
postcss()
]
],
preserveModules: true,
}
1 change: 1 addition & 0 deletions src/hooks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/hooks'

0 comments on commit a9bb724

Please sign in to comment.