1.0.1 • Published 7 years ago

cloud-pages v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

cloud-pages

Push your pages to cloud buckets (S3 for now).

NPM version Build status Dependency Status devDependency Status Coverage Status Code Climate Dependency Status

API

Functions

initCloudPages($, name, dependencies) ⇒ undefined

Declare cloudPages in the dependency injection system and allow to change its name/dependencies

Kind: global function

ParamTypeDefaultDescription
$KnifecycleThe knifecycle instance
nameString'cloudPages'The name of the service
dependenciesArray'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

ParamTypeDescription
servicesObjectServices (provided by the dependency injector)
services.ENVObjectEnvironment service
services.globfunctionGlobbing service
services.fsObjectFile system service
services.logfunctionLogging service
services.s3ObjectS3 bucket service
services.mimeObjectMIME mapping service
services.gitObjectRepository service
services.timefunctionTime service
optionsObjectOptions (destructured)
options.lastNumberNumber of prior versions to keep
options.delayNumberDelay for keeping prior versions
options.dirStringDirectory that contains assets to deploy
options.gitDirStringDirectory of the git repository to look for versions
options.filesStringPattern of files to deploy in the directory
options.ignoreStringPattern of files to ignore in the directory
options.removeBooleanBoolean indicating if ld versions should be removed
options.versionStringVersion for the current deployment
options.bucketStringTargetted bucket

License

MIT