cloud-pages
v1.0.1
Published
Push your pages to cloud buckets (S3 for now).
Downloads
4
Readme
cloud-pages
Push your pages to cloud buckets (S3 for now).
API
Functions
initCloudPages($, [name], [dependencies]) ⇒ undefined
Declare cloudPages
in the dependency injection system
and allow to change its name/dependencies
Kind: global function
| Param | Type | Default | Description | | --- | --- | --- | --- | | $ | Knifecycle | | The knifecycle instance | | [name] | String | 'cloudPages' | The name of the service | | [dependencies] | Array | ['ENV', 'glob', 'fs', 'log', 's3', 'mime', 'git'] | The dependencies to inject |
cloudPages(services, options) ⇒ Promise
Deploy pages to the cloud and optionnally remove old versions
Kind: global function
Returns: Promise - A promise to be resolved when the deployment ended
| Param | Type | Description | | --- | --- | --- | | services | Object | Services (provided by the dependency injector) | | services.ENV | Object | Environment service | | services.glob | function | Globbing service | | services.fs | Object | File system service | | services.log | function | Logging service | | services.s3 | Object | S3 bucket service | | services.mime | Object | MIME mapping service | | services.git | Object | Repository service | | services.time | function | Time service | | options | Object | Options (destructured) | | options.last | Number | Number of prior versions to keep | | options.delay | Number | Delay for keeping prior versions | | options.dir | String | Directory that contains assets to deploy | | options.gitDir | String | Directory of the git repository to look for versions | | options.files | String | Pattern of files to deploy in the directory | | options.ignore | String | Pattern of files to ignore in the directory | | options.remove | Boolean | Boolean indicating if ld versions should be removed | | options.version | String | Version for the current deployment | | options.bucket | String | Targetted bucket |