mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Adding banner
This commit is contained in:
+18
-1
@@ -2,6 +2,11 @@ module.exports = function(grunt) {
|
|||||||
require('load-grunt-tasks')(grunt);
|
require('load-grunt-tasks')(grunt);
|
||||||
|
|
||||||
grunt.initConfig({
|
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: {
|
clean: {
|
||||||
dist: 'dist/**'
|
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: {
|
karma: {
|
||||||
options: {
|
options: {
|
||||||
configFile: 'karma.conf.js'
|
configFile: 'karma.conf.js'
|
||||||
@@ -53,7 +70,7 @@ module.exports = function(grunt) {
|
|||||||
|
|
||||||
grunt.registerTask('test', ['webpack:global', 'nodeunit', 'karma:single']);
|
grunt.registerTask('test', ['webpack:global', 'nodeunit', 'karma:single']);
|
||||||
grunt.registerTask('build', ['webpack']);
|
grunt.registerTask('build', ['webpack']);
|
||||||
grunt.registerTask('publish', ['clean', 'test', 'build', 'update_json']);
|
grunt.registerTask('publish', ['clean', 'test', 'build', 'usebanner', 'update_json']);
|
||||||
|
|
||||||
function generateWebpackConfig() {
|
function generateWebpackConfig() {
|
||||||
var webpack = require('webpack');
|
var webpack = require('webpack');
|
||||||
|
|||||||
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
+2
-1
@@ -40,6 +40,7 @@
|
|||||||
"karma-phantomjs-launcher": "^0.1.4",
|
"karma-phantomjs-launcher": "^0.1.4",
|
||||||
"karma-jasmine-ajax": "^0.1.4",
|
"karma-jasmine-ajax": "^0.1.4",
|
||||||
"grunt-update-json": "^0.1.3",
|
"grunt-update-json": "^0.1.3",
|
||||||
"grunt-contrib-nodeunit": "^0.4.1"
|
"grunt-contrib-nodeunit": "^0.4.1",
|
||||||
|
"grunt-banner": "^0.2.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user