grunt-sails-linker
Advanced tools
Comparing version 0.9.6 to 0.10.1
@@ -13,2 +13,4 @@ /* | ||
var util = require('util'); | ||
// Project configuration. | ||
@@ -38,3 +40,3 @@ grunt.initConfig({ | ||
endTag: '<!--SCRIPTS END-->', | ||
fileTmpl: '\n<script src="%s"></script>', | ||
fileTmpl: '<script src="%s"></script>', | ||
appRoot: 'test/' | ||
@@ -45,2 +47,16 @@ }, | ||
} | ||
}, | ||
fileRef_options: { | ||
options: { | ||
startTag: '<!--SCRIPTS-->', | ||
endTag: '<!--SCRIPTS END-->', | ||
fileRef: function (filepath) { | ||
var tmpl = '<script src="%s"></script>'; | ||
return util.format(tmpl, filepath); | ||
}, | ||
appRoot: 'test/' | ||
}, | ||
files: { | ||
'test/fixtures/**/*.html': 'test/fixtures/*.js' | ||
} | ||
} | ||
@@ -47,0 +63,0 @@ }, |
{ | ||
"name": "grunt-sails-linker", | ||
"description": "Autoinsert script tags in an html file", | ||
"version": "0.9.6", | ||
"version": "0.10.1", | ||
"homepage": "https://github.com/Zolmeister/grunt-sails-linker", | ||
@@ -22,6 +22,6 @@ "contributors": [ | ||
"devDependencies": { | ||
"grunt-contrib-jshint": "0.1.1", | ||
"grunt-contrib-clean": "0.4.0", | ||
"grunt-contrib-nodeunit": "0.1.2", | ||
"grunt": "0.4.0rc7" | ||
"grunt-contrib-jshint": "0.10.0", | ||
"grunt-contrib-clean": "0.6.0", | ||
"grunt-contrib-nodeunit": "0.4.1", | ||
"grunt": "0.4.5" | ||
}, | ||
@@ -28,0 +28,0 @@ "keywords": [ |
@@ -50,2 +50,3 @@ /* | ||
} | ||
filepath = (options.prefix||'') + filepath; | ||
if (options.fileRef) { | ||
@@ -52,0 +53,0 @@ return options.fileRef(filepath); |
@@ -38,3 +38,12 @@ 'use strict'; | ||
test.done(); | ||
}, | ||
fileRef_options: function(test) { | ||
test.expect(1); | ||
var actual = grunt.file.read('test/fixtures/file.html'); | ||
var expected = grunt.file.read('test/expected/file.html'); | ||
test.equal(actual, expected, 'should insert the available files in the file using the fileRef option.'); | ||
test.done(); | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
10658
182
1