Skip to content

yanghuabei/edp-build-cdn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

66f3ce2 · Feb 9, 2017

History

4 Commits
Feb 9, 2017
Feb 9, 2017
Feb 9, 2017
Feb 9, 2017
Feb 9, 2017
Feb 9, 2017
Feb 9, 2017
Feb 9, 2017
Feb 9, 2017
Feb 9, 2017

Repository files navigation

edp-build-cdn

Build Status Coverage Downloads Downloads npm version dependencies dev dependencies License

Processor for edp-build to add cdn support.

Getting Started

Install it via npm:

npm install edp-build-cdn

And include in your project:

import CDNProcessor from 'edp-build-cdn';

let CDNProcessor = require('edp-build-cdn').default;

let processor = new CDNProcessor({
    name: 'CDNProcessor',
    // cdn加速域名
    domain: '//xxx.xxcdn.com',
    // cdn上的资源
    resourceTypes: '*.{js,css,png}',
    // 部署目录
    dist: 'app',
    // 需要处理的文件类型,目前仅支持html
    files: [
        '*.html'
    ],
    // 是否需要在html head中增加cdn域名的prefetch
    enableDNSPrefetch: true
});

License

MIT