Wouter
Wouter

Reputation: 1778

Folder under webapp/content is not included in JHipster build

In my (rather basic) JHipster app, I have created a new folder called webapp/content/more

In that folder is some more CSS that I'm keeping separate for good reason.

When I run the app during development, all files are there and no issue. When I package the app for production with mvnw -Pprod package -DskipTests, the folder "more" is never put in the .WAR file so the extra CSS doesn't work.

I have no idea where to look for it (is it a pom.xml issue? Gulp issue?).

Upvotes: 0

Views: 458

Answers (1)

Gaël Marziou
Gaël Marziou

Reputation: 16294

Look at Gulpfile.js that was generated by JHipster, you'll find that the styles task only processes content/css folder.

gulp.task('styles', [], function () {
    return gulp.src(config.app + 'content/css')
        .pipe(browserSync.reload({stream: true}));
});

Add your extra folder to it:

gulp.task('styles', [], function () {
    return gulp.src(config.app + 'content/css', config.app + 'content/more')
        .pipe(browserSync.reload({stream: true}));
});

Bu this is not enough, there are other gulp tasks to modify, just search for css in Gulpfile.js and gulp folder.

Upvotes: 1

Related Questions