add base tag
This plugin requires Grunt.
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-base-tag --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-base-tag');
In your project's Gruntfile, add a section named base_tag
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
base_tag: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
})
Type: String
Default value: ''
base 标签 href 的内容
在这个例子里,运行结果会把 example 目录下的所有 html 文件都加上
grunt.initConfig({
base_tag: {
options: {
'basePath': "http://..."
},
dist: ['example/*.html']
},
})
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
2016-02-25&npsp;&npsp;&npsp;v0.0.3&npsp;&npsp;&npsp;init
Copyright (c) 2016 CCG. Licensed under the MIT license.