Sha256: 72f3f2eb00287e69d6eec0f6181f9291e5140e3c096c5dd462cd1298a72015b1

Contents?: true

Size: 425 Bytes

Versions: 92

Compression:

Stored size: 425 Bytes

Contents

const cp = require('child_process')
const chalk = require('chalk')

cp.exec('git diff --name-only dist/', (err, stdout) => {
  if (err) {
    console.log(chalk.red('ERROR:'), err)
    return process.exit(1)
  }
  if (stdout.toString().length) {
    console.log(chalk.red('ERROR:'), 'There are unstaged changes in `dist/` after running `npm run build`. Please commit them.')
    return process.exit(1)
  }
  process.exit()
})

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
govuk_publishing_components-17.21.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.20.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.19.1 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.19.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.18.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.17.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.16.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.15.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.14.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.13.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.12.2 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.12.1 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.12.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.11.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.10.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.9.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.8.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.7.0 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.6.1 node_modules/accessible-autocomplete/scripts/check-staged.js
govuk_publishing_components-17.6.0 node_modules/accessible-autocomplete/scripts/check-staged.js