1.0.0-bate.11 • Published 3 years ago
cosis v1.0.0-bate.11
COSIS
Cloud object storage integrate
- Integrate Alibaba Cloud\Huawei Cloud\Tencent Cloud Object Storage to upload static files
Install
npm install cosis --save
//Create a file
cosis.config.json
API
//Get hash value
hexGenerator()
//Get the cloud object storage access path asynchronous
sourceUrls(hex)
//start operation asynchronous
startOperations()
Example
let hex = hexGenerator(4)
startOperations(hex);
let srcs = sourceUrls()
Example Web Pack
const fs = require('fs');
const cosis = require('cosis');
let hex = cosis.hexGenerator(4)
cosis.sourceUrls(hex).then((res)=>{
console.log(res)
})
class myPlugin {
apply(compiler) {
compiler.hooks.afterEmit.tapAsync(
{
name: 'MyPlugin',
context: true,
},
(context, compiler, callback) => {
cosis.startOperations(hex)
callback()
}
);
}
}
configureWebpack = {
plugins: [
new myPlugin()
]
}
Command
npm run cosi:test
Use environment
Node.js
Acknowledgments to open source people and companies
Doc
./doc
License
COSI is available under the MIT license. COSI also includes external libraries that are available under a variety of licenses. See LICENSE for the full license text.
1.0.0-bate.11
3 years ago
1.0.0-bate.10
3 years ago
1.0.0-bate.9
3 years ago
1.0.0-bate.8
3 years ago
1.0.0-bate.7
3 years ago
1.0.0-bate.6
3 years ago
1.0.0-bate.5
3 years ago
1.0.0-bate.3
3 years ago
1.0.0-bate.2
3 years ago
1.0.0-bate.1
3 years ago