postcss-assets-cdn
v0.0.8
Published
postcss-assets-cdn
Downloads
2
Readme
postcss-assets-cdn
postcss-assets-cdn
This PostCSS plugin will transform this:
.foo {
background: url('/assets/alipay.png')
}
To this:
.foo {
background: url(https://huixisheng.github.com/Fg0s0GU_xDPd2rOgAYYikJDTiEhL)
}
Installation
npm i -D postcss-assets-cdn
Usage
postcss([ require('postcss-assets-cdn') ])
Config
baseUrl: configDeploy.get('ossConfig.baseUrl'),
cache: '.cache.json',
ossConfig: {
accessKeyId: configDeploy.get('ossConfig.accessKeyId'),
accessKeySecret: configDeploy.get('ossConfig.accessKeySecret'),
bucket: configDeploy.get('ossConfig.bucket'),
endpoint: configDeploy.get('ossConfig.endpoint'),
https: true,
delDistImg: false,
region: configDeploy.get('ossConfig.region')
}
install x-config-deploy Setting to configure sensitive information