/grunt-esri-slurp

download the esri js api

Primary LanguageJavaScriptMIT LicenseMIT

Build Status Dependency Status NPM version deprecated

Deprecation notice

Please consider the use of https://github.com/Esri/arcgis-js-api. Slurp was a stop gap while esri got their act together and published the jsapi to somewhere that makes slurp unnecessary. Thanks for all of the contributions and support along the way. This package will be around for legacy purposes only and will not get further updates unless there is a good reason to do so.

esri-slurp 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

This is a Grunt plugin for esrislurp.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-esri-slurp --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-esri-slurp');

The "esri_slurp" task

Overview

In your project's Gruntfile, add a section named esri_slurp to the data object passed into grunt.initConfig().

module.exports = function (grunt) {
  grunt.initConfig({
    esri_slurp: {
      options: {
        version: '3.13'
      },
      dev: {
        options: {
          beautify: true
        },
        dest: 'src/esri'
      },
      travis: {
        dest: 'src/esri'
      }
    }
  });

  grunt.loadNpmTasks('grunt-esri-slurp');

  grunt.registerTask('slurp', ['esri_slurp:dev']);
  grunt.registerTask('travis', ['esri_slurp:travis']);
};

Options

options.version

Type: String Default value: null

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

options.beautify

Type: Boolean Default value: false

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

Files

files.dest

Type: String Default value: null

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

Examples

For examples for working with grunt-esri-slurp please browse the AGRC JavaScript BoilerPlate project as well as @TomWayson's simple slurp example.

Release History

2.0.2 Update esrislurp to fix 3.14 dojo build errors.

2.0.1 Update esrislurp to include 3.14 esri modules.

2.0.0 Update esrislurp and remove module creation functionality.

1.4.7 Update esrislurp and other dependencies.

1.4.6 Update esrislurp.

1.4.5 Prune dependencies and update esrislurp.

1.4.4 Update esrislurp.

1.4.3 Update esrislurp 3.13 modules again.

1.4.2 Update esrislurp 3.13 modules.

1.4.1 Update dependencies. esrislurp now has 3.13 modules.

1.3.0 Added esri js api 3.12 modules. Create modules grunt task improvements.

1.2.0 Core logic extracted into esrislurp

1.1.0 Added esri js api 3.11 modules

1.0.0 changed packageLocation -> dest and removed default value. This follows the grunt conventions and makes slurp work with other plugins like grunt-if-missing. Removed the default value for the version property. Added css beautification.

0.6.0 esri_slurp is now a multi-task in order to have target level options.

0.5.0 Added js-beautify option. esriModuleBuilder task now works on windows. 3.10 module list now in plugin.

0.4.0: Added progress bar and task to build module list. Stored 3.8 and 3.9 modules by default. Anything earlier and you'll have to run it yourself.

0.3.0: Fixed async code and should now run on multiple os's.

0.2.0: Split up the defines so packages can be required again.

0.1.0: Can download modules to a specified location.

License

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