-
Notifications
You must be signed in to change notification settings - Fork 0
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
Build as proper NPM module #7
base: master
Are you sure you want to change the base?
Conversation
Restructure according to the guide here: https://pauloe-me.medium.com/typescript-npm-package-publishing-a-beginners-guide-40b95908e69c
And remove old js versions of existing TS files
0e29eef
to
4bc2b02
Compare
Rebased on latest master, added At the moment, when using a package that imports this one with webpack, this package needs to be excluded from any ts-loader or babel-loader rules, otherwise you'd receive errors like this: I believe this PR will fix such errors. The one caveat is that if you need to import this package from Github, you'll need to point at a commit or release that has the # Check out the commit you want to release, then:
git checkout -B release-prep # Create a branch, could be anything, just to make sure we don't commit this to master
yarn build # Prepare dist/
git add -f dist/ # Add dist/ to git, despite .gitignore
git commit -m "Preparing release"
git tag 2.0.0-rc.1 # Push a release tag
git push origin tag 2.0.0-rc.1 You can then use this release in package.json: {
"dependencies": {
"kicad-to-json": "buildwithflux/kicad-module-parser#2.0.0-rc.1"
}
} The current state of this branch is deployed to the above tag/release, so we can test it. (Better would be to do a proper NPM release, but the above works for loading from Github) |
Impact
Description
Testing
test/
TODO:
pnpm build:copilot
works on in fluxNotes
flux-app
, since we're referencing this module by exact commits already, not pointing to HEAD here.