Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-sails-linker

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-sails-linker - npm Package Compare versions

Comparing version 0.10.1 to 1.0.0

10

package.json
{
"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 &copy; 2013 [Scott Laursen](http://github.com/scott-laursen)
Copyright &copy; 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc