1.0.13 • Published 6 years ago

stc-cdn v1.0.13

Weekly downloads
56
License
-
Repository
github
Last release
6 years ago

stc-cdn

Upload resource to cdn for stc

Install

npm install stc-cdn

How to use

// stc.config.js

var cdn = require('stc-cdn');
var cdnAdapter = require('stc-cdn-xxx');

stc.workflow({
  cdn: {plugin: cdn, options: {adapter: cdnAdapter}}
});

Adapter introduction

adapter code like this:

export default function stcAdapter(content, filepath, options, cacheInstance){
  let value = await cacheInstance.get();
  if(value !== undefined){
    return value;
  }
  value = await getCdnUrl(content);
  await cacheInstance.set(value);
  return value;
}

Adapter list

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

7 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago