From 0beca317a8f463c5c6f3b51e53dc662b2f6f2cb5 Mon Sep 17 00:00:00 2001 From: Jimmy Jia Date: Tue, 8 Mar 2016 16:45:33 -0500 Subject: [PATCH] Drop installing from GitHub --- npm-scripts/postinstall.js | 27 --------------------------- package.json | 4 +--- 2 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 npm-scripts/postinstall.js 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",