Skip to content

Commit

Permalink
改造开发环境
Browse files Browse the repository at this point in the history
  • Loading branch information
Dafrok committed Mar 27, 2018
1 parent 2a72740 commit bae3221
Show file tree
Hide file tree
Showing 3 changed files with 2,927 additions and 110 deletions.
20 changes: 18 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ module.exports = function(grunt) {

// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);

grunt.loadNpmTasks('grunt-browser-sync');
grunt.loadNpmTasks('grunt-contrib-watch');

var pkg = grunt.file.readJSON('package.json');

Expand Down Expand Up @@ -63,6 +64,21 @@ module.exports = function(grunt) {
}
},

// browser sync for dev
browserSync: {
bsFiles: {
dist: 'dist/css/*.css',
src: 'src/**'
},
options: {
server: {
baseDir: './',
index: 'index.html',
watchTask: true
}
}
},

// concat
concat: {
closure: {
Expand Down Expand Up @@ -182,5 +198,5 @@ module.exports = function(grunt) {

grunt.registerTask('dev', ['clean:last',
//'wiredep:dev',
'ngtemplates', 'dependence', 'ngAnnotate', 'concat', 'uglify', 'less', 'cssmin', 'copy', 'clean:clstmp']);
'ngtemplates', 'dependence', 'ngAnnotate', 'concat', 'uglify', 'less', 'cssmin', 'copy', 'clean:clstmp', 'browserSync', 'watch']);
};
Loading

0 comments on commit bae3221

Please sign in to comment.