Skip to content

Commit

Permalink
Merge branch 'develop' into fix/clean-up-draw-widget-html-css
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgee authored Mar 4, 2017
2 parents d6dce45 + db4c4d9 commit c9a69e8
Show file tree
Hide file tree
Showing 140 changed files with 4,327 additions and 1,884 deletions.
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--
If you’re filing a bug, please provide the following information:
-->

__How often can you reproduce it?__ <!-- Use [x] to mark your choice. -->

- [ ] Always
- [ ] Sometimes
- [ ] Rarely
- [ ] Unable
- [ ] I didn’t try

<!-- Please provide a detailed description of the issue. Include specific details to help us understand the problem. -->

__Description:__



<!-- List the step-by-step process to reproduce the issue. -->

__Steps to reproduce:__

1. Include a JS Bin (or equivalent) link if possible. [You can use this as a starting point](http://jsbin.com/guresequba/edit?js,output)
2. Detail the exact steps taken to produce the problem
3. Include a gif if possible; you can use LICEcap to make a gif: http://www.cockos.com/licecap/
4. Check the browser console for errors (Use F12 to access the console)

<!-- Describe what you expected to have happen after completing the steps above. -->

__Expected results:__



<!-- Describe what actually happened after completing the steps above. -->

__Actual results:__



<!-- Include details about your environment. -->

__Environment:__

| Software | Version
| ------------------ | -------
| CMV Version |
| Browser |
| Operating system |
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- Thank you for contributing to cmv! Contributions are welcome and are
absolutely necessary for the project to stay relevent and useful.
Please fill out the details to ensure others can understand the
changes you are proposing and how they will benefit the project. -->

# Description
<!-- enter a description of the changes here -->

# Use case

```javascript
// how the code can be used
```

# Checklist
<!-- please ensure your pull request passes the following check(s) -->

- [ ] `grunt lint` produces no error messages
17 changes: 11 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ module.exports = function (grunt) {
// middleware for grunt.connect
var middleware = function (connect, options, middlewares) {
// inject a custom middleware into the array of default middlewares for proxy page
var bodyParser = require('body-parser');
var proxypage = require('proxypage');
var proxyRe = /\/proxy\/proxy.ashx/i;

var enableCORS = function (req, res, next) {
res.setHeader('Access-Control-Allow-Origin', req.headers.origin);
res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*');
res.setHeader('Access-Control-Allow-Credentials', true);
res.setHeader('Access-Control-Allow-Methods', 'GET,HEAD,PUT,PATCH,POST,DELETE');
res.setHeader('Access-Control-Allow-Headers', req.headers['access-control-request-headers']);
res.setHeader('Access-Control-Allow-Headers', req.headers['access-control-request-headers'] || 'Origin, X-Requested-With, Content-Type, Accept');
return next();
};

Expand All @@ -24,8 +25,8 @@ module.exports = function (grunt) {

middlewares.unshift(proxyMiddleware);
middlewares.unshift(enableCORS);
middlewares.unshift(connect.json()); //body parser, see https://github.com/senchalabs/connect/wiki/Connect-3.0
middlewares.unshift(connect.urlencoded()); //body parser
middlewares.unshift(bodyParser.json()); //body parser, see https://github.com/senchalabs/connect/wiki/Connect-3.0
middlewares.unshift(bodyParser.urlencoded({extended: true})); //body parser
return middlewares;
};

Expand Down Expand Up @@ -124,6 +125,8 @@ module.exports = function (grunt) {
port: 3000,
base: 'viewer',
hostname: '*',
protocol: 'https',
keepalive: true,
middleware: middleware
}
},
Expand All @@ -132,16 +135,18 @@ module.exports = function (grunt) {
port: 3001,
base: 'dist/viewer',
hostname: '*',
protocol: 'https',
keepalive: true,
middleware: middleware
}
}
},
open: {
'dev_browser': {
path: 'http://localhost:3000/index.html'
path: 'https://localhost:3000/index.html'
},
'build_browser': {
path: 'http://localhost:3001/index.html'
path: 'https://localhost:3001/index.html'
}
},
compress: {
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# CMV - The Configurable Map Viewer

[![Read The Docs](https://img.shields.io/badge/docs-1.3.4-brightgreen.svg?style=flat)](http://docs.cmv.io/) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/cmv/cmv-app?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](http://travis-ci.org/cmv/cmv-app.svg?branch=master)](http://travis-ci.org/cmv/cmv-app)
[![Greenkeeper badge](https://badges.greenkeeper.io/cmv/cmv-app.svg)](https://greenkeeper.io/)

[![Read The Docs](https://img.shields.io/badge/docs-1.3.4-brightgreen.svg?style=flat)](http://docs.cmv.io/) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/cmv/cmv-app?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](http://travis-ci.org/cmv/cmv-app.svg?branch=master)](http://travis-ci.org/cmv/cmv-app)

## Introduction
[CMV](http://cmv.io/) is a community-supported open source mapping framework. CMV works with the [Esri JavaScript API](http://docs.cmv.io/en/latest/developers.arcgis.com/javascript/jsapi/), [ArcGIS Server](http://www.esri.com/software/arcgis/arcgisserver), [ArcGIS Online](https://arcgis.com/) and more.
[CMV](http://cmv.io/) is a community-supported open source mapping framework. CMV works with the [Esri JavaScript API](http://developers.arcgis.com/javascript/jsapi/3/), [ArcGIS Server](https://www.esri.com/software/arcgis/arcgisserver), [ArcGIS Online](https://arcgis.com/) and more.

## Make It Your Own!
This JavaScript web app can be easily configured or used as a boilerplate/starting point for basic viewers. It also demonstrates best practices for modular design and OOP via classes in JS using dojo's great [declare](http://dojotoolkit.org/reference-guide/1.9/dojo/_base/declare.html) system.
Expand All @@ -14,7 +16,8 @@ This JavaScript web app can be easily configured or used as a boilerplate/starti
![screen shot 2014-08-20 at 9 59 48 pm](https://cloud.githubusercontent.com/assets/661156/3991302/5aa2e0f2-28df-11e4-94d0-9c813937d933.png)

## Widgets Included:
- Base Maps
- Basemaps
- Basemaps Gallery
- Bookmarks
- Directions
- Draw
Expand All @@ -27,6 +30,7 @@ This JavaScript web app can be easily configured or used as a boilerplate/starti
- Identify
- Layer Control (Table of Contents)
- Legend
- Locale (Change the Country + Language)
- Locate Button (Geolocation)
- MapInfo
- Measure
Expand All @@ -39,6 +43,9 @@ This JavaScript web app can be easily configured or used as a boilerplate/starti

Read more about the [core widgets](http://docs.cmv.io/en/latest/widgets/). In addition, there is a growing number of [widgets contributed by the CMV developer community](https://github.com/cmv/cmv-contrib-widgets).

## Resource Proxy:
A [resource proxy](https://github.com/Esri/resource-proxy) may be required to access some MapServices and other content that reside on a different domain. A proxy is not available for the Github demo.

## Documentation:
Use the [documentation](http://docs.cmv.io/) for getting started and guidance on configuring your application. The initial documentation is sparse. Please help make it better by contributing over at the [cmv documentation repo](https://github.com/cmv/cmv-docs).

Expand Down
75 changes: 75 additions & 0 deletions package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/**
* This file is referenced by the `dojoBuild` key in `package.json` and provides extra hinting specific to the Dojo
* build system about how certain files in the package need to be handled at build time. Build profiles for the
* application itself are stored in the `profiles` directory.
*/

var profile = (function () {
//only copy files matching these expressions
//this prevents them from being evaluated as amd modules
var reCopyOnly = [
/Gruntfile/,
/package/,
/app\.js/
];
//exclude from builds completely
var reMiniExclude = [
/Gruntfile/,
/package/
];
//non-amd modules
var reNonAmd = [
/plugins\/Google/
];
return {
// Resource tags are functions that provide hints to the build system about the way files should be processed.
// Each of these functions is called once for every file in the package directory. The first argument passed to
// the function is the filename of the file, and the second argument is the computed AMD module ID of the file.
resourceTags: {
// Files that contain test code and should be excluded when the `copyTests` build flag exists and is `false`.
// It is strongly recommended that the `mini` build flag be used instead of `copyTests`. Therefore, no files
// are marked with the `test` tag here.
test: function (filename, mid) {
return false;
},

// Files that should be copied as-is without being modified by the build system.
// All files in the `app/resources` directory that are not CSS files are marked as copy-only, since these files
// are typically binaries (images, etc.) and may be corrupted by the build system if it attempts to process
// them and naively assumes they are scripts.
copyOnly: function (filename, mid) {
for (var i = 0; i < reCopyOnly.length; i++) {
if (reCopyOnly[i].test(filename)) {
return true;
}
}
return (/\/(images)\//.test(mid) && !/\.css$/.test(filename)) ||
/\/node_modules\//.test(mid);
},

// Files that are AMD modules.
// All JavaScript in this package should be AMD modules if you are starting a new project. If you are copying
// any legacy scripts from an existing project, those legacy scripts should not be given the `amd` tag.
amd: function (filename, mid) {
for (var i = 0; i < reNonAmd.length; i++) {
if (reNonAmd[i].test(filename)) {
return false;
}
}
return !this.copyOnly(filename, mid) && /\.js$/.test(filename);
},

// Files that should not be copied when the `mini` build flag is set to true.
// In this case, we are excluding this package configuration file which is not necessary in a built copy of
// the application.
miniExclude: function (filename, mid) {
for (var i = 0; i < reMiniExclude.length; i++) {
if (reMiniExclude[i].test(filename)) {
return true;
}
}
return false;
}
}
};
})();
34 changes: 18 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
{
"name": "ConfigurableMapViewerCMV",
"version": "1.4.0",
"version": "2.0.0-beta.1",
"author": "cmv.io - https://github.com/cmv/",
"license": "MIT",
"year": "2016",
"homepage": "http://cmv.io/",
"year": "2017",
"homepage": "https://cmv.io/",
"repository": "https://github.com/cmv/cmv-app/",
"dependencies": {
"babel-eslint": "6.0.x",
"csslint": "0.10.x",
"eslint": "2.5.x",
"grunt": "0.4.x",
"grunt-postcss": "0.8.x",
"babel-eslint": "~7.1.1",
"csslint": "1.0.x",
"eslint": "~3.17.0",
"grunt": "1.0.x",
"grunt-contrib-clean": "1.0.x",
"grunt-contrib-compress": "~1.4.1",
"grunt-contrib-connect": "1.0.x",
"grunt-contrib-copy": "1.0.x",
"grunt-contrib-csslint": "1.0.x",
"grunt-contrib-cssmin": "1.0.x",
"grunt-eslint": "18.0.x",
"grunt-contrib-uglify": "1.0.x",
"grunt-contrib-csslint": "~2.0.x",
"grunt-contrib-cssmin": "~2.0.0",
"grunt-contrib-uglify": "~2.2.0",
"grunt-contrib-watch": "1.0.x",
"grunt-newer": "1.1.x",
"grunt-eslint": "19.0.x",
"grunt-newer": "1.2.x",
"grunt-open": "0.2.x",
"grunt-contrib-compress": "1.2.x",
"grunt-postcss": "0.8.x",
"body-parser": "~1.17.0",
"proxypage": "*"
},
"engine": "node >= 4"
}
"engine": "node >= 4",
"dojoBuild": "package.js"
}
Binary file removed resource-proxy.zip
Binary file not shown.
Loading

0 comments on commit c9a69e8

Please sign in to comment.