UNPKG

axiom

Version:

Environment setup/runtime standardization for Node.js applications.

70 lines (47 loc) 2.04 kB
# Installation ```bash npm install -g axiom ``` # New Project If you don't want a broad-sweeping plugin for a specific type of app, and you'd prefer to start from scratch, do this. ```bash mkdir MyProj cd MyProj npm init axiom base install ``` # New Project (based on recipe) However, if you have a Plugin that references all the other dependencies you want, you can install that instead. Let's assume that I've created a standard within my company for how we build single page applications. It includes all the client/server side setup stuff (via other Plugins), and does some custom configuration which I prefer. Assuming the Plugin is published to NPM as 'axiom-mycompany-spa', I will type: ```bash axiom mycompany-spa install ``` And this should get me rolling very quickly with writing application logic. # Installing More Plugins Axiom Plugins are published to NPM as 'axiom-[plugin]', but we remove 'axiom-' when referring to them anywhere in Axiom. ```bash axiom [plugin] install ``` Automatically does the following: 1. npm install axiom-[plugin] --save 2. require axiom-[plugin] 3. install all dependencies 4. run 'install' service if it exists # Uninstalling Plugins ```bash axiom [plugin] uninstall ``` Automatically does the following: 1. require axiom-[plugin] 2. run 'uninstall' if it exists 3. npm uninstall axiom-[plugin] --save 4. uninstall all dependencies Beware that if you had any application functionality depending on this Plugin, it will no longer work. # Running Services The Protocol you're using defines a number of Plugin/Service combinations that form the basis for the CLI. For instance: ```bash axiom [plugin] [service] axiom client build axiom server run axiom server test ``` Usually you'll be running these commands, which are then extended by the various plugins you have installed. Alternatively, some Plugins may expose new Services that can be called standalone, and are not related to the Protocol. Check the specific Plugin's documentation for information on these.