Moved functions to outer scope
This commit is contained in:
parent
6035cf89b7
commit
0ca03cae60
1 changed files with 34 additions and 34 deletions
|
@ -2,8 +2,6 @@ var path = require('path');
|
|||
var fs = require('fs');
|
||||
var ini = require('ini');
|
||||
|
||||
module.exports = function(grunt) {
|
||||
|
||||
var phpCheckStyleConfigPath = path.join(path.resolve(), 'phpcheckstyle.cfg');
|
||||
var phpSourcesDir = path.join(path.resolve(), 'src');
|
||||
var jsSourcesDir = path.join(path.resolve(), 'public_html/js');
|
||||
|
@ -27,7 +25,7 @@ module.exports = function(grunt) {
|
|||
return config;
|
||||
}
|
||||
|
||||
function readTemplates() {
|
||||
function readTemplates(grunt) {
|
||||
var templatePaths = grunt.file.expand(templatesDir + '/**/*.tpl');
|
||||
var templates = {};
|
||||
for (var i = 0; i < templatePaths.length; i ++) {
|
||||
|
@ -37,6 +35,8 @@ module.exports = function(grunt) {
|
|||
return templates;
|
||||
}
|
||||
|
||||
module.exports = function(grunt) {
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
|
@ -113,7 +113,7 @@ module.exports = function(grunt) {
|
|||
options: {
|
||||
data: {
|
||||
serviceName: config.basic.serviceName,
|
||||
templates: readTemplates(),
|
||||
templates: readTemplates(grunt),
|
||||
timestamp: grunt.template.today('isoDateTime'),
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue