diff --git a/.gitignore b/.gitignore index 75704c6..8abcf6a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ *.sublime-workspace .DS_Store -build/ +dist/ node_modules npm-debug.log diff --git a/.npmignore b/.npmignore index 8c9eb1d..0de69fc 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,4 @@ *.sublime-* -build/*.zip +dist/*.zip img/ test/ diff --git a/d3-contour.sublime-project b/d3-contour.sublime-project index e90ab77..d28d4c7 100644 --- a/d3-contour.sublime-project +++ b/d3-contour.sublime-project @@ -3,7 +3,7 @@ { "path": ".", "file_exclude_patterns": ["*.sublime-workspace"], - "folder_exclude_patterns": ["build"] + "folder_exclude_patterns": ["dist"] } ], "build_systems": [ diff --git a/package.json b/package.json index 751959e..65c78fd 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "name": "Mike Bostock", "url": "http://bost.ocks.org/mike" }, - "main": "build/d3-contour.js", + "main": "dist/d3-contour.js", "module": "index", "jsnext:main": "index", "repository": { @@ -22,10 +22,10 @@ "url": "https://github.com/d3/d3-contour.git" }, "scripts": { - "pretest": "rm -rf build && mkdir build && rollup -c --banner \"$(preamble)\"", + "pretest": "rm -rf dist && mkdir dist && rollup -c --banner \"$(preamble)\"", "test": "tape 'test/**/*-test.js' && eslint index.js src", - "prepublish": "npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3-contour.js -c -m -o build/d3-contour.min.js", - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3-contour/build/d3-contour.js d3-contour.v1.js && cp ../d3-contour/build/d3-contour.min.js d3-contour.v1.min.js && git add d3-contour.v1.js d3-contour.v1.min.js && git commit -m \"d3-contour ${npm_package_version}\" && git push && cd - && zip -j build/d3-contour.zip -- LICENSE README.md build/d3-contour.js build/d3-contour.min.js" + "prepublishOnly": "npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" dist/d3-contour.js -c -m -o dist/d3-contour.min.js", + "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3-contour/dist/d3-contour.js d3-contour.v1.js && cp ../d3-contour/dist/d3-contour.min.js d3-contour.v1.min.js && git add d3-contour.v1.js d3-contour.v1.min.js && git commit -m \"d3-contour ${npm_package_version}\" && git push && cd - && zip -j dist/d3-contour.zip -- LICENSE README.md dist/d3-contour.js dist/d3-contour.min.js" }, "devDependencies": { "eslint": "4", diff --git a/rollup.config.js b/rollup.config.js index 7ce337f..c3f4f85 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -6,7 +6,7 @@ export default { external: dependencies, output: { extend: true, - file: `build/${definition.name}.js`, + file: `dist/${definition.name}.js`, format: "umd", globals: dependencies.reduce((p, v) => (p[v] = "d3", p), {}), name: "d3"