chore(build): skip test files from bundle and output cjs in cjs folder

This commit is contained in:
Simone Busoli 2019-11-08 00:40:50 +01:00
parent 8cf1f747c5
commit 5f32d1749f
2 changed files with 8 additions and 8 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
es
lib
cjs
node_modules
npm-debug.log*
src/index.d.ts

View File

@ -12,20 +12,20 @@
"homepage": "https://github.com/simoneb/axios-hooks",
"repository": "simoneb/axios-hooks",
"bugs": "https://github.com/simoneb/axios-hooks/issues",
"main": "lib/index.js",
"main": "cjs/index.js",
"module": "es/index.js",
"typings": "./index.d.ts",
"files": [
"lib",
"es",
"src",
"index.d.ts"
"cjs/",
"es/",
"src/index.js",
"./index.d.ts"
],
"scripts": {
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src/index.js --out-dir lib",
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src/index.js --out-dir cjs",
"build:es": "babel src/index.js --out-dir es",
"build": "run-p build:*",
"clean": "rimraf lib es coverage",
"clean": "rimraf cjs es coverage",
"format": "prettier --write \"src/**/*.{js,md,ts}\"",
"lint": "eslint src",
"prepare": "npm run clean && npm run build",