Skip to content
Permalink
Browse files

Use @pika/pack to build and publish the package (#29)

  • Loading branch information...
ghengeveld committed Mar 3, 2019
1 parent 439163d commit 3fa5e14a063f562524b5d057950d27e44051456c
Showing with 49 additions and 25 deletions.
  1. +8 −3 .babelrc
  2. +1 −1 .gitignore
  3. +40 −21 package.json
  4. 0 {typings → src}/index.d.ts
@@ -1,5 +1,10 @@
{
"presets": [["env", { "loose": true }], "react"],
"plugins": ["transform-object-rest-spread"],
"ignore": ["node_modules", "stories.js"]
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": ["@babel/plugin-proposal-object-rest-spread"],
"ignore": ["node_modules", "stories.js"],
"env": {
"test": {
"plugins": ["@babel/plugin-transform-runtime"]
}
}
}
@@ -1,4 +1,4 @@
lib/
pkg/
node_modules/
coverage/
package-lock.json
@@ -6,7 +6,8 @@
"react",
"async",
"promise",
"loader"
"fetch",
"hook"
],
"author": "Gert Hengeveld <info@ghengeveld.nl>",
"license": "ISC",
@@ -18,23 +19,17 @@
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"main": "lib/index.js",
"typings": "typings/index.d.ts",
"files": [
"lib",
"src",
"typings"
],
"scripts": {
"build": "rimraf lib && babel src -d lib --ignore '**/*spec.js'",
"lint": "eslint src",
"test": "jest src/Async.spec.js --collectCoverageFrom=src/Async.js",
"test": "jest src/Async.spec.js --collectCoverageFrom=src/Async.js",
"test:hook": "jest src/useAsync.spec.js --collectCoverageFrom=src/useAsync.js",
"test:watch": "npm run test -- --watch",
"test:compat": "npm run test:backwards && npm run test:forwards && npm run test:latest",
"test:backwards": "npm i react@16.3.1 react-dom@16.3.1 --no-save && npm test",
"test:forwards": "npm i react@next react-dom@next --no-save && npm test && npm run test:hook",
"test:latest": "npm i react@latest react-dom@latest --no-save && npm test && npm run test:hook",
"build": "pack build",
"publish": "pack publish",
"prepublishOnly": "npm run lint && npm run test:compat && npm run build"
},
"dependencies": {},
@@ -45,29 +40,53 @@
"prop-types": ">=15.5.7"
},
"devDependencies": {
"babel-cli": "6.26.0",
"babel-core": "6.26.3",
"@babel/plugin-proposal-object-rest-spread": "7.3.4",
"@babel/plugin-transform-runtime": "7.2.0",
"@babel/preset-env": "7.3.1",
"@babel/preset-react": "7.0.0",
"@pika/plugin-build-node": "0.3.12",
"@pika/plugin-build-types": "0.3.12",
"@pika/plugin-build-web": "0.3.12",
"@pika/plugin-standard-pkg": "0.3.12",
"babel-eslint": "10.0.1",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"babel-preset-env": "1.7.0",
"babel-preset-react": "6.24.1",
"babel-jest": "24.1.0",
"eslint": "5.11.1",
"eslint-config-prettier": "3.3.0",
"eslint-plugin-jest": "22.1.2",
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-promise": "4.0.1",
"eslint-plugin-react": "7.12.0",
"eslint-plugin-react-hooks": "1.0.1",
"jest": "23.6.0",
"jest-dom": "2.1.0",
"jest": "24.1.0",
"jest-dom": "3.1.2",
"prettier": "1.15.3",
"react": "16.8.1",
"react-dom": "16.8.1",
"react-testing-library": "5.5.3",
"rimraf": "2.6.2"
"react-testing-library": "5.5.3"
},
"jest": {
"coverageDirectory": "./coverage/",
"collectCoverage": true
"collectCoverage": true,
"coverageDirectory": "./coverage/"
},
"@pika/pack": {
"pipeline": [
[
"@pika/plugin-standard-pkg",
{
"exclude": [
"*.spec.js"
]
}
],
[
"@pika/plugin-build-node"
],
[
"@pika/plugin-build-web"
],
[
"@pika/plugin-build-types"
]
]
}
}
File renamed without changes.

0 comments on commit 3fa5e14

Please sign in to comment.
You can’t perform that action at this time.