1 | # Installation
|
2 |
|
3 | ```bash
|
4 | npm install -g axiom
|
5 | ```
|
6 |
|
7 | # New Project
|
8 |
|
9 | 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.
|
10 |
|
11 | ```bash
|
12 | mkdir MyProj
|
13 | cd MyProj
|
14 | npm init
|
15 | axiom base install
|
16 | ```
|
17 |
|
18 | # New Project (based on recipe)
|
19 |
|
20 | 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:
|
21 |
|
22 | ```bash
|
23 | axiom mycompany-spa install
|
24 | ```
|
25 |
|
26 | And this should get me rolling very quickly with writing application logic.
|
27 |
|
28 | # Installing More Plugins
|
29 |
|
30 | Axiom Plugins are published to NPM as 'axiom-[plugin]', but we remove 'axiom-' when referring to them anywhere in Axiom.
|
31 |
|
32 | ```bash
|
33 | axiom [plugin] install
|
34 | ```
|
35 |
|
36 | Automatically does the following:
|
37 |
|
38 | 1. npm install axiom-[plugin] --save
|
39 | 2. require axiom-[plugin]
|
40 | 3. install all dependencies
|
41 | 4. run 'install' service if it exists
|
42 |
|
43 | # Uninstalling Plugins
|
44 |
|
45 | ```bash
|
46 | axiom [plugin] uninstall
|
47 | ```
|
48 |
|
49 | Automatically does the following:
|
50 |
|
51 | 1. require axiom-[plugin]
|
52 | 2. run 'uninstall' if it exists
|
53 | 3. npm uninstall axiom-[plugin] --save
|
54 | 4. uninstall all dependencies
|
55 |
|
56 | Beware that if you had any application functionality depending on this Plugin, it will no longer work.
|
57 |
|
58 | # Running Services
|
59 |
|
60 | The Protocol you're using defines a number of Plugin/Service combinations that form the basis for the CLI. For instance:
|
61 |
|
62 | ```bash
|
63 | axiom [plugin] [service]
|
64 | axiom client build
|
65 | axiom server run
|
66 | axiom server test
|
67 | ```
|
68 |
|
69 | 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.
|