Skip to content
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

CSS/SASS doesn't automatically get applied after running gulp. #57

Open
mariacheline opened this issue Mar 27, 2017 · 2 comments
Open

Comments

@mariacheline
Copy link

Whenever I (re)run gulp, css doesn't automatically get applied. Hitting save solves it but still, it would be great if it's automatic.

@Sandstedt
Copy link

I maybe had a similar problem when the css didnt get updated when saving a sass file in a subfolder (eg _scss/components/_buttons.scss).

Appearently the watch does only run sass in the root scss directory. So adding this line will runt the sass script also in subfolders:

gulp.watch('_scss/**/*.scss', ['sass']);

Complete watch function:

/**
 * Watch scss files for changes & recompile
 * Watch html/md files, run jekyll & reload BrowserSync
 */
gulp.task('watch', function () {
    gulp.watch('_scss/*.scss', ['sass']);
    gulp.watch('_scss/**/*.scss', ['sass']);
    gulp.watch(['*.html', '*.md', '_layouts/*.html', '_case/*', '_curious-about/*', '_includes/**/**', 'js/**', '_scss/**'], ['jekyll-rebuild']);
});

@jhoedram
Copy link

jhoedram commented Apr 6, 2018

I have the same problem.
browsersync does not inject the css correctly, what could be happening ?, I applied the command:

browser-sync start --proxy localhost/simple-grid --files "./*.*"

So far, it detects all types of .html .php .js file, but when compiling from .scss to .css it does not do anything. As you can see I have 2 consoles, 1 executes gulp (to compile sass) and the other (browser-sync).

I appreciate your help in advance.

problema1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants