Skip to content

Commit

Permalink
Merge pull request #1983 from alphagov/rollback-package-scripts
Browse files Browse the repository at this point in the history
Rollback package scripts
  • Loading branch information
nataliecarey authored Feb 17, 2023
2 parents cd22cf7 + 3ed26df commit 6ece283
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
[Common templates plugin](https://github.com/alphagov/govuk-prototype-kit-common-templates)
- [#1962: Make GOV.UK Notify client available as a plugin](https://github.com/alphagov/govuk-prototype-kit/pull/1962)

### Fixes

- [#1972: Fix permissions bug on managed devices by calling Node directly](https://github.com/alphagov/govuk-prototype-kit/pull/1972)

## 13.2.4

### Fixes
Expand Down
6 changes: 3 additions & 3 deletions __tests__/spec/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ describe('migrate test prototype', () => {
])

expect(scripts).toEqual({
dev: 'node node_modules/govuk-prototype-kit/bin/cli dev',
serve: 'node node_modules/govuk-prototype-kit/bin/cli serve',
start: 'node node_modules/govuk-prototype-kit/bin/cli start'
dev: 'govuk-prototype-kit dev',
serve: 'govuk-prototype-kit serve',
start: 'govuk-prototype-kit start'
})

expect(name).toEqual('test-prototype')
Expand Down
12 changes: 5 additions & 7 deletions bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,11 @@ usage-data-config.json
.idea
`.trimStart()

const cliPath = 'node_modules/govuk-prototype-kit/bin/cli'

const packageJson = {
scripts: {
dev: `node ${cliPath} dev`,
serve: `node ${cliPath} serve`,
start: `node ${cliPath} start`
dev: 'govuk-prototype-kit dev',
serve: 'govuk-prototype-kit serve',
start: 'govuk-prototype-kit start'
}
}

Expand Down Expand Up @@ -246,7 +244,7 @@ async function runCreate () {

progressLogger('Setting up your prototype')

await spawn('node', [cliPath, 'init', runningWithinCreateScriptFlag, installDirectory, `--created-from-version=${kitVersion}`, ...(getArgumentsToPassThrough())], {
await spawn('npx', ['govuk-prototype-kit', 'init', runningWithinCreateScriptFlag, installDirectory, `--created-from-version=${kitVersion}`, ...(getArgumentsToPassThrough())], {
cwd: installDirectory,
stdio: 'inherit'
})
Expand Down Expand Up @@ -304,7 +302,7 @@ async function runMigrate () {

await prepareMigration(kitDependency, projectDirectory)

await spawn('node', [cliPath, 'migrate', '--', projectDirectory], {
await spawn('npx', ['govuk-prototype-kit', 'migrate', '--', projectDirectory], {
stdio: 'inherit'
})
} else {
Expand Down

0 comments on commit 6ece283

Please sign in to comment.