question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to call `yarn build` after plugin installation?

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
albinekbcommented, Feb 22, 2018

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 👍

0reactions
albinekbcommented, Feb 22, 2018

Glad i could help and good luck! 😊👌🤘

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found