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

chore: replace scripts with single prepack script #606

Merged
merged 1 commit into from Jul 5, 2020

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Jun 21, 2020

I suspect most of these were legacy from when the project was Javascript?

It's small fry, but still each build + remove takes around ~3 seconds, which is done after every install because of prepare (which itself calls build & then postbuild, which is already called by build). prepare is also called as part of the publishing scripts, as well as prepublishOnly; and then finally we call it before running our tests via pretest, which just isn't needed because the tests are run against src not lib.

prepack is called before packing the project which is done as part of publishing when npm pack is called; this means you can also run pack locally to check what'll be included in the published pack (vs using prepublishOnly).

@G-Rath G-Rath requested a review from SimenB June 21, 2020 02:08
@SimenB
Copy link
Member

SimenB commented Jul 5, 2020

We need to build before test as we lint ourselves, no?

@G-Rath
Copy link
Collaborator Author

G-Rath commented Jul 5, 2020

Actually no we don't 😅

Most of our tests are using RuleTester, which is covered by eslint-plugin-eslint-plugin.

@SimenB
Copy link
Member

SimenB commented Jul 5, 2020

Ah, we just need the globals which comes from a JSON file now

const globals = require('./src/globals.json');

@G-Rath G-Rath merged commit 6b86aa4 into master Jul 5, 2020
@G-Rath G-Rath deleted the remove-unneeded-scripts branch July 5, 2020 09:55
@github-actions
Copy link

github-actions bot commented Jul 5, 2020

🎉 This PR is included in version 23.18.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants