yeoman/generator-webapp

Fresh install issues - bower exists, no NPM tasks

GaryStanton opened this issue · 5 comments

I'm not sure of the state of the current release... I can see that Bower support has been dropped (and I've read that Bootstrap 4 doesn't support it?), along with webpack... and that the current docs show npm commands over gulp commands.
I've just done a fresh install of 3.0.1 and it seems that Bower is still in play, and that no NPM tasks seem to exist.
I can get the gulp tasks to run and serve the app as it always used to, but the Bootstrap 4 build out of the box is not included.

Is the release in flux at the moment? It doesn't seem useable as-is.

The latest changes haven't been released yet. I suggest watching this repo for releases, you can do it on GitHub easily:

screenshot 2018-12-06 at 22 49 13

Until then select the v3.0.1 tag when browsing the documentation, it should reflect the latest release:

screenshot 2018-12-06 at 22 50 30

Thanks, I appreciate the update.
As it stands however, the currently installed version (3.0.1) doesn't work out of the box with Bootstrap 4.
Is there a procedure to get this up and running on a fresh install? I've used older versions of the generator for a whole bunch of projects and it's been fantastic. In it's current state it's pretty unusable.

There are many long standing issues with the generator that we aim to fix in the next release. Try downgrading to v2.4.1 in the meantime.

What exactly doesn't work about Bootstrap in v3.0.1? Injecting dependencies into HTML?

Yes, that's about the size of it. No Bootstrap CSS or JS is included with v4, either injected into the HTML or included in the gulp tasks.
I read somewhere that Bootstrap 4 does not support Bower, which I assume is the cause of the problem - but I wondered if there was a standard procedure to get this working, given that it is offered as a default option in the generator?

Yeah, we rely on Bower packages having a bower.json file pointing to their main files, but Bootstrap no longer has one. I think you should be able to specify them manually by adding the overrides to your bower.json, like this:

{
  "..."
  "overrides": {
    "bootstrap": {
      "main": [
        "scss/bootstrap.scss",
        "dist/js/bootstrap.js"
      ]
    }
  }
}