clean-up of dev pipeline (grunt)

This commit is contained in:
Hendrik Leppelsack 2015-06-03 14:48:26 +02:00
parent ba0ae97035
commit 83ae567b27
2 changed files with 32 additions and 20 deletions

View file

@ -28,9 +28,10 @@ module.exports = (grunt) ->
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-less')
grunt.loadNpmTasks('grunt-coffeelint')
grunt.loadNpmTasks('grunt-wrap');
grunt.loadNpmTasks('grunt-phpunit');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-wrap')
grunt.loadNpmTasks('grunt-phpunit')
grunt.loadNpmTasks('grunt-karma')
grunt.loadNpmTasks('grunt-concurrent')
grunt.initConfig
@ -67,7 +68,7 @@ module.exports = (grunt) ->
ext: ".css"
concat:
app:
default:
options:
banner: '<%= meta.banner %>\n'
stripBanners:
@ -81,7 +82,7 @@ module.exports = (grunt) ->
]
dest: '<%= meta.production %>app.js'
wrap:
app:
default:
src: '<%= meta.production %>app.js'
dest: ''
wrapper: [
@ -90,7 +91,7 @@ module.exports = (grunt) ->
]
coffeelint:
app: [
default: [
'app/**/*.coffee'
'tests/**/*.coffee'
]
@ -107,15 +108,21 @@ module.exports = (grunt) ->
coffeescript:
files: ['app/**/*.coffee']
tasks: 'coffee'
concat:
files: [
'<%= meta.build %>app/**/*.js'
'<%= meta.build %>tests/**/*.js'
]
tasks: 'compile'
less:
js:
files: ['app/**/*.js']
tasks: 'js'
css:
files: ['../css/*.less']
tasks: 'less'
tasks: 'css'
concurrent:
dev:
tasks: [
'watch:js'
'watch:css'
]
options:
logConcurrentOutput: true
karma:
unit:
@ -139,8 +146,13 @@ module.exports = (grunt) ->
colors: true
grunt.registerTask('run', ['watch:concat'])
grunt.registerTask('compile', ['concat', 'wrap', 'coffeelint'])
grunt.registerTask('ci', ['karma:continuous'])
grunt.registerTask('testphp', ['watch:phpunit'])
# grunt.registerTask('default', 'watch')
grunt.registerTask('js', ['coffeelint', 'coffee', 'concat', 'wrap'])
grunt.registerTask('css', ['less'])
grunt.registerTask('dev', ['js', 'css'])
# overwrite watch:all to simplify naming
grunt.registerTask('watch:dev', ['concurrent:dev'])
grunt.registerTask('default', 'dev')

View file

@ -27,8 +27,8 @@
"grunt-wrap": "~0.2.0",
"phantomjs": "~1.8.1-3",
"grunt-phpunit": "0.2.0",
"gruntacular": "~0.3.0",
"grunt-karma": "~0.4.5"
"grunt-karma": "~0.4.5",
"grunt-concurrent": "~1.0.0"
},
"engine": "node >= 0.8"
}