generator-mozu-actions

1.3.9 • Public • Published

Mozu Actions generator

Maintainer: James Zetlen

A Mozu Actions generator for Yeoman that provides boilerplate and structure for writing Mozu Custom Functions against the family of Mozu Code Actions. It provides documented function stubs, a build process using Grunt and Browserify, remote sync with the Developer Center, and unit tests using Mocha plus the Mozu Action Simulator.

A screenshot of the generator in action in an OSX terminal.

Usage

First, install Yeoman's command line tool if you haven't already!

npm install -g yo

Yeoman looks for globally installed NPM packages that identify themselves as Yeoman generators. So install the generator globally. Also, install the grunt-cli command line Grunt package, because you'll need it.

npm install -g generator-mozu-actions grunt-cli

Make a new directory and cd into it:

mkdir example && cd example

Run the Yeoman generator!

yo mozu-actions

Options

  • --skip-install

    Skips the automatic execution of npm install after scaffolding has finished.

  • --skip-prompts

    Often you may find yourself rerunning the generator in the same directory. Your answers to prompts are saved; if you want to quickly re-run the generator without prompts, use this option. Will not work if you've never run the generator in this directory before.

  • --quick

    Equivalent to --skip-install --skip-prompts.

  • --internal

    Allows integration with non-production Mozu environments. The prompts will include an extra question about which environment to sync with.

Creating Additional Actions

The generator uses a Yeoman sub-generator to create the action implementation scaffolds and unit test scaffolds. You can call this sub-generator directly, after creating your project, to add more scaffolding for additional actions:

yo mozu-actions:action

This will prompt you to add to your list of actions, and then will write the additional action scaffolds.

Readme

Keywords

Package Sidebar

Install

npm i generator-mozu-actions

Weekly Downloads

4

Version

1.3.9

License

MIT

Unpacked Size

165 kB

Total Files

21

Last publish

Collaborators

  • dirkelfman
  • ak7
  • mozuintegrations
  • rocky0904