grunt-yate
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -40,3 +40,4 @@ /* | ||
options: { | ||
autorun: true | ||
autorun: true, | ||
externals: 'test/fixtures/externals.js' | ||
}, | ||
@@ -43,0 +44,0 @@ files: { |
{ | ||
"name": "grunt-yate", | ||
"description": "Yate compiler plugin", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"homepage": "https://github.com/lapple/grunt-yate", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -24,2 +24,6 @@ /* | ||
// List of externals-containing files to be added to the compiled | ||
// templates. | ||
externals: [], | ||
// Default no-op postprocess function. Use `postprocess` | ||
@@ -51,3 +55,2 @@ // to define custom compiled code transformations. | ||
if (options.runtime) { | ||
@@ -57,2 +60,5 @@ src = runtime(src); | ||
// It is important to append externals after runtime. | ||
src = externals(src, options.externals); | ||
if (options.autorun) { | ||
@@ -72,2 +78,8 @@ src = autorun(src, options.autorun); | ||
function externals(code, externals) { | ||
return [code].concat(grunt.file.expand(externals).map(function(path) { | ||
return grunt.file.read(path); | ||
})).join(grunt.util.linefeed); | ||
} | ||
function runtime(code) { | ||
@@ -74,0 +86,0 @@ return grunt.file.read(path.join(yateFolder, 'runtime.js')) + '\n' + code; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
13383
13
291
0