Skip to content

Commit

Permalink
Add cjs build
Browse files Browse the repository at this point in the history
  • Loading branch information
zackify committed Jun 13, 2019
1 parent 3c8289e commit e354f5a
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
lib
lib
cjs
46 changes: 45 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "react-use-upload",
"version": "0.5.0",
"version": "0.5.1",
"description": "",
"main": "lib/index.js",
"scripts": {
"test": "tsc",
"build": "npx babel src --out-dir lib --extensions \".ts,.tsx\" && npm run create-types",
"build": "npx babel src --out-dir lib --extensions \".ts,.tsx\" && npx babel --plugins @babel/plugin-transform-modules-commonjs src --out-dir cjs --extensions \".ts,.tsx\" && npm run create-types",
"create-types": "tsc --emitDeclarationOnly",
"watch": "npx babel --watch src --out-dir lib",
"example-server": "node -r esm ./example/server.js"
Expand All @@ -15,6 +15,7 @@
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/plugin-transform-modules-commonjs": "^7.4.4",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.3",
"@types/react": "^16.8.19",
Expand Down

0 comments on commit e354f5a

Please sign in to comment.