module.exports = function(grunt) {
var pipeline = require('../pipeline');
var util = require('util');
grunt.config.set('sails-linker', {
devJs: {
options: {
startTag: '',
endTag: '',
fileRef: function(filepath) {
var tmpl = '';
return util.format(tmpl, filepath.substring(filepath.indexOf('/')));
},
appRoot: 'src/'
},
files: {
'layouts/partials/script.html': pipeline.tranquilpeakJsFilesToInject
}
},
devCss: {
options: {
startTag: '',
endTag: '',
fileRef: function(filepath) {
var tmpl = '';
return util.format(tmpl, filepath.substring(filepath.indexOf('/') + 1));
},
appRoot: 'src/'
},
files: {
'layouts/partials/head.html': pipeline.tranquilpeakCssFilesToInject
}
},
prodJs: {
options: {
startTag: '',
endTag: '',
fileRef: function(filepath) {
var tmpl = '';
return util.format(tmpl, filepath.substring(filepath.indexOf('/')));
},
appRoot: 'src/'
},
files: {
'layouts/partials/script.html': 'static/js/*.min.js'
}
},
prodCss: {
options: {
startTag: '',
endTag: '',
fileRef: function(filepath) {
var tmpl = '';
return util.format(tmpl, filepath.substring(filepath.indexOf('/') + 1));
},
appRoot: 'src/'
},
files: {
'layouts/partials/head.html': 'static/css/*.min.css'
}
}
});
grunt.loadNpmTasks('grunt-sails-linker');
};