Skip to content

Gulp inject:css shows nothing to inject #1752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vikramthyagarajan opened this issue Mar 31, 2016 · 1 comment
Closed

Gulp inject:css shows nothing to inject #1752

vikramthyagarajan opened this issue Mar 31, 2016 · 1 comment
Assignees
Labels

Comments

@vikramthyagarajan
Copy link

Item Version
generator-angular-fullstack 3.5.0
Node 5.9.0
npm 3.7.3
gulp-cli 1.2.1
gulp local version 3.9.1
Operating System OS X 10.11
Item Answer
Transpiler Babel
Markup HTML
CSS CSS
Router ui-router
Build Tool Gulp
Client Tests Jasmine
DB MongoDB
Auth Y

While running gulp serve, the css files that I have within the client folder do not get injected into the index.html file.
I think the issue seems to be here

    return gulp.src(paths.client.mainView)
        .pipe(plugins.inject(
            gulp.src(`/${clientPath}/{app,components}/**/*.css`, {read: false})
                .pipe(plugins.sort()),
            {
                starttag: '<!-- injector:css -->',
                endtag: '<!-- endinjector -->',
                transform: (filepath) => '<link rel="stylesheet" href="' + filepath.replace(`/${clientPath}/`, '').replace('/.tmp/', '') + '">'
            }))
        .pipe(gulp.dest(clientPath));

Making this change seems to solve it temporarily

gulp.src(`${clientPath}/{app,components}/**/*.css`, {read: false})

However, removing the / seems to solve the issue temporarily, but I'm not sure if anything will break because of it

@Awk34
Copy link
Member

Awk34 commented Apr 21, 2016

6de6272 removes the extra /

This should be working in the next release

@Awk34 Awk34 closed this as completed Apr 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants