Git Product home page Git Product logo

esrislurp's Introduction

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.

esrislurp's People

Contributors

steveoh avatar stdavis avatar phillipgreenii avatar sfabijanski avatar

Watchers

Mike Davlantes 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.