generator-chrome-extension
generator-chrome-extension copied to clipboard
Replace Bower with import
Bower is already suggesting not to use it on the command line.
I think a good and popular suggestion is to use Gulp with Browserify.
I'd like to use https://github.com/mozilla/webextension-polyfill in my extensions and I think the best way to install it so far would be using Browserify.
What do you think?
Nice polyfill. I prefer to using the platform as much as we can use. I consider that remove gulp and using import supported by chrome recently.
With a few more changes we might end up with a generator which is quite generic and creates a WebExtensions compatible extension working in Chrome, Firefox, Edge, Opera etc.
Right but this generator completely dedicated to Chrome.
Back to the topic: Yes, migrating from Bower to npm should be done. The sooner the better.
I’ve done the groundwork by migrating generator-jasmine and generator-mocha from Bower to npm:
- https://github.com/yeoman/generator-jasmine/releases
- https://github.com/yeoman/generator-mocha/releases
So there is only some work left within this generator after updating the dependencies.
Even MPJ suggest to not use bower https://www.quora.com/Why-use-Bower-when-there-is-npm/answer/Mattias-Petter-Johansson
Renamed the PR to reflect we could use imports rather than Browserify.
Until you'll support import how can I use an npm package on my scripts.babel/background.js file?
@ranbuch I've set it up with Browserify initially, but the setup is not straightforward. We've just migrated our extension bootstrapped with this generator to Webpack 4 replacing Bower, Browserify and Gulp. Would try to send a pull request.
Send a pull request with what?
@hkdobrev could you show how you've done that migration?