Don't rewrite .tests_enabled unless needed.
This commit is contained in:
parent
c8fcf610c9
commit
0fe7e6e11e
@ -76,10 +76,6 @@ module.exports = (grunt) ->
|
|||||||
failOnError: true
|
failOnError: true
|
||||||
clean:
|
clean:
|
||||||
command: 'node tools/clean.js'
|
command: 'node tools/clean.js'
|
||||||
'tests-false':
|
|
||||||
command: 'echo false> .tests_enabled'
|
|
||||||
'tests-true':
|
|
||||||
command: 'echo true> .tests_enabled'
|
|
||||||
general:
|
general:
|
||||||
command: """
|
command: """
|
||||||
<%= BIN %>coffee tools/templates.coffee src/meta/jshint.json .jshintrc
|
<%= BIN %>coffee tools/templates.coffee src/meta/jshint.json .jshintrc
|
||||||
@ -207,16 +203,23 @@ module.exports = (grunt) ->
|
|||||||
'build'
|
'build'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
grunt.registerTask 'set-tests', 'Set whether to include testing code', (value) ->
|
||||||
|
try
|
||||||
|
oldValue = grunt.file.readJSON '.tests_enabled'
|
||||||
|
catch
|
||||||
|
unless oldValue is JSON.parse value
|
||||||
|
grunt.file.write '.tests_enabled', value
|
||||||
|
|
||||||
grunt.registerTask 'build', [
|
grunt.registerTask 'build', [
|
||||||
'shell:npm'
|
'shell:npm'
|
||||||
'shell:tests-false'
|
'set-tests:false'
|
||||||
'shell:general'
|
'shell:general'
|
||||||
'concurrent:build'
|
'concurrent:build'
|
||||||
]
|
]
|
||||||
|
|
||||||
grunt.registerTask 'build-tests', [
|
grunt.registerTask 'build-tests', [
|
||||||
'shell:npm'
|
'shell:npm'
|
||||||
'shell:tests-true'
|
'set-tests:true'
|
||||||
'shell:general'
|
'shell:general'
|
||||||
'concurrent:build'
|
'concurrent:build'
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user