node package manager

@studyportals/product-deploy

@studyportals/product-deploy@v2.2.2

NPM version NPM license NPM downloads Dependencies Development Dependencies

Toolset to deploy StudyPortals products

Modules

@studyportals/product-deploy

Classes

Deploy : Deploy
SimplePageTester : SimplePageTester

Functions

attachToGulp(gulp, opts)

Attach the deploy tasks to gulp

Tasks:

  • deploy.cms.workingcopy
  • deploy.servicelayer
  • deploy.servicelayer.codebuild

@studyportals/product-deploy

@studyportals/product-deploy.attachToGulp

Kind: static constant of @studyportals/product-deploy
See: lib/attachToGulp

@studyportals/product-deploy.Deploy

Kind: static constant of @studyportals/product-deploy
See: lib/Deploy

@studyportals/product-deploy.SimplePageTester

Kind: static constant of @studyportals/product-deploy
See: lib/SimplePageTester

Deploy : Deploy

Kind: global class

new Deploy(opts)

Param Type Default Description
opts Object
opts.to string Deploy folder
[opts.from] string "process.cwd()" Source folder
[opts.gulp] Gulp Instance of Gulp

deploy.assemble() ⇒ Promise

Copy the folder opts.from into opts.to

  • excludes certain files like .git, node_modules etc.

Kind: instance method of Deploy

deploy.writeRevisionJson() ⇒ Promise

Write the revision.json into opts.to.

Kind: instance method of Deploy

deploy.configure() ⇒ Promise

Copy the configuration from opts.from into opts.to.

It expects a folder structure like this:

  • Deploy/Config/Development
  • Deploy/Config/Live
  • Deploy/Config/Staging
  • Deploy/Config/Testing

The Live config is always copied, the environment specific folder only if process.env.PRTL_ENV is set and differs from Poduction or Live

Kind: instance method of Deploy

deploy.composer() ⇒ Promise

Install composer dependencies in the opts.from folder.

Kind: instance method of Deploy

deploy.prepare() ⇒ Promise

Prepares the deploy location

It makes sure the folder exists and is empty.

Kind: instance method of Deploy

deploy.sass() ⇒ Promise

Compile scss files into css.

Takes all *.scss files excluding the folders:

  • test
  • bower_components
  • node_modules
  • vendor

Kind: instance method of Deploy

deploy.js() ⇒ Promise

Compile js files (babel and uglify)

Takes all *.js files excluding the folders:

  • test
  • bower_component
  • node_modules
  • vendor

First it will pipe them through babel. When Deploy.enableCompression is true it will also uglyfies them.

Kind: instance method of Deploy

deploy.startWatchers() ⇒ undefined

Start the file watchers

  • js
  • scss
  • file

Kind: instance method of Deploy

SimplePageTester : SimplePageTester

Kind: global class

new SimplePageTester(repo, url)

Param Type Description
repo String Name of the GitHub repository
url String The base url to test.

simplePageTester.run(pages)

Executes simple accessibility tests to the specified pages.

If the pages cannot be reached, the test will be marked as failed.

Kind: instance method of SimplePageTester

Param Type Description
pages Array.<String> List of pages to test for statuscode 200

attachToGulp(gulp, opts)

Attach the deploy tasks to gulp

Tasks:

  • deploy.cms.workingcopy
  • deploy.servicelayer
  • deploy.servicelayer.codebuild

Kind: global function

Param Type
gulp Gulp
opts Object
opts.buildDir string

README.md generated at: Mon Sep 18 2017 14:09:21 GMT+0200 (W. Europe Daylight Time)