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

oh-my-cdn

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oh-my-cdn

Fetch and host scripts from Internet much easier

  • 0.1.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Oh My CDN

A simple file fetcher CLI.

How to use

Install

You can use Oh My CDN globally or package-specifically.

Global
npm i -g oh-my-cdn
Package Specific

Install

npm i -S oh-my-cdn

Add oh-my-cdn command to scripts inpackage.json

{
  "scripts": {
    "vendor": "oh-my-cdn"
  }
}

Configure

Add oh-my-cdn.json to your package

{
  "directory": "vendor",
  "targets": {
    "react": "https://fb.me/react-0.14.7.js",
    "react-dom": {
      "filename": "react-dom.min.js",
      "url": "https://fb.me/react-dom-0.14.7.min.js"
    }
  }
}

Run

Global
oh-my-cdn
Package Specific
npm run oh-my-cdn

API

oh-my-cdn.json

directory

A directory to save the fetched scripts.

This is optional. If it doesn't be set, files will be fetched to vendor by default.

targets

Files to fetch.

Each key means a file and accepts string and object as value.

If string is set, the string will be used as a URL and use the key for filename. If object is set, you must set url key. filename is optional.

Keywords

FAQs

Package last updated on 08 Jun 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