Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create package.json for new components in pre-release step #574

Merged
merged 3 commits into from
Mar 7, 2018

Conversation

kr8n3r
Copy link

@kr8n3r kr8n3r commented Mar 5, 2018

If a new component has been added to src, it needs a package.json file when it gets copied to packages/

We use to do this manually and our tests that run after build:packages task would fail.

With this script, when npm run pre-release is run, the script will check if any new folders exist in package after the copy task.
If so, it will create a sample package.json file with actual component name, version 0.0.0 and latest version of globals as dependency.

it will also remind the developer to amend all/package.json file with new dependencies.

new-component-prompt

When developer indicates they have done the above, the script will continue and the rest of the npm run pre-release tasks will run.

Next new component will be: #569

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-574 March 5, 2018 15:22 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-574 March 5, 2018 15:23 Inactive

create_package_json ${D}

echo "⚠️ Remember to add the 🆕 $COMPONENT_NAME 🆕 component to ALL/package.json\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should all here be lowercase?

Copy link
Contributor

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Saves some extra manual steps.

Don't forget to rebase for the CHANGELOG.md

@kr8n3r kr8n3r force-pushed the create-package-json-in-prerelease branch from 7d5a689 to 5f05ceb Compare March 6, 2018 17:04
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-574 March 6, 2018 17:05 Inactive
@kr8n3r kr8n3r force-pushed the create-package-json-in-prerelease branch from 5f05ceb to 513f38a Compare March 6, 2018 17:06
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-574 March 6, 2018 17:07 Inactive
Jani Kraner added 2 commits March 7, 2018 10:35
If a new component has been added to src it needs a package.json file
when it gets copied to packages/

We use to do this manually and our tests that run after `build:packages`
task would fail.

With this script, when `npm run pre-release` is run, the script will
check if any new folders exist in packages after the copy task. If so,
it will create a sample package.json file with actual component name,
version 0.0.0 and latest version of globals as dependency.

It will also remind the developer to amend ALL/package.json file with
new dependencies.

When developer indicates they have done the above, the script will
and the rest of the `npm run pre-release` tasks will run.
@kr8n3r kr8n3r force-pushed the create-package-json-in-prerelease branch from 513f38a to ea1176b Compare March 7, 2018 10:37
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-574 March 7, 2018 10:37 Inactive
@kr8n3r kr8n3r force-pushed the create-package-json-in-prerelease branch from ea1176b to e3ce1e0 Compare March 7, 2018 12:08
@kr8n3r kr8n3r changed the title Create package.json for new components in prerelease step Create package.json for new components in pre-release step Mar 7, 2018
@kr8n3r kr8n3r merged commit b2d2b89 into master Mar 7, 2018
@kr8n3r kr8n3r deleted the create-package-json-in-prerelease branch March 7, 2018 13:24
@NickColley NickColley mentioned this pull request Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants