grunt-sails-linker
Advanced tools
Comparing version 0.10.1 to 1.0.0
{ | ||
"name": "grunt-sails-linker", | ||
"description": "Autoinsert script tags in an html file", | ||
"version": "0.10.1", | ||
"homepage": "https://github.com/Zolmeister/grunt-sails-linker", | ||
"description": "Autoinsert <script> and <link> tags in an html file.", | ||
"version": "1.0.0", | ||
"homepage": "http://sailsjs.com", | ||
"contributors": [ | ||
"Mike McNeil <michael.r.mcneil@gmail.com> (http://mikermcneil.com)", | ||
"Zolmeister <zolikahan@gmail.com> (http://zolmeister.com)", | ||
@@ -12,3 +13,3 @@ "scott-laursen <thomas@addgo.com> (www.addgo.com)" | ||
"type": "git", | ||
"url": "https://github.com/Zolmeister/grunt-sails-linker.git" | ||
"url": "https://github.com/sailsjs/grunt-sails-linker.git" | ||
}, | ||
@@ -32,3 +33,2 @@ "main": "Gruntfile.js", | ||
"readmeFilename": "README.md", | ||
"gitHead": "efb0eaaf4e518cc5ff646955a2e03b91ac8b70fb", | ||
"directories": { | ||
@@ -35,0 +35,0 @@ "test": "test" |
@@ -5,6 +5,6 @@ # grunt-sails-linker | ||
## Getting Started | ||
This plugin requires Grunt `~0.4.x` | ||
## Getting started | ||
This plugin requires Grunt `~0.4.x` or `^1.0.0`. | ||
When the task is run the destination file(s) is updated with script tags pointing to all the source files. The reason this plugin was built was to automate the process of inserting script tags when building large web apps. | ||
When the task is run, the destination file(s) is updated with script tags pointing to all the source files. The reason this plugin was built was to automate the process of inserting script tags when building large web apps. | ||
@@ -83,1 +83,14 @@ ```shell | ||
#### options.inline | ||
Type: `Boolean` | ||
Default value: `false` | ||
Pass the contents of a file rather than the filepath into `fileTmpl`. For example, if `options.inline` is set to `true` and `fileTmpl` is set to `<script>%s</script>`, the script contents will be injected between `<script>` tags. | ||
## License | ||
Copyright © 2013 [Scott Laursen](http://github.com/scott-laursen) | ||
Copyright © 2013 [Zoli Kahan](http://github.com/Zolmeister) | ||
The [Sails framework](http://sailsjs.com) is free and open-source under the [MIT License](http://sailsjs.com/license). |
@@ -25,3 +25,4 @@ /* | ||
appRoot: '', | ||
relative: false | ||
relative: false, | ||
inline: false | ||
}); | ||
@@ -46,2 +47,6 @@ | ||
}).map(function (filepath) { | ||
if (options.inline) { | ||
var contents = grunt.file.read(filepath); | ||
return util.format(options.fileTmpl, contents); | ||
} | ||
filepath = filepath.replace(options.appRoot, ''); | ||
@@ -74,3 +79,2 @@ // If "relative" option is set, remove initial forward slash from file path | ||
} | ||
console.log('padding length', padding.length); | ||
newPage = page.substr(0, start + options.startTag.length) + grunt.util.linefeed + padding + scripts.join(grunt.util.linefeed + padding) + grunt.util.linefeed + padding + page.substr(end); | ||
@@ -77,0 +81,0 @@ // Insert the scripts |
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
11332
186
0
95
0