grunt.config.get()_gruntjs api
2013-08-03 16:44
776 查看
来源: http://gruntjs.cn/api/config.get/
获取配置数据。
当传入prop时,获取一个配置的值。
<% %>模板字符串会自动调用
.config.process() 方法处理。
查看完整源代码
获取配置数据。
grunt.config.get([prop])
例子:
当没有传入prop时,获取全部配置数据。//grunt.config.init({ name: 'gruntjs.cn', project: 'gruntjs.cn' }); grunt.config.get(); //{ name : 'gruntjs.cn', project : 'gruntjs.cn' }
当传入prop时,获取一个配置的值。
grunt.config.get('name'); //gruntjs.cn
<% %>模板字符串会自动调用
.config.process() 方法处理。
//grunt.config.init({ project: 'gruntjs.cn', name: '<%= project %>' }); grunt.config.get('name'); //gruntjs.cn
源代码:
// Get config data, recursively processing templates. config.get = function(prop) { return config.process(config.getRaw(prop)); };
查看完整源代码
相关文章推荐
- grunt.config.get()_gruntjs api
- grunt.config.get()_gruntjs api
- grunt.config.init()_gruntjs api
- grunt.config.init()_gruntjs api
- grunt.config()_gruntjs api
- grunt.config()_gruntjs api
- grunt.config()_gruntjs api
- grunt.config.init()_gruntjs api
- 警告:"System.Configuration.ConfigurationSettings.GetConfig(string)”已过时
- getServletConfig() 与getServletContext() 的区别 .
- Linux: apt-get vs aptitude and 'ldconfig' problem solving (libc-bin package)
- 需要事先使用 ApiConfigKit.setThreadLocalApiConfig(apiConfig) 将 ApiConfig对象存入,才可以调用 ApiConfigKit.getApiConf
- getServletContext()和getServletConfig()的意思
- servlet.getServletContext()和getServletConfig(),什么意思和用法
- getServletContext()和getServletConfig()
- composer 錯誤Call to undefined method Composer\Package\RootPackage::getConfig
- Linux: apt-get vs aptitude and 'ldconfig' problem solving (libc-bin package)
- cordovaProject.projectConfig.getFileResources is not a function
- Exception: System.Web.CachedPathData.GetConfigPathData(String configPath)
- ubuntu使用apt-get --如何解决Please verify ICU install prefix and make sure icu-config works.