Skip to content

Commit

Permalink
Use prepublishOnly to prevent running the build during install
Browse files Browse the repository at this point in the history
  • Loading branch information
MICHAEL JACKSON committed Feb 1, 2018
1 parent b3f0778 commit f147077
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -23,7 +23,7 @@
"scripts": {
"start": "webpack-dev-server -d --content-base ./ --history-api-fallback --inline modules/index.js",
"build": "node ./tools/build.js",
"prepublish": "node ./tools/build.js",
"prepublishOnly": "node ./tools/build.js",
"clean": "git clean -fdX .",
"lint": "eslint modules",
"test": "karma start --single-run"
Expand All @@ -48,7 +48,6 @@
"eslint-plugin-import": "^2.0.0",
"expect": "^21.0.0",
"gzip-size": "^3.0.0",
"in-publish": "^2.0.0",
"jest-mock": "^21.0.0",
"karma": "^1.2.0",
"karma-browserstack-launcher": "^1.0.1",
Expand Down
4 changes: 0 additions & 4 deletions tools/build.js
@@ -1,12 +1,8 @@
const fs = require('fs')
const execSync = require('child_process').execSync
const inInstall = require('in-publish').inInstall
const prettyBytes = require('pretty-bytes')
const gzipSize = require('gzip-size')

if (inInstall())
process.exit(0)

const exec = (command, extraEnv) =>
execSync(command, {
stdio: 'inherit',
Expand Down
4 changes: 0 additions & 4 deletions yarn.lock
Expand Up @@ -2120,10 +2120,6 @@ imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"

in-publish@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51"

indexof@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
Expand Down

0 comments on commit f147077

Please sign in to comment.