diff --git a/npm-scripts/postinstall.js b/npm-scripts/postinstall.js deleted file mode 100644 index a8d3e2dbf6..0000000000 --- a/npm-scripts/postinstall.js +++ /dev/null @@ -1,27 +0,0 @@ -var stat = require('fs').stat - -stat('lib', function (error, stat) { - if (error || !stat.isDirectory()) { - console.warn( - '-'.repeat(79) + '\n' + -'Built output not found. It looks like you might be attempting to install React\n' + -'Router from GitHub. React Router sources need to be transpiled before use. We\n'+ -'will now make a best-efforts attempt to transpile the code. This will only work\n' + -'if your development environment is set up appropriately.\n' + - '-'.repeat(79) - ) - - try { - var execSync = require('child_process').execSync - execSync('npm run build', { stdio: [ 0, 1, 2 ] }) - } catch (e) { - console.error( - '-'.repeat(79) + '\n' + -'Failed to build React Router automatically. Please install React Router from\n' + -'npm, or clone the repo locally and build the library manually.\n' + - '-'.repeat(79) - ) - throw(e) - } - } -}) diff --git a/package.json b/package.json index 61424d326e..e51e436823 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "es6", "lib", "modules/*.js", - "npm-scripts", "umd" ], "main": "lib/index", @@ -26,8 +25,7 @@ "start": "node examples/server.js", "test": "npm run lint && npm run test-node && npm run test-browser", "test-browser": "karma start", - "test-node": "mocha --compilers js:babel-core/register tests.node.js", - "postinstall": "node ./npm-scripts/postinstall.js" + "test-node": "mocha --compilers js:babel-core/register tests.node.js" }, "authors": [ "Ryan Florence",