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

ldl_cdn_replace

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldl_cdn_replace

gulp-cdn-replace ================

  • 0.0.4
  • unpublished
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

gulp-cdn-replace

替换html里面js和css引用地址

replace js' src and css' href with their cdn url.

No need for <!-- build --><!-- endbuild --> comments.

Install

npm install gulp-cdn-replace --save-dev

Example

gulpfile.js

var cdn = require('gulp-cdn-replace');

gulp.task('cdn', function() {
    gulp.src('./src/*.html')
        .pipe(cdn({
            dir: './dist',
            root: {
                js: 'http://cdn.example.com/somename',
                css: 'http://cdn.example.com/somename'
            }
        }))
        .pipe(gulp.dest('./dist'));
});

cdn(options)

options

Type: Object

options.dir

Type: String Default: './dist'

The directory where you place your js and css which may be created by gulp-rev.

options.root

Type: Object

options.root.js

Type: String

The CDN prefix for js files.

options.root.css

Type: String

The CDN prefix for css files.

FAQs

Package last updated on 31 Mar 2016

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

  • 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