0.0.12 • Published 4 years ago

postcss-cos v0.0.12

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

使用

.foo{
    background:url('./images/test.png')
}

编译后

.foo{
    background:url('https://cdn.io/weapp/[hash]')
}

安装

npm install postcss-cos --save-dev

yarn add postcss-cos

###配置

postcss

postcss([
  require("postcss-cos")({
    domain: "http://cdn.io"  //自定义cdn域名,不写默认为cos地址
    secretId: 'AKxxxxxxxxxxxxxxxxxxxxxx',
    secretKey: 'xxxxxxxxxxxxxxxxxxxxxx',
    bucket: 'xxxx-125000000',
    region: 'ap-chengdu',
    path:""   //上传到cos的路径,默认为weapp
  })
]);
> tarojs

weapp: { module: { postcss: { autoprefixer: { enable: true }, "postcss-cos": { enable: true, config: { domain: "http://cdn.io" //自定义cdn域名 secretId: 'AKxxxxxxxxxxxxxxxxxxxxxx', secretKey: 'xxxxxxxxxxxxxxxxxxxxxx', bucket: 'xxxx-125000000', region: 'ap-chengdu', path:"" //上传到cos的路径,默认为weapp } } } } },

0.0.12

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago