overleaf/services/chat/Gruntfile.coffee

98 lines
2.1 KiB
CoffeeScript
Raw Normal View History

2014-08-15 05:50:36 -04:00
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
2016-12-14 12:44:02 -05:00
forever:
app:
options:
index: "app.js"
2014-08-15 06:35:22 -04:00
execute:
app:
src: "app.js"
2014-08-15 05:50:36 -04:00
coffee:
server:
expand: true,
flatten: false,
cwd: 'app/coffee',
src: ['**/*.coffee'],
dest: 'app/js/',
ext: '.js'
app_server:
expand: true,
flatten: false,
src: ['app.coffee'],
dest: './',
ext: '.js'
unit_tests:
2014-08-15 05:50:36 -04:00
expand: true,
flatten: false,
cwd: 'test/unit/coffee',
src: ['**/*.coffee'],
dest: 'test/unit/js/',
ext: '.js'
acceptance_tests:
expand: true,
flatten: false,
cwd: 'test/acceptance/coffee',
src: ['**/*.coffee'],
dest: 'test/acceptance/js/',
ext: '.js'
2014-08-15 05:50:36 -04:00
watch:
server_coffee:
files: ['app/**/*.coffee', 'test/unit/**/*.coffee']
tasks: ['compile:server', 'compile:unit_tests', 'mochaTest']
2014-08-15 05:50:36 -04:00
clean: ["app/js", "test/unit/js"]
2014-08-15 05:50:36 -04:00
nodemon:
dev:
options:
file: 'app.js'
concurrent:
dev:
tasks: ['nodemon', 'watch']
options:
logConcurrentOutput: true
mochaTest:
unit:
options:
reporter: process.env.MOCHA_RUNNER || "spec"
grep: grunt.option("grep")
src: ['test/unit/**/*.js']
acceptance:
options:
reporter: process.env.MOCHA_RUNNER || "spec"
grep: grunt.option("grep")
src: ['test/acceptance/**/*.js']
2014-08-15 05:50:36 -04:00
plato:
your_task:
files: 'plato': ['app/js/**/*.js'],
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-nodemon'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-concurrent'
grunt.loadNpmTasks 'grunt-mocha-test'
grunt.loadNpmTasks 'grunt-plato'
2014-08-15 06:35:22 -04:00
grunt.loadNpmTasks 'grunt-execute'
grunt.loadNpmTasks 'grunt-bunyan'
2016-12-14 12:44:02 -05:00
grunt.loadNpmTasks 'grunt-forever'
2014-08-15 06:35:22 -04:00
2014-08-15 05:50:36 -04:00
grunt.registerTask 'compile', ['clean', 'coffee']
2014-08-15 05:50:36 -04:00
grunt.registerTask 'install', ['compile']
grunt.registerTask 'default', ['compile', 'bunyan', 'execute']
2014-08-15 05:50:36 -04:00
grunt.registerTask 'test:unit', ['compile', 'mochaTest:unit']
grunt.registerTask 'test:acceptance', ['compile:acceptance_tests', 'mochaTest:acceptance']
2014-08-15 05:50:36 -04:00