Giter Club home page Giter Club logo

arcgispack's Introduction

ArcGISPack

Bundle the ArcGIS API for you

examples:

How to use it ?

1- Add your arcgispack bundle to your application

You can use either a custon build or the ful build from the CDN.

<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/g3r4n/[email protected]/esri-bundle/bundle.js"></script>
<!-- uncomment the line below for local build -->
<!-- <script type="text/javascript" src="esri-bundle/bundle.js"></script> -->

Create your own bundle :

  1. add the package

Add arcgispack as a dev dependency:

npm i -D arcgispack
or
yarn add -D arcgispack
  1. create the arcgis.config.js in the root folder

https://github.com/g3r4n/arcgispack-cra-example/blob/master/arcgis.config.js

  1. update the configuration to match your needs
  • outputPath : folder where the API build will generate
  • dojoModules : Array of API dojo modules to build and to access through the lib entry
  1. generate a build (or update your package.json to create a task see here )
npx arcgispack
  1. Build your amazing app as you wish without tradeoff

2- Add your arcgispack bundle to your application

Use arcgis-wrapper to get modules from the ArcGIS JS API

import { Map, SceneView, SceneLayer } from "arcgis-wrapper";

Why ?

@arcgis/webpack-plugin got the following tradeoff :

  • you can't use creaste-react-app or other tools/template without changing the underlining configuration
  • you can't use another bundle tool other than webpack
  • you have to deal and understand webpack config

Using this tool to bundle the API let you build the application as you want without tradeoff.

TODO

  • Have the babel configuration in the tool to avoid saving the existing babel et reatoring the babel configuration
  • Change the DEFAULT_LOADER_URL in the esriconfig
  • Change DEFAULT_WORKER_URL in the esriconfig
  • restore copy of babel config in case of error
  • make it completely configurable
  • create a verbose and normal mode to limit the output list

arcgispack's People

Contributors

g3r4n avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.