Created
May 3, 2016 00:20
-
-
Save stacylondon/fd8e5e193c1c8f333e8bdc5e16d39ff2 to your computer and use it in GitHub Desktop.
Jasmine Custom Templates - Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var template = './tests/template/app-measurement-template.tmpl'; | |
exports.process = function(grunt, task, context) { | |
var packageJson = grunt.file.readJSON('package.json'); | |
var myLibrary = './AppMeasurment'; | |
var myLibraryVersion = packageJson.version + '.js'; | |
if (context.options.minified) { | |
myLibrary += '.min-' + myLibraryVersion; | |
} else { | |
myLibrary += '-' + myLibraryVersion; | |
} | |
//console.log('************ myLibrary: ' + myLibrary); | |
task.copyTempFile(myLibrary, 'myLibrary.js'); | |
var source = grunt.file.read(template); | |
return grunt.util._.template(source, context); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment