maf-cli
MAF SDK Command Line Interface
Last updated a year ago by jasperv .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install maf-cli 
SYNC missed versions from official npm registry.

???? MAF SDK Command Line Interface

Development automation for your MAF3 App projects

Commitizen friendly FOSSA Status

NPM

???? Contents

???? Install

$ npm i -g maf-cli
$ npm i -D maf-cli Metrological/maf3-sdk
$ touch .mafrc.js
$ maf init
$ maf --tasks

After running maf init all requirements will be created, installed and scaffolded based on the answers you provide. Some tasks have a dependency on a Metrological Dashboard API key. You can get one here.

To use this module with an already existing app, simply move that app out of the MAF3 SDK folder into it's own and run maf init on it.

As a shorthand you could run curl -L git.io/maf-cli | bash from within your project folder. And then run maf init.

Moving from maf3-sdk to maf-cli

If you are accustomed to working with the maf3-sdk then working with the maf-cli should be transparent. A lot of things are now handled for you. You can now depend your project on the maf-cli vs. running your app within the maf3-sdk. All apps from the maf3-sdk are included. As well as any dependencies. Your index.html file is no longer required. Any configuration you might have in there can be copied over to your maffile (.mafrc.js). Declaring your app, categories and ui is no longer required.

⚙️ Configuration

You can configure the MAF CLI via your .mafrc.js file. It has the following (default) options available:

{
  language: `nl` // set the default language of the Store and App
, es6: true // when true all your code will be transpiled (via the Closure Compiler) to ES5 before running and publishing
, autostart: false // when true auto-starts your app when browsing to https://localhost:8443
, store: `YOUR/STORE/ID_HERE` // use this when running the store task for example: metrological/nl/external
}

Additionally, you are able to define your own tasks within your maffile.

const maf = require( 'maf-cli' )

module.exports = {
  language: `nl`
, function hello() {
    console.log( `world` )
  }
}

This can be used to integrate any other tools you might use, or preprocess certain files.

You may also set some environment variables:

LANG=en_US.utf8 # for compatibility reasons, remove if this causes issues for you
TERM=xterm-256color # for compatibility reasons, remove if this causes issues for you
NODE_ENV=production # let's make sure we are equal to production as much as possible
NODE_PORT=8080 # change to your liking
NODE_SECURE_PORT=8443 # change to your liking
DOCS_PORT=9090 # change to your liking
METROLOGICAL_API_KEY="YOUR_API_KEY_HERE" # this is used for publishing your App

▶️ Usage

$ maf

The default task (run) will run and starts the SDK Server.

To run individual tasks, use maf <task>.

To display the list of build-in tasks, use maf --tasks

For an overview of available options and commands, use maf --help

⌨️ MAF key combinations:

Command Key
stop Shift + Down
play/pause Shift + Up
rewind Shift + Left
forward Shift + Right
back Backspace
red F1
green F2
yellow F3
blue F4
channel up PageUp
channel down PageDown

❌ Issue Submission

Please use GitHub Issues for issue submission.

Known Issues

The build-in proxy service uses xml2json which uses node-expat. On Windows this requires some extra work setting up. Please refer to it's documentation.

✅ Feature requests

Feature requests can be submitted via Issues as well.

Contribute

Feel free to send in any pull requests.

About

The idea for this module came from the desire to take the development of MAF3 apps into the 21st century. To allow for anyone to focus on building the app and less on managing releases and configuring the runtime environment. This module allows for your project to easily depend on the MAF3-SDK and make CI and CD more simple to handle. This is the first iteration of many more to come.

???? MAF3-SDK

You can learn more about the MAF3-SDK at it's website, or on GitHub.

For any questions regarding App developement please use the Metrological Helpdesk.

©️ License

MIT

FOSSA Status

Current Tags

  • 1.7.3                                ...           latest (a year ago)
  • 1.5.0                                ...           next (a year ago)

28 Versions

  • 1.7.3                                ...           a year ago
  • 1.7.2                                ...           a year ago
  • 1.7.1                                ...           a year ago
  • 1.7.0                                ...           a year ago
  • 1.6.0                                ...           a year ago
  • 1.5.10                                ...           a year ago
  • 1.5.8                                ...           a year ago
  • 1.5.7                                ...           a year ago
  • 1.5.6                                ...           a year ago
  • 1.5.5                                ...           a year ago
  • 1.5.4                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.4.0                                ...           a year ago
  • 1.3.18                                ...           a year ago
  • 1.2.15                                ...           a year ago
  • 1.2.14                                ...           a year ago
  • 1.2.13                                ...           a year ago
  • 1.2.12                                ...           a year ago
  • 1.2.11                                ...           a year ago
  • 1.2.10                                ...           a year ago
  • 1.2.9                                ...           a year ago
  • 1.2.8                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 29
Last Day 0
Last Week 29
Last Month 3
Dependencies (47)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |