项目作者: thisisbrad

项目描述 :
Gulp with BrowserSync. Basic Setup Example.
高级语言: JavaScript
项目地址: git://github.com/thisisbrad/gulp-browsersync-example.git
创建时间: 2017-02-14T21:01:42Z
项目社区:https://github.com/thisisbrad/gulp-browsersync-example

开源协议:MIT License

下载


Gulp with BrowserSync for LiveReload

Using Gulp to run simple dev tasks. Using BrowserSync to start local dev server and live reload.

  • BrowserSync
  • Sass
  • Simple builds

File Path Structure

This is used to refer to your folder structure through out the gulp file.
const paths = { assets: ['./src/assets/'], scripts: [ './src/js/main.js', './src/**/*.js' ], html: [ './src/html/*.html', './src/html/index.html' ], styles: [ './src/css/styles.css', './src/css/*.css' ] };

Basic Tasks

  • gulp serve - starts BrowserSync

  • gulp js:lint - lints the JS code in paths

  • gulp js:build - build JS code in paths
  • gulp js:watch - watchs all JS

  • gulp css:build - builds Sass into CSS code

  • gulp css:watch - watchs all Sass

  • gulp build - calls all build tasks

  • gulp watch - watchs all files

  • gulp - [‘build’, ‘serve’, ‘watch’]