esr

esrislurp

Download and unwind esri js api amd modules and css to create a local package for builds, testing, and continuous integration.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

13

Maintenance

Last Commit

6yrs ago

Contributors

3

Package

Dependencies

6

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Deprecated!
the esri package can be pulled via bower install arcgis-js-api. This stop gap is no longer necessary.

Readme

Build Status Dependency Status NPM version

esrislurp may the slource™ be with you!

Download and unwind esri js api amd modules and css to create a local package for builds, testing, and continuous integration. The best way to get the slource™.

Getting Started

Unfortunately, Esri's Javascript API isn't available through more easier ways such as NPM or Bower. This tool is the next best thing. It will download the entire Javascript API including CSS into the source directory of your project.

###Install Install esrislurp from NPM:

npm install esrislurp --save-dev

###Usage

####esrislurp(baseDir, version, [beautify], [onSuccess], [onError], [onProgress])

#####baseDir Type: String

A string value letting esrislurp know where to put the downloaded files.

#####version Type: String Valid Values: "3.13"|"3.13compact"

A string value representing the version of the esri js api to download.

All versions from 3.0 to 3.13 both standard and compact are valid.

#####beautify Type: Boolean Default value: false

A boolean value to make the js and css code beautiful.

#####onSuccess() Type: function Default value: noop()

A function which is called once all files have been successfully downloaded.

#####onError(errorMessage) Type: function Default value: noop()

A function which is called if an error occurs. errorMessage is the error.

#####onProgress(progress) Type: function Default value: noop()

A function which is called after each file is downloaed. progess is an object with two attributes: total, which holds the total amount of files to be downloaded; and count, which holds the current amount of files downloaded.

Example

var esrislurp = require('esrislurp'),
    baseDir = 'src',
    version = '3.13',
    beautify = true;

function onSuccess() {
  console.log('Esri JS API successfully downloaded');
}

esrislurp(baseDir, version, beautify, onSuccess);

##Build Tools

###Grunt

See grunt-esri-slurp

###Gulp

var gulp = require('gulp');
var esrislurp = require('esrislurp')

gulp.task('download-esri-api', function(cb) {
  esrislurp('src', '3.13compact', cb, cb);
});

Adding new modules

  1. Download the API: Navigate to the esri downloads page and download the API selecting the version you want to create a module list for.
  2. Run add-module: npm run add-module path/to/arcGisJsApi.zip

Release History

1.2.3: Updated unwinder to create successful dojo builds with 3.14

1.2.1: Added esri version 3.14

1.2.0: Introduce the creation of a module list from a zip file for both compact and full api. Introduce the ability to slurp the compact api.

1.1.0: Update dependencies. Fix bugs to allow for all node versions to complete successfully.

1.0.3: Remove string.js dependency from module builder.

1.0.2: Remove string.js dependency.

1.0.1: Update dependencies to remove log error messages.

1.0.0: Fixed 3.13 module list for successful builds.

0.4.2: Added esri version 3.13 from download page.

0.4.1: Added esri version 3.13.

0.4.0: Added esri modules back to version 3.5.

License

Copyright (c) 2014 steveoh. Licensed under the MIT license.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial