From 5a8c8639af534288e35b48bcdc74e1b7cf734f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6nnemann?= Date: Wed, 10 Jun 2015 15:23:55 -0700 Subject: [PATCH] chore(package): add build-step --- .gitignore | 4 ++++ .npmignore | 9 +++++++++ package.json | 6 ++++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .npmignore diff --git a/.gitignore b/.gitignore index f1185067..ac1ff97c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# common node_modules *.log .tmp + +# build-artifacts +dist diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..8f8a5d6a --- /dev/null +++ b/.npmignore @@ -0,0 +1,9 @@ +# common +node_modules +*.log +.tmp + +# source/config +src +*.yml +.gitignore diff --git a/package.json b/package.json index ff946c89..09252f93 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "version" ], "license": "MIT", - "main": "index.js", + "main": "dist/main.js", "optionalDependencies": { "babel": "^5.5.6" }, @@ -64,8 +64,10 @@ "url": "https://github.com/boennemann/semantic-release.git" }, "scripts": { + "build": "rm -rf dist && mkdir -p dist && babel src --out-dir dist", "postpublish": "./bin/semantic-release.js post", - "prepublish": "./bin/semantic-release.js pre", + "prepublish": "npm run build && ./bin/semantic-release.js pre", + "pretest": "npm run build", "test": "./bin/test", "test:integration": "node tests | tap-spec", "test:style": "standard"