2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00

Adding banner

This commit is contained in:
Matt Zabriskie
2014-08-28 15:56:32 -06:00
parent 6bd8c3a493
commit 2fb81d805f
4 changed files with 22 additions and 2 deletions
+18 -1
View File
@@ -2,6 +2,11 @@ module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: '/* <%= pkg.name %> v<%= pkg.version %> | (c) <%= grunt.template.today("yyyy") %> by Matt Zabriskie */\n'
},
clean: {
dist: 'dist/**'
},
@@ -21,6 +26,18 @@ module.exports = function(grunt) {
}
},
usebanner: {
all: {
options: {
banner: '<%= meta.banner %>',
linebreak: false
},
files: {
src: ['dist/axios.min.js', 'dist/axios.amd.min.js']
}
}
},
karma: {
options: {
configFile: 'karma.conf.js'
@@ -53,7 +70,7 @@ module.exports = function(grunt) {
grunt.registerTask('test', ['webpack:global', 'nodeunit', 'karma:single']);
grunt.registerTask('build', ['webpack']);
grunt.registerTask('publish', ['clean', 'test', 'build', 'update_json']);
grunt.registerTask('publish', ['clean', 'test', 'build', 'usebanner', 'update_json']);
function generateWebpackConfig() {
var webpack = require('webpack');
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -40,6 +40,7 @@
"karma-phantomjs-launcher": "^0.1.4",
"karma-jasmine-ajax": "^0.1.4",
"grunt-update-json": "^0.1.3",
"grunt-contrib-nodeunit": "^0.4.1"
"grunt-contrib-nodeunit": "^0.4.1",
"grunt-banner": "^0.2.3"
}
}