How to call `yarn build` after plugin installation?
See original GitHub issueI develop a plugin: https://github.com/krzema12/hypergravity
I use yarn and webpack to bundle several .js files into one index.js file that resides in the root directory of my plugin and is loaded by Hyper. Currently, with every change in the source code, I need to recompile this index.js file and add it to the commit. Rebuilding is done after I do yarn build
.
My aim is yarn build
to be executed automatically when someone downloads or updates my plugin, so that the compiled and potentially minified /index.js does not reside in git repo.
How can I achieve it?
For reference: https://github.com/krzema12/hypergravity/issues/8
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to call yarn build after plugin installation? #2696
I use yarn and webpack to bundle several .js files into one index.js file that resides in the root directory of my plugin...
Read more >Plugin Tutorial | Yarn - Package Manager
A basic plugin tutorial which shows how to work with Yarn's plugin API. ... to print some basic information about the dependency tree...
Read more >How To Install and Use the Yarn Package Manager ...
After the package installs, have the yarn command print its own version number. This will let you verify it was installed properly:.
Read more >How to enable Yarn for Jenkinsfile Pipeline syntax?
You can install yarn locally on Jenkins and use sh 'yarn install' in the pipeline. See https://yarnpkg.com/en/docs/install#alternatives-stable ...
Read more >rollup/plugin-beep
Then call rollup either via the CLI or the API. If the build produces any errors, the plugin will write a "beep" character...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think you should publish a prebuilt version of your package, you should only have webpack as a development dependency. In development, just run your webpack manually with --watch, would that work? So you should just build as normal and add
files
to your package.json, only publishing the built files. Hope that makes sense. I can see if I can find a guide 👍Glad i could help and good luck! 😊👌🤘