Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #21 from Esri/prepare-for-release
Browse files Browse the repository at this point in the history
build 0.0.1-beta.1
  • Loading branch information
jgravois committed Jan 30, 2015
2 parents b59dcac + da5f8d7 commit c9c7a52
Show file tree
Hide file tree
Showing 8 changed files with 892 additions and 19 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog

# Beta 1

* First Beta release
* Works with esri-leaflet 1.0.0-rc.4 and higher
64 changes: 58 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
var fs = require('fs');

module.exports = function(grunt) {
var browsers = grunt.option('browser') ? grunt.option('browser').split(',') : ['PhantomJS'];

pkg: grunt.file.readJSON('package.json'),
var copyright = '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> Environmental Systems Research Institute, Inc.\n' +
'* Apache 2.0 License ' +
'*/\n\n';

var files = [
'src/EsriLeafletRenderers.js',
'src/Symbols/Symbol.js',
'src/Symbols/PointSymbol.js',
'src/Symbols/LineSymbol.js',
'src/Symbols/PolygonSymbol.js',
'src/Renderers/Renderer.js',
'src/Renderers/SimpleRenderer.js',
'src/Renderers/ClassBreaksRenderer.js',
'src/Renderers/UniqueValueRenderer.js',
'src/Markers/SquareMarker.js',
'src/Markers/DiamondMarker.js',
'src/Markers/CrossMarker.js',
'src/Markers/XMarker.js',
'src/FeatureLayerHook.js'
];

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

jshint: {
options: {
jshintrc: '.jshintrc'
Expand All @@ -18,6 +37,38 @@ module.exports = function(grunt) {
]
}
},

concat: {
options: {
sourceMap: true,
separator: '\n\n',
banner: copyright,
},
js: {
src: files,
dest: 'dist/esri-leaflet-renderers-src.js'
},
},

uglify: {
options: {
wrap: false,
mangle: {
except: ['L']
},
preserveComments: 'some',
report: 'gzip',
banner: copyright,
sourceMap: true,
sourceMapIncludeSources: true,
},
dist: {
files: {
'dist/esri-leaflet-renderers.js': files
}
}
},

karma: {
options: {
configFile: 'karma.conf.js'
Expand Down Expand Up @@ -81,18 +132,19 @@ module.exports = function(grunt) {
'src/FeatureLayerHook.js'

],
dest: 'dist/esri-leaflet-renderers.min.js'
dest: 'dist/esri-leaflet-renderers.js'
}
}
});

grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-karma');

grunt.registerTask('default', ['build']);
//grunt.registerTask('default', ['jshint','uglify', 'watch']);
grunt.registerTask('build', ['jshint', 'uglify', 'karma:coverage', 'watch']);
grunt.registerTask('build', ['test', 'concat', 'uglify', 'watch']);
grunt.registerTask('test', ['jshint', 'karma:run']);
grunt.registerTask('prepublish', ['concat', 'uglify']);
}
2 changes: 1 addition & 1 deletion dist/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Where are the files?

To download Esri Leaflet Renderers either build it from source by following the [development instructions](https://github.com/Esri/esri-leaflet-renderers#development-instructions) or download the [latest release](https://github.com/Esri/esri-leaflet-geocoder/releases) from GitHub.
To download Esri Leaflet Renderers either build it from source by following the [development instructions](https://github.com/Esri/esri-leaflet-renderers#development-instructions) or download the [latest release](https://github.com/Esri/esri-leaflet-renderers/releases) from GitHub.
Loading

0 comments on commit c9c7a52

Please sign in to comment.