From f4224ad3eb14b12e8840c773ddb07a600e7e55cf Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 2 Jan 2018 03:17:07 -0500 Subject: [PATCH] add compile script --- .gitignore | 2 ++ .npmignore | 6 ++++++ package.json | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .npmignore diff --git a/.gitignore b/.gitignore index 3c3629e6..f39528b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ +es +lib node_modules diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..876e5a28 --- /dev/null +++ b/.npmignore @@ -0,0 +1,6 @@ +.babelrc +.eslintrc.json +jest.setup.js +node_modules +src +__tests__ diff --git a/package.json b/package.json index bc9a18f6..90c94c41 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,11 @@ "react-dom": "^16.2.0" }, "scripts": { - "test": "jest" + "test": "jest", + "compile": "npm run compile:commonjs && npm run compile:es", + "compile:commonjs": "babel src --out-dir lib", + "compile:es": "babel src --out-dir es", + "prepublish": "npm run compile" }, "jest": { "setupTestFrameworkScriptFile": "/jest.setup.js",