UNPKG

4.18 kBMarkdownView Raw
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
12This 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
18You 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
24From NPM
25
26`npm install -g @arcgis/cli`
27
28In a terminal, run:
29
30`arcgis --help`
31
32This will output the following:
33
34```sh
35Usage: arcgis <name> [dest] -t <type>
36
37Commands:
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
47arcgis create jsapi-app
48```
49
50> react template application
51```sh
52arcgis create jsapi-react-app -t react
53```
54
55> vue template application
56```sh
57arcgis create jsapi-vue-app -t vue
58```
59
60> calcite-app-components template application using CDN
61```sh
62arcgis create jsapi-calcite-app -t calcite --cdn
63```
64
65## Features
66
67
68Create a new application
69
70```sh
71$ arcgis create <name> [dest]
72
73Create a new application.
74
75Options:
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
85Initialize a new application in current directory
86
87```sh
88$ arcgis init [type]
89
90Initialize a new application in current directory
91
92Options:
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
99Create a new widget
100
101```sh
102$ arcgis widget <name> [type]
103
104Create a new Widget.
105
106Options:
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
115Find a bug or want to request a new feature enhancement? Let us know by submitting an issue.
116
117## Contributing
118Anyone and everyone is welcome to [contribute](CONTRIBUTING.md). We do accept pull requests.
119
1201. Get involved
1212. Report issues
1223. Contribute code
1234. Improve documentation
124
125## Licensing
126Copyright 2018 Esri
127
128Licensed 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
130http://www.apache.org/licenses/LICENSE-2.0
131
132Unless 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
134A copy of the license is available in the repository's [LICENSE](./LICENSE) file