added missing modules for makepot task + added suport for plural forms in html templates + added all major i18n methods in twig
This commit is contained in:
29
tasks/makepot/node_modules/load-grunt-tasks/index.js
generated
vendored
Normal file
29
tasks/makepot/node_modules/load-grunt-tasks/index.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
var path = require('path');
|
||||
var findup = require('findup-sync');
|
||||
var multimatch = require('multimatch');
|
||||
|
||||
function arrayify(el) {
|
||||
return Array.isArray(el) ? el : [el];
|
||||
}
|
||||
|
||||
module.exports = function (grunt, opts) {
|
||||
opts = opts || {};
|
||||
|
||||
var pattern = arrayify(opts.pattern || ['grunt-*', '@*/grunt-*']);
|
||||
var config = opts.config || findup('package.json');
|
||||
var scope = arrayify(opts.scope || ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies']);
|
||||
|
||||
if (typeof config === 'string') {
|
||||
config = require(path.resolve(config));
|
||||
}
|
||||
|
||||
pattern.push('!grunt', '!grunt-cli');
|
||||
|
||||
var names = scope.reduce(function (result, prop) {
|
||||
var deps = config[prop] || [];
|
||||
return result.concat(Array.isArray(deps) ? deps : Object.keys(deps));
|
||||
}, []);
|
||||
|
||||
multimatch(names, pattern).forEach(grunt.loadNpmTasks);
|
||||
};
|
Reference in New Issue
Block a user