2.1.29 • Published 5 years ago

atomic-reactor-cli v2.1.29

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

Atomic Reactor CLI

A CLI for creating Atomic Reactor Awesomeness!

Installation

$ npm install -g atomic-reactor-cli

Usage

$ arcli <command> [options]

Options:
  -v, --version                 Output the version number.
  -h, --help                    Output usage information.

Commands:
  config [options]              ARCLI:    Set ARCLI key:value pairs.
  commander [options]           ARCLI:    Create a CLI function.

  cloud [options]               Actinium: Create a new Parse.Cloud function file.
  actinium [options] <install>  Actinium: Download and install.

  component [options]           Reactium: Create or replace a component.
  empty                         Reactium: Removes the default demo, styles, toolkit elements, and assets.
  reactium <install> [options]  Reactium: Download and install.
  reactium <update> [options]   Reactium: Update core.
  rename [options]              Reactium: Rename a component.
  style [options]               Reactium: Create a style sheet.

  element [action] [options]    Toolkit:  Manage toolkit elements.
                                          Available actions: create | updated | remove.
  group [action] [options]      Toolkit:  Manage toolkit groups.
                                          Available actions: create | updated | remove.  

Commands

<config>

Set or change configuration options.

Usage

$ arcli config --key 'reactium.repo' --value 'https://github.com/Atomic-Reactor/Reactium/archive/develop.zip'

The above would set the Reactium install package to the develop branch.

Flags:

--key, --value

-- key

The config object key. Use dot notation to access deeper keys in the config object.

--value

The config object value. You can set array values by putting a space between each value.

$ arcli config --key 'toolkit.types' --value 'atom molecule organism template link page'
Default config
{
  "prompt": {
    "delimiter": "",
    "prefix": "[ARCLI] > ",
    "prefixColor": "cyan"
  },
  "commands": [
    "[root]/commands",               // Resolves to the ~/global/node_modules/ARCLI/commands directory. Used for global commands.
    "[cwd]/.core/.cli/commands",     // Resolves to the ~/project/.core/.cli/commands directory. Used for application core commands.
    "[cwd]/.cli/commands"            // Resolves to the ~/project/.cli/commands directory. Used for project specific commands.
  ],
  "reactium": {
    "repo": "https://github.com/Atomic-Reactor/Reactium/archive/master.zip",
    "types": [
      "functional",
      "class"
    ]
  },
  "actinium": {
    "repo": "https://github.com/Atomic-Reactor/Actinium-2.0/archive/master.zip"
  },
  "toolkit": {
    "types": [
      "atom",
      "molecule",
      "organism",
      "template",
      "link"
    ]
  }
}

<commander>

Create custom ARCLI commands.

Usage

$ arcli commander

You will be prompted for a destination and command name

Flags:

--destination, --command, --overwrite

-d, --destination

Path where the command is saved.

If you're creating a project specific command, use the shortcut: cwd/ when specifying the destination.

This is the recommended location for custom commands.

$ arcli commander --destination 'cwd/my/function'

The boilerplate code for a new ARCLI function will be created in the ~/.cli/commands/my/function directory.

If you're creating an application specific command, use the shortcut app/ when specifying the destination.

Beware: Application specific commands are only suggested if you're contributing to the application and want those commands pushed out to future versions. For instance if you want to create a new Reactium or Actinium core command and plan on submitting a pull request for your new feature. Otherwise, they will be overwritten when you update your version of Reactium or Actinium.

$ arcli commander -d 'app/my/function'

The boilerplate code for a new ARCLI function will be created in the ~/.core/.cli/commands/my/function directory.

If you're creating a new ARCLI command, use the shortcut root/ when specifying the destination.

Beware: Root commands are only suggested if you're contributing to ARCLI and plan on submitting a pull request for your new feature. Otherwise, they will be overwritten whenever you update your version of ARCLI.

$ arcli commander -d 'root/my/function'
-c, --command

The command prompt.

$ arcli commander --command fubar --destination 'cwd/fubar'

You can create a command that accepts parameters as well:

$ arcli commander --command 'fubar test'

Creates a command that would be run by entering the following: arcli fubar test

Reactium Commands

<reactium> <install>

Downloads and installs Reactium into the current working directory. If the directory is not empty, you will be prompted to overwrite it or cancel the operation.

Usage

$ arcli reactium install

The config reactium.repo url is used when downloading Reactium.

-o, --overwrite

Overwrite the current working directory if it's not empty.

-e, --empty

Install Reactium without the default demo pages, components, and toolkit.

<reactium> <update>

Downloads and installs Reactium .core and updates to the package.json into the current working directory. The current version of your project will be backed up to the .BACKUP directory before update.

Usage

$ arcli reactium update

<empty>

Removes the default demo, styles, toolkit elements, and assets.

Usage

$ arcli empty --no-demo
-D, --no-demo

Keep the default demo site and components.

-T, --no-toolkit

Keep the default toolkit elements.

-S, --no-style

Do not empty the ~/src/assets/style/style.scss file.

-F, --no-font

Do not empty the ~/src/assets/fonts directory.

-I, --no-images

Do not empty the ~/src/assets/images directory.

<component>

Create or replace a Reactium component.

Usage

$ arcli component

Flags:

--name, --destination, --type, --type, --route, --redux, --redux-all, --actions, --actionTypes, --reducers, --services, --stylesheet, --overwrite

-n, --name

The component name. Used when importing the component.

-d, --destination

Path of the component's parent directory. If you're creating a component named Fubar and specify components/ as the --destination, the component will be saved to:

~/project/src/app/components/Fubar
-t, --type

The type of component to create. Uses the config reactium.types value for the list of types. Default types: functional | class

--route

Includes the route.js file for a routed component.

--redux

Create a Redux Class component.

--redux must be specified for any of the redux includes to apply.

--redux-all

Include all Redux related files.

--actions

Include Redux actions.js file.

--actionTypes

Include Redux actionTypes.js file.

--reducers

Include Redux reducers.js file.

--services

Include services.js file for creating adhoc service calls.

--stylesheet

Include _style.scss file and import into a parent stylesheet.

<rename>

Rename a Reactium component.

Usage

$ arcli rename --from 'FooBar' --to 'Fubar' --replace

Flags:

--from, --to, --directory, --replace

-f, --from

Component's current name.

-t, --to

Component's new name.

-d, --directory

Component's parent directory.

-r, --replace

Replace the component name in other files. Each file is backed up in the ~/.BACKUP directory.

You can use the shortcut components/, common-ui/, or cwd/ when specifying the directory.

<style>

Create a Reactium or Toolkit stylesheet.

Usage

$ arcli style -d 'cwd/public/assets/style' -f 'my-style.scss' -o

Flags:

--destination, --filename, --overwrite

-d, --destination

Path where the stylesheet is saved.

You can use the shortcut components/, common-ui/, or cwd/ when specifying the destination.

-f, --filename

The file name of the stylesheet.

-o, --overwrite

Overwrite an existing version of the stylesheet.

Toolkit Commands

<element> <create|update|remove>

Manage toolkit elements.

Usage

$ arcli element create

$ arcli element update

$ arcli element remove

If no flags are specified, you will be prompted to input corresponding values.

Flags:

--id, --name, --group, --label, --menu-order, --stylesheet, --documentation, --code, --dna

--id

The element ID. Used when indexing the element in the toolkit manifest file.

--name

The element name. Used when importing the element into other components.

--group

The group the element is apart of. Groups are how the toolkit menu structures elements.

--label

The menu link text.

--menu-order

The menu link index relative to other elements in the group.

--stylesheet

Add a stylesheet for the element.

--documentation

Create a readme for the element and display it in the toolkit.

--code

Show the Code View for the element.

--dna

Show the DNA info for the element.

<group> <create|update|remove>

Manage toolkit groups. Use this command to move things around in the toolkit manifest.

Usage

$ arcli group create

Flags:

--id, --menu-order, --label, --overwrite

--id

The group id.

--menu-order

The toolkit manifest index.

--label

The menu item text label.

--overwrite

Overwrite the group object,

Actinium Commands

<actinium> <install>

Downloads and installs Actinium into the current working directory. If the directory is not empty, you will be prompted to overwrite it or cancel the operation.

Usage

$ arcli actinium install

Flags:

--overwrite

-o, --overwrite

Overwrite the current working directory if it's not empty.

<cloud>

Actinium uses The Parse Platform and this command helps in creating new Parse.Cloud functions.

Usage

$ arcli cloud

Flags:

--destination, --collection, --definitions, --beforeFind, --beforeDelete, --beforeSave, --afterSave, --afterDelete, --overwrite

--destination

Parent directory of the Cloud Function.

Actinium looks in the ~/src/app/cloud directory for .js files and loads them as cloud functions. You can use the cloud/ shortcut when specifying the destination. Example: $ arcli element --destination 'cloud/my/function will put the cloud function in the ~/src/app/cloud/my/function directory.

--collection

The database collection for before/after hooks.

// Use the Parse.User collection
$ arcli element --collection '_User'
--definition

Parse.Cloud.define() definitions.

$ arcli element --definitions 'userSave userDelete'

Note: you can specify multiple definitions by putting a space between values.

--beforeFind

Include Parse.Cloud.beforeFind(COLLECTION) function.

--beforeDelete

Include Parse.Cloud.beforeDelete(COLLECTION) function.

--beforeSave

Include Parse.Cloud.beforeSave(COLLECTION) function.

--afterDelete

Include Parse.Cloud.afterDelete(COLLECTION) function.

--afterSave

Include Parse.Cloud.afterSave(COLLECTION) function.

See the Parse Cloud Guide for more information on Cloud functions.

Masterfully Powered By: npm.io

2.1.29

5 years ago

2.1.28

5 years ago

2.1.25

5 years ago

2.1.26

5 years ago

2.1.23

5 years ago

2.1.22

5 years ago

2.1.21

5 years ago

2.1.20

5 years ago

2.1.19

5 years ago

2.1.18

5 years ago

2.1.17

5 years ago

2.1.16

5 years ago

2.1.15

5 years ago

2.1.14

5 years ago

2.1.13

5 years ago

2.1.12

5 years ago

2.1.11

5 years ago

2.1.10

5 years ago

2.1.9

5 years ago

2.1.8

5 years ago

2.1.7

5 years ago

2.1.6

5 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.36

6 years ago

2.0.35

6 years ago

2.0.34

6 years ago

2.0.33

6 years ago

2.0.32

6 years ago

2.0.31

6 years ago

2.0.30

6 years ago

2.0.29

6 years ago

2.0.28

6 years ago

2.0.27

6 years ago

2.0.26

6 years ago

2.0.25

6 years ago

2.0.24

6 years ago

2.0.23

6 years ago

2.0.22

6 years ago

2.0.21

6 years ago

2.0.20

6 years ago

2.0.19

6 years ago

2.0.18

6 years ago

2.0.17

6 years ago

2.0.16

6 years ago

2.0.15

6 years ago

2.0.14

6 years ago

2.0.13

6 years ago

2.0.12

6 years ago

2.0.11

6 years ago

2.0.10

6 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.2.34

6 years ago

1.2.33

6 years ago

1.2.32

6 years ago

1.2.31

6 years ago

1.2.30

6 years ago

1.2.29

6 years ago

1.2.28

6 years ago

1.2.27

6 years ago

1.2.26

6 years ago

1.2.25

6 years ago

1.2.24

6 years ago

1.2.23

6 years ago

1.2.22

6 years ago

1.2.20

6 years ago

1.2.19

6 years ago

1.2.18

6 years ago

1.2.17

6 years ago

1.2.16

6 years ago

1.2.15

6 years ago

1.2.14

6 years ago

1.2.13

6 years ago

1.2.12

6 years ago

1.2.9

7 years ago

1.2.8

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.10

7 years ago

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.32

7 years ago

1.0.31

7 years ago

1.0.30

7 years ago

1.0.28

7 years ago

1.0.27

7 years ago

1.0.26

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago