From 5083c31c8d8653c24b311e117412dc85a9cf018e Mon Sep 17 00:00:00 2001 From: Dan Pantry Date: Sat, 26 Sep 2015 23:54:39 +0100 Subject: [PATCH] transpile with Babel prior to publishing to npm This enables Node environments to use require('formsy-react') instead of having to transpile it themselves --- .gitignore | 1 + package.json | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f03556e..15d5043 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store build node_modules +lib diff --git a/package.json b/package.json index b125879..90705f4 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,13 @@ "type": "git", "url": "https://github.com/christianalfoni/formsy-react.git" }, - "main": "src/main.js", + "main": "lib/main.js", "scripts": { "start": "webpack-dev-server --content-base build", "deploy": "NODE_ENV=production webpack -p --config webpack.production.config.js", "test": "node testrunner", - "examples": "webpack-dev-server --config examples/webpack.config.js --content-base examples" + "examples": "webpack-dev-server --config examples/webpack.config.js --content-base examples", + "prepublish": "babel ./src/ -d ./lib/" }, "author": "Christian Alfoni", "license": "MIT",