这是indexloc提供的服务,不要输入任何密码
Skip to content

vasudevapitta/browser-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

browser-sync

project on browser-sync

Install node js & npm In commandline npm init to create package.json

Run npm install gulp browser-sync --save-dev //Installs gulp & browser-sync as dev dependencies to the project and creates node_modules folder Also the package.json should show gulp & browser-sync under dependencies

create a file with name gulpfile.js add the below code to it

const gulp = require('gulp'); const browserSync = require('browser-sync').create(); const reload = browserSync.reload;

// Static server gulp.task('browser-sync', function() { browserSync.init({ server: { baseDir: "./" } });

gulp.watch(['css/*.css', './*.html', 'js/*.js' ]).on("change", reload);

});

In commandline to run browser-sync Run gulp browser-sync //this should open a local server with browser-sync watching for file changes.

About

project on browser-sync

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published