New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-google-cdn

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-google-cdn - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

6

package.json
{
"name": "grunt-google-cdn",
"version": "0.2.2",
"version": "0.3.0",
"description": "Grunt task for replacing refs to resources on the Google CDN",

@@ -16,4 +16,4 @@ "main": "Gruntfile.js",

"dependencies": {
"bower": "~0.9.2",
"google-cdn": "~0.1.0"
"bower": ">=1.0.0",
"google-cdn": "~0.2.0"
},

@@ -20,0 +20,0 @@ "repository": {

@@ -30,2 +30,5 @@ # grunt-google-cdn [![Build Status](https://travis-ci.org/btford/grunt-google-cdn.png)](https://travis-ci.org/btford/grunt-google-cdn)

cdnify: {
options: {
cdn: 'google'
}
dist: {

@@ -53,2 +56,8 @@ html: ['app/*.html']

### Options
- `cdn`: defaults to `google`. The CDN you want to use. For options consult the
[google-cdn docs](https://github.com/passy/google-cdn#api).
## Release History

@@ -55,0 +64,0 @@

@@ -13,3 +13,6 @@ 'use strict';

var files = grunt.file.expand({ filter: 'isFile' }, this.data.html);
var compJson = grunt.file.readJSON(bowerConfig.json);
var compJson = grunt.file.readJSON('bower.json');
var options = this.options({
cdn: 'google'
});

@@ -32,9 +35,18 @@ // Strip the leading path segment off, e.g. `app/bower_components` ->

files.forEach(function (file) {
grunt.util.async.forEach(files, function (file, cbInner) {
var content = file.body;
content = googlecdn(content, compJson, { componentsPath: componentsPath });
grunt.file.write(file.path, content);
});
content = googlecdn(content, compJson, {
componentsPath: componentsPath,
cdn: options.cdn
}, function (err, content) {
if (err) {
return cbInner(err);
}
grunt.file.write(file.path, content);
cbInner();
});
}, this.async());
});
};
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