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

gulp-cdn

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

gulp-cdn

use gulp workflow change cdn urls

  • 1.0.7
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Gulp-cdn plug


gulp-cdn: replace the html files require cdn domain automatically replace all the corresponding domain url, support the replacement javascript, css, img, etc. html code introduced using the domain name

Documentation

[Chinese] (https://github.com/roninliu/gulp-cdn/blob/master/README-ZH.md "Chinese") | [English] (https://github.com/roninliu/gulp-cdn/ blob / master / README.md "English")


1. Installation

npm install gulp-cdn --save-dev

2. gulpfile Configuration

var gulp = require ('gulp');
var cdn = require ('gulp-cdn');
gulp ("default", function () {
return gulp.src ("./ src / *. html")
.pipe (cdn ({
domain: "http: // localhost",
cdn: "http: // cdn"
}))
.pipe (gulp.dest ("./ dist /"))
})

3. Using After Effects

  • Replace ago
<Script src = "http: //localhost/js/common.js"> </ script>
<Link rel = "stylesheet" type = "text / css" href = "http: //localhost/index.css">
<Img src = "http: //localhost/img/share.png" alt = "">
  • Replace after
<Script src = "http: //cdn/js/common.js"> </ script>
<Link rel = "stylesheet" type = "text / css" href = "http: //cdn/index.css">
<Img src = "http: //cdn/img/share.png" alt = "">

More questions, please contact Ronin (roninliu@foxmail.com)

Keywords

FAQs

Package last updated on 28 Dec 2015

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