From ec15a1421c6f87359edf1c55501ea1151644c601 Mon Sep 17 00:00:00 2001 From: Luis Merino Date: Wed, 30 May 2018 15:17:48 +0200 Subject: [PATCH] Changed 'build-cjs' output dir to 'cjs' folder To avoid committing files by mistake we have to add them to .gitignore. It's less difficult when we can ignore the 'umd' and 'cjs' folders, instead of polluting the root dir with compiled files. In addition, we no longer include all default files, which was making CONTIRBUTING.md part of the tarball downloaded by NPM on each install. --- .gitignore | 5 +++++ package.json | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3dc8f1c..93f053a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ +.DS_Store +npm-debug.log +.npmrc +node_modules umd +cjs \ No newline at end of file diff --git a/package.json b/package.json index 8ac9f99..3684785 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "license": "MIT", "scripts": { "build": "node ./scripts/build.js", - "build-cjs": "babel ./modules -d . --ignore '__tests__'", + "build-cjs": "babel modules -d ./cjs --ignore '__tests__'", "build-umd": "webpack modules/index.js umd/react-history.js", "build-min": "webpack -p modules/index.js umd/react-history.min.js", "prepublish": "node ./scripts/build.js", @@ -15,6 +15,8 @@ "test": "npm run lint && karma start", "lint": "eslint modules" }, + "files": ["umd", "cjs"], + "main": "cjs/index.js", "dependencies": { "history": "^4.5.0", "prop-types": "^15.6.0"