Skip to content

#38 Fixed watch & browsersync gulp tasks.#39

Open
hog-seruj wants to merge 4 commits into8.x-7.xfrom
f38
Open

#38 Fixed watch & browsersync gulp tasks.#39
hog-seruj wants to merge 4 commits into8.x-7.xfrom
f38

Conversation

@hog-seruj
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread STARTERKIT/gulpfile.js
];

gulp.task('styles', ['clean:css'], function () {
gulp.task('styles', function () {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the reason to removing clean:css task here?

Comment thread STARTERKIT/gulpfile.js Outdated
var watchCss = gulp.watch(sassFiles, options.gulpWatchOptions, ['styles']);
gulp.task('watch:css', function () {
gulp.watch(options.theme.css + '**/*.css').on('change', browserSync.reload);
return watchCss
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here should be ;

@iberdinsky-skilld iberdinsky-skilld self-assigned this Nov 22, 2017
@iberdinsky-skilld
Copy link
Copy Markdown
Collaborator

Npm tasks

  • Dist. Clean css, js, maps, styleugude. Compact css, compact js. Syleguide.
  • Watch. Clean css, js, maps. Mapped css, mapped js, Styleguide.
  • Serve. Clean css, js, maps. Mapped css, mapped js, Styleguide.

Gulp.

  • build. default tasks
  • watch, devtask with watcher
  • serve, devtask with watcher and browsersync

Updates

  • Variables in begin, Functions on bottom.
  • Added pattern * for gulp-load-plugins to use all package.json modules with $.MODULE_NAME They will loded when they needed.
  • Added xip by default to browsersync options. http://xip.io/
  • Added npm run tasks. Foe easier docker frontend using.
  • Fixed watch and browsersync tasks.
  • Removed filenames log from gulp:sass task. Who need it?
  • Changed "no-empty-rulesets" sass linter rule to "info" instead of warning. Or we need to fix that empty rules in default styles.

Copy link
Copy Markdown
Contributor

@andypost andypost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving code around makes review harder

Comment thread STARTERKIT/gulpfile.js Outdated
});

// Converts module names to absolute paths for easy imports.
function sassModuleImporter(url, file, done) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not move code around the file, edit it where it lives

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

structure will change more. actually i think this function will be changed with some module.

Comment thread STARTERKIT/package.json
"browser-sync": "^2.12.3",
"chroma-sass": "^1.2.4",
"del": "^2.2.0",
"eslint": "^2.9.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why eslint removed?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.npmjs.com/package/gulp-eslint we have this. otherwice conflict in load plugins.

Comment thread STARTERKIT/.sass-lint.yml
no-debug: 2
# no-duplicate-properties: 2
no-empty-rulesets: 2
no-empty-rulesets: 1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why setting it to a warning instead of an error? No need to keep empty rules.

https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-empty-rulesets.md

Comment thread STARTERKIT/gulpfile.js
cache = require('gulp-cached'),
spritesmith = require('gulp.spritesmith');
// Browsersync options
options.browserSync = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to have this one in a separated config file like we do on webpack?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep. in future plans.
#44
also we need to move config.

@hog-seruj
Copy link
Copy Markdown
Collaborator Author

'Watch' task work for scss files. Bu i see some issues:

  1. Need add default image for sprite generation
  2. After watch all project recompile, it's very long. Need think togather how to fix it. In my mind, only file we change must be recompiled
  3. Watch steel not work for js

@iberdinsky-skilld
Copy link
Copy Markdown
Collaborator

@hog-seruj
1. Need add default image for sprite generation 2. After watch all project recompile, it's very long. Need think togather how to fix it. In my mind, only file we change must be recompiled 3. Watch steel not work for js

  1. yeah. it was here. could you revert if you have time?
  2. to optimize watch task we need optimize current sass structure.
  3. Yeah. Only linter. We need to apply webpack build and reload after.

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

Successfully merging this pull request may close these issues.

6 participants