代码拉取完成,页面将自动刷新
_request = require 'request'
module.exports = (grunt)->
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.registerTask('explore', 'visit localhost', ()->
this.async()
_request 'http://localhost:3000', (err, response, body)->
return console.log err if err
console.log body
)
_fs = require 'fs'
grunt.registerTask('fs-test', 'test fs', ()->
console.log _fs.existsSync('.slow')
console.log _fs.existsSync('sample/.slow')
)
grunt.initConfig(
pkg: grunt.file.readJSON 'package.json'
coffee:
dev:
expand: true
flatten: false
cwd: 'src'
src: ['*/*.coffee', '*/*/*.coffee',
'*/*/*/*.coffee', '*/*/*/*/*.coffee',
'sample/.slow/*.coffee']
dest: '.'
ext: '.js'
watch:
files: ['src/*.coffee', 'src/*/*.coffee', 'src/*/*/*.coffee', 'src/sample/.slow/*.coffee']
tasks: ['coffee:dev']
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。