1 | # @arcgis/cli
|
2 |
|
3 | [![npm version][npm-img]][npm-url]
|
4 | [![build status][travis-img]][travis-url]
|
5 | [![apache licensed](https://img.shields.io/badge/license-Apache%202.0-orange.svg?style=flat-square)](https://raw.githubusercontent.com/Esri/arcgis-js-cli/master/LICENSE)
|
6 |
|
7 | [npm-img]: https://img.shields.io/npm/v/@arcgis/cli.svg?style=flat-square
|
8 | [npm-url]: https://www.npmjs.com/package/@arcgis/cli
|
9 | [travis-img]: https://img.shields.io/travis/Esri/arcgis-js-cli/master.svg?style=flat-square
|
10 | [travis-url]: https://travis-ci.org/Esri/arcgis-js-cli
|
11 |
|
12 | This CLI will allow you to quickly scaffold various applications for the [ArcGIS API for JavaScript](https://developers.arcgis.com/javascript/).
|
13 |
|
14 | ## Usage
|
15 |
|
16 | ### Prerequisites
|
17 |
|
18 | You will need node v8+.
|
19 |
|
20 | * _NOTE FOR WINDOWS USERS_ - You may need to install the [Windows-Build-Tools](https://github.com/felixrieseberg/windows-build-tools) to compile npm modules for this project. `npm install --global --production windows-build-tools`
|
21 |
|
22 | ### Installation
|
23 |
|
24 | From NPM
|
25 |
|
26 | `npm install -g @arcgis/cli`
|
27 |
|
28 | In a terminal, run:
|
29 |
|
30 | `arcgis --help`
|
31 |
|
32 | This will output the following:
|
33 |
|
34 | ```sh
|
35 | Usage: arcgis <name> [dest] -t <type>
|
36 |
|
37 | Commands:
|
38 | arcgis create <name> [dest] Create a new application.
|
39 | arcgis init [type] Initialize a new application in current directory
|
40 | arcgis widget <name> [type] Create a new Widget.
|
41 | ```
|
42 |
|
43 | ## Quick Start
|
44 |
|
45 | > default template application
|
46 | ```sh
|
47 | arcgis create jsapi-app
|
48 | ```
|
49 |
|
50 | > react template application
|
51 | ```sh
|
52 | arcgis create jsapi-react-app -t react
|
53 | ```
|
54 |
|
55 | > vue template application
|
56 | ```sh
|
57 | arcgis create jsapi-vue-app -t vue
|
58 | ```
|
59 |
|
60 | > calcite-app-components template application using CDN
|
61 | ```sh
|
62 | arcgis create jsapi-calcite-app -t calcite --cdn
|
63 | ```
|
64 |
|
65 | ## Features
|
66 |
|
67 |
|
68 | Create a new application
|
69 |
|
70 | ```sh
|
71 | $ arcgis create <name> [dest]
|
72 |
|
73 | Create a new application.
|
74 |
|
75 | Options:
|
76 | --version Show version number [boolean]
|
77 | --name, -n directory and package name for the new app
|
78 | --dest Directory to create the application in [default: <name>]
|
79 | --type, -t A project template [choices: "jsapi". "react", "vue", "calcite"] [default: "jsapi"]
|
80 | --cdn Project template using JSAPI CDN (only valid with default or calcite) [default: false]
|
81 | -h, --help Show help [boolean]
|
82 |
|
83 | ```
|
84 |
|
85 | Initialize a new application in current directory
|
86 |
|
87 | ```sh
|
88 | $ arcgis init [type]
|
89 |
|
90 | Initialize a new application in current directory
|
91 |
|
92 | Options:
|
93 | --version Show version number [boolean]
|
94 | --type, -t A project template [choices: "jsapi". "react", "vue", "calcite"] [default: "jsapi"]
|
95 | --cdn Project template using JSAPI CDN (only valid with default or calcite) [default: false]
|
96 | -h, --help Show help [boolean]
|
97 | ```
|
98 |
|
99 | Create a new widget
|
100 |
|
101 | ```sh
|
102 | $ arcgis widget <name> [type]
|
103 |
|
104 | Create a new Widget.
|
105 |
|
106 | Options:
|
107 | --version Show version number [boolean]
|
108 | --name, -n Name of new widget
|
109 | --type, -t A widget template [choices: "jsapi"] [default: "jsapi"]
|
110 | -h, --help Show help [boolean]
|
111 | ```
|
112 |
|
113 |
|
114 | ## Issues
|
115 | Find a bug or want to request a new feature enhancement? Let us know by submitting an issue.
|
116 |
|
117 | ## Contributing
|
118 | Anyone and everyone is welcome to [contribute](CONTRIBUTING.md). We do accept pull requests.
|
119 |
|
120 | 1. Get involved
|
121 | 2. Report issues
|
122 | 3. Contribute code
|
123 | 4. Improve documentation
|
124 |
|
125 | ## Licensing
|
126 | Copyright 2018 Esri
|
127 |
|
128 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
129 |
|
130 | http://www.apache.org/licenses/LICENSE-2.0
|
131 |
|
132 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
133 |
|
134 | A copy of the license is available in the repository's [LICENSE](./LICENSE) file
|