This package has been deprecated

Author message:

Please update dependencies to @adobe/aio-app-scripts

@adobe/io-cna-scripts

0.4.0-dev • Public • Published

Version Downloads/week Build Status License Greenkeeper badge Codecov Coverage

CNA Scripts

The module implementing the Adobe I/O CNA scripts

Include as a library in your nodejs project

npm i --save @adobe/io-cna-scripts
const cnaScripts = require('@adobe/io-cna-scripts')({
  listeners: {
    onStart: taskName => console.error(`${taskName} ...`),
    onEnd: (taskName, res) => { console.error(`${taskName} done!`); if (res) console.log(res) },
    onWarning: warning => console.error(warning),
    onProgress: item => console.error(`  > ${item}`)
  }
})

cnaScripts.buildUI()
  .then(cnaScripts.buildActions)
  .then(cnaScripts.deployActions)
  .then(cnaScripts.deployUI)
  .catch(e => { console.error(e); process.exit(1) })

Install globally to run directly

note this interface is experimental and may disappear in the future

npm i -g @adobe/io-cna-scripts

Commands:

cna-scripts build.actions
cna-scripts build.ui
cna-scripts deploy.actions
cna-scripts deploy.ui
cna-scripts undeploy.actions
cna-scripts undeploy.ui

Using cna-scripts for local dev

Requires docker!

  • run dev server, this will spin up a local OpenWhisk stack and run a small express server for the frontend
   cna-scripts dev
  • only run frontend server, the frontend will point to remotely deployed actions
   REMOTE_ACTIONS=true cna-scripts dev

Debugging with VS Code

Requires wskdebug which is not yet publicly available!

  • Actions can be debugged in both with local dev and remote actions dev modes

  • Simply start the dev server cna-scripts dev, this will generate all needed vscode debug configurations

  • Then start the vs code debugger from the configuration you want, i.e. choose WebAndActions to debug all actions and UI simultaneously or choose separate debuggers.

  • When you stop the dev server all vs code configurations are cleaned up and restored.

Contributing

Contributions are welcomed! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

Package Sidebar

Install

npm i @adobe/io-cna-scripts

Weekly Downloads

0

Version

0.4.0-dev

License

Apache-2.0

Unpacked Size

120 kB

Total Files

50

Last publish

Collaborators

  • dylandepass
  • djaeggi
  • adobehalls
  • fullcolorcoder
  • marbec
  • tripod
  • garthdb
  • lazd
  • adobe-admin
  • patrickfulton
  • trieloff
  • shazron
  • krisnye
  • dcpfsdk
  • natebaldwin
  • devongovett
  • aspro83
  • symanovi
  • dpfister
  • stefan-guggisberg
  • korra
  • rofe
  • kptdobe