From e365e5196b48540b5c95d15b42b70cf4defd78ae Mon Sep 17 00:00:00 2001 From: Paul Armstrong Date: Wed, 11 Jan 2017 08:21:53 -0800 Subject: [PATCH] Point package main to babel, non-rollup files Closes gh-213 --- CHANGELOG.md | 6 ++++++ package.json | 5 +++-- rollup.config.js | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa7c9e25..f77de02d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v3.1.0 + +* **Added** `denormalize`. (gh-214) +* **Changed** No longer requires all input in a polymorphic schema (`Array`, `Union`, `Values`) have a matching schema definition. (gh-208) +* **Changed** Builds do both rollup and plain babel file conversions. `"main"` property in package.json points to babel-converted files. + # v3.0.0 The entire normalizr package has been rewritten from v2.x for this version. Please refer to the [documentation](/docs) for all changes. diff --git a/package.json b/package.json index ff22ae15..c89a4a09 100644 --- a/package.json +++ b/package.json @@ -23,12 +23,13 @@ "LICENSE", "README.md" ], - "main": "dist/index.js", + "main": "dist/src/index.js", "typings": "index.d.ts", "scripts": { - "build": "npm run clean && mkdirp dist && npm-run-all --parallel build:development build:production", + "build": "npm run clean && mkdirp dist && npm-run-all --parallel build:development build:production build:node", "build:development": "NODE_ENV=development rollup -c", "build:production": "NODE_ENV=production rollup -c", + "build:node": "babel src/*.js -d dist && babel src/schemas/*.js -d dist", "clean": "rimraf dist", "flow": "flow src; test $? -eq 0 -o $? -eq 2", "lint": "eslint ./ --fix", diff --git a/rollup.config.js b/rollup.config.js index 364bf187..8236c6e7 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -3,7 +3,7 @@ import filesize from 'rollup-plugin-filesize'; import uglify from 'rollup-plugin-uglify'; const isProduction = process.env.NODE_ENV === 'production'; -const dest = `dist/index${isProduction ? '.min' : ''}.js`; +const dest = `dist/normalizr${isProduction ? '.min' : ''}.js`; export default { entry: 'src/index.js',