Skip to content

Commit

Permalink
Merge pull request #61 from ecaldwell/master
Browse files Browse the repository at this point in the history
Major app overhaul
  • Loading branch information
ecaldwell committed Sep 18, 2014
2 parents 47a8cf5 + 673e179 commit 663646a
Show file tree
Hide file tree
Showing 48 changed files with 1,096 additions and 18,753 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
*.DS_Store
/node_modules
/build
/build
*.geojson

# Ignore build files
src/js/*.min.js
src/js/portal/*.min.js
build.zip
75 changes: 75 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*global module:false*/
module.exports = function (grunt) {

// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
// Task configuration.
clean: {
// Clean up build files.
src: ['src/js/portal/*.min.js', 'src/js/main.min.js'],
build: ['build/**']
},
jshint: {
// Validate the javascripts.
all: ['Gruntfile.js', 'src/js/*.js', 'src/js/portal/*.js']
},
concat: {
// Combine files where it makes sense.
options: {
separator: ';'
},
build_index: {
src: ['src/index.html', 'src/templates.html'],
dest: 'build/index.html'
}
},
uglify: {
// Minify the javascript files.
options: {
banner: '/*! <%= pkg.name %> <%= pkg.version %> */\n'
},
build: {
files: {
'src/js/main.min.js': 'src/js/main.js',
'src/js/portal/portal.min.js': 'src/js/portal/portal.js',
'src/js/portal/util.min.js': 'src/js/portal/util.js'
}
}
},
copy: {
// Copy everything to the build directory for testing.
main: {
files: [
{expand: true, cwd: 'src/', src: ['*.html'], dest: 'build/'},
{expand: true, cwd: 'src/', src: ['assets/**'], dest: 'build/'},
{expand: true, cwd: 'src/', src: ['css/**'], dest: 'build/'},
{expand: true, cwd: 'src/', src: ['js/*'], dest: 'build/',
rename: function(src, dest) {
return src + dest.replace('.min', '');
}
},
{expand: true, cwd: 'src/', src: 'js/portal/*', dest: 'build/',
rename: function(src, dest) {
return src + dest.replace('.min', '');
}
},
{expand: true, cwd: 'src/', src: ['js/lib/**'], dest: 'build/'}
]
}
},
});

// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');

// Default task.
grunt.registerTask('default', ['clean', 'jshint', 'concat', 'uglify', 'copy']);
grunt.registerTask('cleanup', ['clean']);

};
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This app uses the [ArcGIS Admin API](http://www.arcgis.com/apidocs/rest/) in [ArcGIS Online](http://www.arcgis.com/home/) and/or [Portal for ArcGIS](http://www.esri.com/software/arcgis/portal-for-arcgis) to copy items between accounts and across organizations.

[View it live](https://s3.amazonaws.com/dtc-apps/AgolAssistant/index.html)
[View it live](https://ago-assistant.esri.com)

![App](ago-assistant.png)

Expand All @@ -15,15 +15,24 @@ This app uses the [ArcGIS Admin API](http://www.arcgis.com/apidocs/rest/) in [Ar

## Instructions

1. Fork and then clone the repo.
1. Fork and then clone the repo -OR- [download a recent release](https://github.com/Esri/ago-assistant/releases).
2. Run and try the samples.

#### Using Grunt
This project uses [Grunt](http://gruntjs.com/) to automate building the application for deployment on a web server. It does a handful of things for you that will make life easier when setting up this application.

* Download and install [node.js](http://nodejs.org/).
* Download or clone this project to your machine.
* Go to the project folder in your terminal or command prompt and run `npm install`. (This should automatically download the project's dependencies, including Grunt).
* Run `grunt` from the command line. If you get an error saying `grunt is not recognized...` you may need to run the command `npm install -g grunt-cli` to install it globally.
* An optimized build of the app will be generated in the `build` folder.

## Requirements

* Notepad or your favorite HTML editor
* Web browser with access to the Internet

## Dependencies
## Third Party Libraries Used
* [jQuery](http://jquery.com/)
* [Bootstrap](http://getbootstrap.com/)
* [jQuery-UI](http://jqueryui.com/)
Expand Down
Binary file modified ago-assistant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/ago-assistant.png
Binary file not shown.
54 changes: 0 additions & 54 deletions js/main.js

This file was deleted.

Loading

0 comments on commit 663646a

Please sign in to comment.