chore: several small build enhancements

+ build
This commit is contained in:
Estevão Soares dos Santos 2015-07-10 21:00:21 +01:00
parent 5a4ae79c54
commit 91e7b95796
6 changed files with 31 additions and 38 deletions

4
.gitattributes vendored
View File

@ -1,6 +1,10 @@
/test export-ignore /test export-ignore
.editorconfig export-ignore
.gitattributes export-ignore .gitattributes export-ignore
.gitignore export-ignore .gitignore export-ignore
.jscs.json export-ignore
.jshintignore export-ignore .jshintignore export-ignore
.jshintrc
.travis.yml export-ignore .travis.yml export-ignore
bower.json
Gruntfile.js export-ignore Gruntfile.js export-ignore

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
.idea/ .idea/
build/ .build/
.DS_Store .DS_Store
node_modules node_modules
npm-debug.log npm-debug.log

View File

@ -15,7 +15,7 @@ module.exports = function (grunt) {
footer: '}).call(this);' footer: '}).call(this);'
}, },
dist: { dist: {
src: [ src: [
'src/showdown.js', 'src/showdown.js',
'src/helpers.js', 'src/helpers.js',
'src/converter.js', 'src/converter.js',
@ -23,9 +23,18 @@ module.exports = function (grunt) {
'src/loader.js' 'src/loader.js'
], ],
dest: 'dist/<%= pkg.name %>.js' dest: 'dist/<%= pkg.name %>.js'
},
test: {
src: '<%= concat.dist.dest %>',
dest: '.build/<%= pkg.name %>.js',
options: {
sourceMap: false
}
} }
}, },
clean: ['.build/'],
uglify: { uglify: {
options: { options: {
sourceMap: true, sourceMap: true,
@ -53,7 +62,7 @@ module.exports = function (grunt) {
options: { options: {
config: '.jscs.json' config: '.jscs.json'
}, },
files: { files: {
src: [ src: [
'Gruntfile.js', 'Gruntfile.js',
'src/**/*.js', 'src/**/*.js',
@ -69,25 +78,6 @@ module.exports = function (grunt) {
} }
}, },
bump: {
options: {
files: ['package.json'],
updateConfigs: [],
commit: true,
commitMessage: 'Release version %VERSION%',
commitFiles: ['package.json'],
createTag: true,
tagName: '%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'upstream',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d',
globalReplace: false,
prereleaseName: 'alpha',
regExp: false
}
},
simplemocha: { simplemocha: {
node: { node: {
src: 'test/node/**/*.js', src: 'test/node/**/*.js',
@ -105,12 +95,15 @@ module.exports = function (grunt) {
timeout: 3000, timeout: 3000,
ignoreLeaks: false, ignoreLeaks: false,
reporter: 'spec' reporter: 'spec'
} },
}, issues: {
browser: { src: 'test/node/testsuite.issues.js',
src: 'test/browser/**/*.js', options: {
options: { globals: ['should'],
reporter: 'spec' timeout: 3000,
ignoreLeaks: false,
reporter: 'spec'
}
} }
} }
} }
@ -120,11 +113,10 @@ module.exports = function (grunt) {
require('load-grunt-tasks')(grunt); require('load-grunt-tasks')(grunt);
grunt.registerTask('concatenate', ['concat']); grunt.registerTask('concatenate', ['concat:dist']);
grunt.registerTask('lint', ['jshint', 'jscs']); grunt.registerTask('lint', ['jshint', 'jscs']);
grunt.registerTask('test', ['lint', 'concat', 'simplemocha:node']); grunt.registerTask('test', ['lint', 'concat:test', 'simplemocha:node', 'clean']);
grunt.registerTask('test-without-building', ['simplemocha:node']); grunt.registerTask('build', ['test', 'concatenate', 'uglify']);
grunt.registerTask('build', ['test', 'uglify']);
grunt.registerTask('prep-release', ['build', 'changelog']); grunt.registerTask('prep-release', ['build', 'changelog']);
// Default task(s). // Default task(s).

2
dist/showdown.js vendored
View File

@ -1,4 +1,4 @@
;/*! showdown 18-06-2015 */ ;/*! showdown 10-07-2015 */
(function(){ (function(){
/** /**
* Created by Tivie on 06-01-2015. * Created by Tivie on 06-01-2015.

File diff suppressed because one or more lines are too long

View File

@ -38,7 +38,7 @@
"devDependencies": { "devDependencies": {
"chai": "^1.10.0", "chai": "^1.10.0",
"grunt": "^0.4.5", "grunt": "^0.4.5",
"grunt-bump": "^0.3.1", "grunt-contrib-clean": "^0.6.0",
"grunt-contrib-concat": "^0.5.0", "grunt-contrib-concat": "^0.5.0",
"grunt-contrib-jshint": "^0.10.0", "grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-uglify": "^0.6.0", "grunt-contrib-uglify": "^0.6.0",
@ -46,10 +46,7 @@
"grunt-jscs": "^1.2.0", "grunt-jscs": "^1.2.0",
"grunt-simple-mocha": "^0.4.0", "grunt-simple-mocha": "^0.4.0",
"js-beautify": "^1.5.6", "js-beautify": "^1.5.6",
"jscs": "^1.10.0",
"load-grunt-tasks": "^3.2.0", "load-grunt-tasks": "^3.2.0",
"mocha": "*",
"should": "^4.4.2",
"sinon": "^1.14.1", "sinon": "^1.14.1",
"source-map-support": "^0.2.9" "source-map-support": "^0.2.9"
} }