A command-line tool extends dva-cli, with JavaScript API for ArcGIS, using esri-loader.
Using the latest ArcGIS JavaScript API version 4.6. Also compatible with 3.x. (For example: version 3.23)
Install, create and start.
# Install
$ npm install dva-arcgis-cli -g
# Create app
$ dva-arcgis new myapp
# Start app
$ cd myapp
$ npm start
We have 2 commands: new
, init
.
Create app with new directory.
$ dva-arcgis new myapp
$ dva-arcgis new myapp --full
$ dva-arcgis new myapp --no-install
--full
-- A brand new boilerplate with full features Recommand
-
Features in this full boilerplate:
-
Upgrade roadhog to the latest version 2.x
-
Replace esri-loader with webpack amd mode
-
Apply redux middleware for map initialization, following Esri/react-redux-js4
-
Using Google sw-toolbox for ArcGIS JSAPI caching, following arcgis-service-worker
-
Using raw ES6+
--no-install
-- Disable npm install after files created
Create app in current directory. It's options is the same as dva-arcgis new
.
dva-arcgis-cli use roadhog for build and server, view roadhog#Configuration (中文版) for details.