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

become package manager agnostic #9

Merged
merged 1 commit into from
Nov 23, 2020
Merged

Conversation

akash1810
Copy link
Member

@akash1810 akash1810 commented Nov 23, 2020

What does this change?

We don't want to force clients of this library to use npm or yarn.

In future PRs we can update docs to reflect this (they currently say npm is needed).

How to test

In a npm based project install from this branch and witness the transpiled code be created inside node_modules:

npm i -D "git+ssh://[email protected]:guardian/cdk.git#dcee55521b9ef4f55e107f3f8494dc1343c6fb06"

In a yarn based project install from this branch and witness the transpiled code be created inside node_modules:

yarn add -D "git+ssh://[email protected]:guardian/cdk.git#dcee55521b9ef4f55e107f3f8494dc1343c6fb06"

How can we measure success?

This library can be used in any project.

Have we considered potential risks?

n/a

Images

n/a

We don't want to force clients of this library to use npm or yarn.

- Tweak the `prepare` directive to invoke `tsc` directly
- Add the `files` directive to work around issue with yarn (see yarnpkg/yarn#5235 (comment))
@akash1810
Copy link
Member Author

Copy link
Contributor

@jamie-lynch jamie-lynch left a comment

Choose a reason for hiding this comment

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

Nice!

@akash1810
Copy link
Member Author

akash1810 commented Nov 23, 2020

Here's a demo https://github.com/guardian/deploy-tools-platform/pull/289, the build is green meaning this change allows this library to be used happily within a yarn project as the head of that repo is currently yarn based 🎉 .

@akash1810 akash1810 merged commit 375df88 into main Nov 23, 2020
@akash1810 akash1810 deleted the aa-package-manager-agnostic branch November 23, 2020 14:52
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.

2 participants