mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
chore: several small build enhancements
+ build
This commit is contained in:
parent
5a4ae79c54
commit
91e7b95796
4
.gitattributes
vendored
4
.gitattributes
vendored
|
@ -1,6 +1,10 @@
|
|||
/test export-ignore
|
||||
.editorconfig export-ignore
|
||||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
||||
.jscs.json export-ignore
|
||||
.jshintignore export-ignore
|
||||
.jshintrc
|
||||
.travis.yml export-ignore
|
||||
bower.json
|
||||
Gruntfile.js export-ignore
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,5 @@
|
|||
.idea/
|
||||
build/
|
||||
.build/
|
||||
.DS_Store
|
||||
node_modules
|
||||
npm-debug.log
|
||||
|
|
44
Gruntfile.js
44
Gruntfile.js
|
@ -23,9 +23,18 @@ module.exports = function (grunt) {
|
|||
'src/loader.js'
|
||||
],
|
||||
dest: 'dist/<%= pkg.name %>.js'
|
||||
},
|
||||
test: {
|
||||
src: '<%= concat.dist.dest %>',
|
||||
dest: '.build/<%= pkg.name %>.js',
|
||||
options: {
|
||||
sourceMap: false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
clean: ['.build/'],
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
sourceMap: true,
|
||||
|
@ -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: {
|
||||
node: {
|
||||
src: 'test/node/**/*.js',
|
||||
|
@ -105,26 +95,28 @@ module.exports = function (grunt) {
|
|||
timeout: 3000,
|
||||
ignoreLeaks: false,
|
||||
reporter: 'spec'
|
||||
}
|
||||
},
|
||||
browser: {
|
||||
src: 'test/browser/**/*.js',
|
||||
issues: {
|
||||
src: 'test/node/testsuite.issues.js',
|
||||
options: {
|
||||
globals: ['should'],
|
||||
timeout: 3000,
|
||||
ignoreLeaks: false,
|
||||
reporter: 'spec'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
grunt.initConfig(config);
|
||||
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
grunt.registerTask('concatenate', ['concat']);
|
||||
grunt.registerTask('concatenate', ['concat:dist']);
|
||||
grunt.registerTask('lint', ['jshint', 'jscs']);
|
||||
grunt.registerTask('test', ['lint', 'concat', 'simplemocha:node']);
|
||||
grunt.registerTask('test-without-building', ['simplemocha:node']);
|
||||
grunt.registerTask('build', ['test', 'uglify']);
|
||||
grunt.registerTask('test', ['lint', 'concat:test', 'simplemocha:node', 'clean']);
|
||||
grunt.registerTask('build', ['test', 'concatenate', 'uglify']);
|
||||
grunt.registerTask('prep-release', ['build', 'changelog']);
|
||||
|
||||
// Default task(s).
|
||||
|
|
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
|
@ -38,7 +38,7 @@
|
|||
"devDependencies": {
|
||||
"chai": "^1.10.0",
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-bump": "^0.3.1",
|
||||
"grunt-contrib-clean": "^0.6.0",
|
||||
"grunt-contrib-concat": "^0.5.0",
|
||||
"grunt-contrib-jshint": "^0.10.0",
|
||||
"grunt-contrib-uglify": "^0.6.0",
|
||||
|
@ -46,10 +46,7 @@
|
|||
"grunt-jscs": "^1.2.0",
|
||||
"grunt-simple-mocha": "^0.4.0",
|
||||
"js-beautify": "^1.5.6",
|
||||
"jscs": "^1.10.0",
|
||||
"load-grunt-tasks": "^3.2.0",
|
||||
"mocha": "*",
|
||||
"should": "^4.4.2",
|
||||
"sinon": "^1.14.1",
|
||||
"source-map-support": "^0.2.9"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user