From e928622664e8a22233b1be4fb79422023ccc139e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Estev=C3=A3o=20Soares=20dos=20Santos?= Date: Wed, 14 Oct 2015 21:44:19 +0100 Subject: [PATCH] chore: add grunt task to add newline to end of built files Closes #202 --- Gruntfile.js | 15 ++++++++++++--- dist/showdown.js | Bin 64145 -> 64147 bytes dist/showdown.js.map | Bin 206997 -> 207187 bytes dist/showdown.min.js | Bin 23119 -> 23120 bytes package.json | 1 + 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 989fa0b..c1c7a26 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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). diff --git a/dist/showdown.js b/dist/showdown.js index 4a43bb0626f45496a6b26fd28bbcea02c1962eb1..f91e71049b3875945dc3f127de1f0aff304b6151 100644 GIT binary patch delta 33 pcmbREm3i`4W&vw`Ek%XmjQsMH{PH{nLz9gHvA-tg{8DA)0szw%3^@P* delta 31 ncmbRIm3iV;(=vTmWXi0_v{aX9AtGoxz_CvtwH>&{z}q8WA!nB!ylmbF2k6JDLvoKP%9vlP81+}EVC_^jw$*1MOL}QRa@BnzskFsP%s~mjMI_l5%%HZLB#Af7tPHs^={nTLm*a zE@-!Xya5t9YXhyf(WtwfU|kwV`T3BpgXNoO<-#LuWB*g!&6m??&durea;aVC KC>GNA`Q=ZW_uMT2 delta 588 zcmZvWOK1~O6oxssGYJ`jRokeEVh0gxaTM#K6~;xb=`=;5wkxTLHQ1)0mRQn>O(zMa zh;(BM_K+SQh>wMoLT2@L=M diff --git a/package.json b/package.json index 6538acd..fa9693a 100644 --- a/package.json +++ b/package.json @@ -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",