Skip to content

Commit

Permalink
Fix error.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 22, 2018
1 parent 9349448 commit 0f10627
Show file tree
Hide file tree
Showing 6 changed files with 2,097 additions and 105 deletions.
73 changes: 73 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
app_task: {
options: {
beautify: false,
mangle: true,
compress: false
},
files: {
'build/websocket.min.js': ['lib/websocket.js'],
'test/websocket.min.js': ['lib/websocket.js']
}
}
},
jshint: {
options: {
eqeqeq: true,
trailing: true
},
files: ['lib/websocket.js']
},
watch: {
another: {
files: ['lib/*.js'],
tasks: ['jshint', 'uglify'],
options: {
livereload: true
}
}
},
nodemon: {
dev: {
script: 'sever.js',
options: {
args: ['dev'],
nodeArgs: ['--inspect'],
callback: function (nodemon) {
return nodemon.on('log', function (event) {
return console.log(event.colour);
});
},
env: {
PORT: '8181'
},
cwd: __dirname,
ignore: ['node_modules/**', 'bower_components/**'],
debug: true,
ext: 'js,coffee,html',
watch: ['*', 'test/*'],
delay: 1,
legacyWatch: true
}
}
},
concurrent: {
target: {
tasks: ['nodemon', 'watch'],
options: {
logConcurrentOutput: true
}
}
}
});
grunt.option('force', true);
return grunt.registerTask('default', ['concurrent:target']);
};
Loading

0 comments on commit 0f10627

Please sign in to comment.