chore: add grunt task to add newline to end of built files

Closes #202
This commit is contained in:
Estevão Soares dos Santos 2015-10-14 21:44:19 +01:00
parent 8ebb25e486
commit e928622664
5 changed files with 13 additions and 3 deletions

View File

@ -16,7 +16,7 @@ module.exports = function (grunt) {
options: {
sourceMap: true,
banner: ';/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n(function(){\n',
footer: '}).call(this);'
footer: '}).call(this);\n'
},
dist: {
src: [
@ -52,6 +52,15 @@ module.exports = function (grunt) {
}
},
endline: {
dist: {
files: {
'dist/<%= pkg.name %>.js': 'dist/<%= pkg.name %>.js',
'dist/<%= pkg.name %>.min.js': 'dist/<%= pkg.name %>.min.js'
}
}
},
jshint: {
options: {
jshintrc: '.jshintrc'
@ -97,7 +106,7 @@ module.exports = function (grunt) {
changelogOpts: {
preset: 'angular'
}
},
}
}
},
@ -180,7 +189,7 @@ module.exports = function (grunt) {
grunt.registerTask('lint', ['jshint', 'jscs']);
grunt.registerTask('test', ['clean', 'lint', 'concat:test', 'simplemocha:node', 'clean']);
grunt.registerTask('build', ['test', 'concat:dist', 'uglify']);
grunt.registerTask('build', ['test', 'concat:dist', 'uglify', 'endline']);
grunt.registerTask('prep-release', ['build', 'conventionalChangelog']);
// Default task(s).

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

BIN
dist/showdown.min.js vendored

Binary file not shown.

View File

@ -47,6 +47,7 @@
"grunt-contrib-uglify": "^0.6.0",
"grunt-conventional-changelog": "^4.0.0",
"grunt-conventional-github-releaser": "^0.3.0",
"grunt-endline": "^0.4.0",
"grunt-jscs": "^1.2.0",
"grunt-simple-mocha": "^0.4.0",
"js-beautify": "^1.5.6",