Socket
Book a DemoInstallSign in
Socket

google-cdn-data-angular

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-cdn-data-angular

AngularJS Google CDN Data for google-cdn

0.6.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

google-cdn-data-angular

Google CDN data for google-cdn.

This module makes it easy to replace references in your app with links to the Angular libraries on the Google CDN.

Install

$ npm install --save-dev google-cdn google-cdn-data-angular

Usage

package.json:

{
  "name": "my-awesome-app",
  "dependencies": {
    "angular": "1.5.9"
  }
}
const googlecdn = require('google-cdn');
const fs = require('fs');
const assert = require('chai').assert;

const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
const markup = '<script src="node_modules/angular/angular.js"></script>';

googlecdn(markup, packageJson, { cdn: require('google-cdn-data-angular') }, function(err, result) {
  if (err) {
    throw err;
  }
  assert.equal(result, '<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.9/angular.min.js"></script>');
});

Easy usage with gulp-google-cdn

const gulp = require('gulp');
const googlecdn = require('gulp-google-cdn');

gulp.task('default', function () {
  return gulp.src('index.html')
    .pipe(googlecdn(require('./package.json'), {
      componentsPath: 'node_modules',
      cdn: require('google-cdn-data-angular')
    }))
    .pipe(gulp.dest('dist'));
});

License

MIT

Keywords

cdn

FAQs

Package last updated on 04 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.