Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgee committed Jan 31, 2017
0 parents commit 6b60c92
Show file tree
Hide file tree
Showing 29 changed files with 2,501 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .csslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* https://github.com/CSSLint/csslint/wiki/Rules */
{
"important": false,
"adjoining-classes": false,
"known-properties": false,
"box-sizing": false,
"box-model": false,
"overqualified-elements": false,
"display-property-grouping": false,
"bulletproof-font-face": false,
"compatible-vendor-prefixes": false,
"regex-selectors": false,
"errors": true,
"duplicate-background-images": false,
"duplicate-properties": false,
"empty-rules": false,
"selector-max-approaching": false,
"gradients": false,
"fallback-colors": false,
"font-sizes": false,
"font-faces": false,
"floats": false,
"star-property-hack": false,
"outline-none": false,
"import": false,
"ids": false,
"underscore-property-hack": false,
"rules-count": false,
"qualified-headings": false,
"selector-max": false,
"shorthand": false,
"text-indent": false,
"unique-headings": false,
"universal-selector": false,
"unqualified-attributes": false,
"vendor-prefix": false,
"zero-units": false
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*{.,-}min.js
246 changes: 246 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
/* https://github.com/eslint/eslint/tree/master/docs/rules */
{
"rules": {

/*
Possible Errors
The follow rules point out areas where you
might have made mistakes.
*/
"comma-dangle": [2, "never"],
"no-cond-assign": 2,
"no-console": 2,
"no-constant-condition": 2,
"no-control-regex": 2,
"no-debugger": 1,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-empty-character-class": 2,
"no-empty": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 2,
"no-extra-semi": 2,
"no-func-assign": 2,
"no-inner-declarations": 2,
"no-invalid-regexp": 2,
"no-irregular-whitespace": 2,
"no-negated-in-lhs": 2,
"no-obj-calls": 2,
"no-regex-spaces": 2,
"no-sparse-arrays": 2,
"no-unexpected-multiline": 2,
"no-unreachable": 2,
"use-isnan": 2,
"valid-jsdoc": 2,
"valid-typeof": 2,

// ignored possible errors
"no-extra-parens": 0,


/*
Best Practices
These are rules designed to prevent you from making
mistakes. They either prescribe a better way of
doing something or help you avoid footguns.
*/
"accessor-pairs": [2, {
"getWithoutSet": true
}],
"block-scoped-var": 2,
"complexity": [1, 20], /** TODO always try to get this lower **/
"consistent-return": 2,
"curly": 2,
"default-case": 2,
"dot-location": [2, "property"],
"dot-notation": 2,
"eqeqeq": 2,
"guard-for-in": 2,
"max-statements": [1, 40, {"ignoreTopLevelFunctions": true}],
"no-alert": 2,
"no-caller": 2,
"no-div-regex": 2,
"no-else-return": 2,
"no-empty-pattern": 2,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-fallthrough": 2,
"no-floating-decimal": 2,
"no-implicit-coercion": 2,
"no-implied-eval": 2,
"no-iterator": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-multi-spaces": 2,
"no-multi-str": 2,
"no-native-reassign": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-new": 2,
"no-octal-escape": 2,
"no-octal": 2,
"no-process-env": 2,
"no-proto": 2,
"no-redeclare": 2,
"no-return-assign": 2,
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 2,
"no-unused-expressions": 2,
"no-useless-call": 2,
"no-useless-concat": 2,
"no-void": 2,
"no-with": 2,
"radix": 2,
"wrap-iife": [2, "inside"],
"yoda": 2,

// ignored best practices rules
"no-invalid-this": 0,
"no-magic-numbers": 0,
"no-param-reassign": 0,
"no-warning-comments": 2,
"vars-on-top": 0,


/*
Strict Mode
*/
"strict": 2,


/*
Variables
These rules have to do with variable declarations.
*/
"no-catch-shadow": 2,
"no-delete-var": 2,
"no-label-var": 2,
"no-shadow-restricted-names": 2,
"no-shadow": 2,
"no-undef-init": 2,
"no-undef": 2,
"no-unused-vars": 2,
"no-use-before-define": 2,
"no-undefined": 2,

// ignore variable rules
"init-declarations": 0,


/*
Stylistic Issues
These rules are purely matters of style and
are quite subjective.
*/
"array-bracket-spacing": [2, "never"],
"block-spacing": [2, "always"],
"brace-style": [2, "1tbs", {
"allowSingleLine": false
}],
"camelcase": 2,
"comma-spacing": [2, {
"before": false,
"after": true
}],
"comma-style": 2,
"computed-property-spacing": [2, "never"],
"consistent-this": [2, "self"],
"func-style": [2, "declaration"],
"indent": [2, 4],
"key-spacing": [2, {
"beforeColon": false,
"afterColon": true,
"mode": "strict"
}],
"keyword-spacing": [2, {"before": true, "after": true, "overrides": {}}],
"max-nested-callbacks": [2, 4],
"new-cap": 2,
"new-parens": 2,
"no-array-constructor": 2,
"no-continue": 2,
"no-lonely-if": 2,
"no-mixed-spaces-and-tabs": 2,
"no-multiple-empty-lines": 2,
"object-curly-spacing": [2, "never"],
"operator-assignment": 2,
"operator-linebreak": 2,
"quotes": [2, "single"],
"semi-spacing": [2, {
"before": false,
"after": true
}],
"semi": [2, "always"],
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, "always"],
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"wrap-regex": 2,

// ignored stylistic rules
"eol-last": 0,
"func-names": 0,
"id-match": 0,
"jsx-quotes": 0,
"lines-around-comment": 0,
"linebreak-style": 0,
"newline-after-var": 0,
"no-inline-comments": 0,
"no-negated-condition": 0,
"no-underscore-dangle": 0,
"one-var": 0,
"padded-blocks": 0,
"quote-props": 0,
"require-jsdoc": 0,
"space-unary-ops": 0,
"spaced-comment": 0,


/*
ECMAScript 6
These rules are only relevant to ES6 environments.
*/
"arrow-parens": [2, "always"],
"arrow-spacing": [2, {
"before": true,
"after": true
}],
"constructor-super": 2,
"generator-star-spacing": [2, {
"before": true,
"after": true
}],
"no-class-assign": 2,
"no-const-assign": 2,
"no-dupe-class-members": 2,
"no-this-before-super": 2,
"prefer-const": 2,
"prefer-spread": 2,
"require-yield": 2,

// ignored ECMA6 rules
"no-arrow-condition": 0,
"no-var": 0,
"object-shorthand": 0,
"prefer-arrow-callback": 0,
"prefer-reflect": 0,
"prefer-template": 0

},
"env": {
"amd": true,
"es6": true,
"browser": true
},
"globals": {
"define": true,
"require": true
},
"parser": "babel-eslint",
"extends": "eslint:recommended"
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
node_modules/
Empty file added .nojekyll
Empty file.
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: node_js
node_js:
- '5'
sudo: false
before_install: npm install -g grunt-cli
before_script: grunt build --verbose
deploy:
provider: releases
api_key:
secure: PbeHwM34muUp/D+g9gbpBj/ABYtKRmPkgRpvSMl8zxFw/slFEoepA25komkh4QO1VGV5xGtUiIz8F6Rg+uhgWiid0F+GAxDjVc9NAUAeK9ONzKpo9H5f7JJrESBnEp06R6CVR/hVPN5v2UlKUJd2MoRYHKTM/GlnCY8/L+0j0bU=
file: dist/cmv-calcite-maps.zip
on:
repo: tmcgee/cmv-calcite-maps
tags: true
all_branches: true
skip_cleanup: true
notifications:
slack:
secure: PGsxufNYe3UrJhJnblafVeCrOjYjfVs8N6leOVCriIhxwIWpDS+whiGOpQQxZNRVN4beSgEhCbewNXHT0t3RT/Mrz4G800Gkdi+JaVADM5ZUSvAzM+02J780MSmbityVBwsHAQpn1/+cBInKQ/Yxf+G2b4f4ZDBloThrJwxLHTA=
19 changes: 19 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2017 Tim McGee

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# cmv-calcite-maps

This repo combines [CMV](https://github.com/cmv/cmv-app) with Esri's [Calcite Maps](https://github.com/esri/calcite-maps/). Calcite Maps is "A theme for [Bootstrap](https://www.getbootstrap.com/) for designing, styling and creating modern map apps." The Esri repository provides documentation on the Calcite Maps CSS and JavaScript files.

## Implementation
There are very few changes needed to use Calcite Maps. The majority of the customizations are within the HTML page. See the [example](./demo.html). In addition, you will need to include the new [_CalciteMixin.js](./config/_CalciteMixin.js) in [app.js](./config/app.js). A CSS file [cmv-calcite.css](./css/cmv-calcite.css) is included which helps with the styling of your CMV application.

<img src="images/cmv-calcite-maps1.jpg">

##[Demo](https://tmcgee.github.io/cmv-calcite-maps/demo.html)
The demo in this repo [includes](./config/viewer.js) many core CMV widgets as well as a custom [Styler widget](widgets/CalciteStyler.js) adapted from Calcite Maps. You can use this widget to experiment with the different theme styles and colors.

<img src="images/cmv-calcite-maps2.jpg">

## Widgets
Most of the CMV core widgets work without modification. The notable exceptions are the Esri Editor and Directions widgets which have some styling issues. Custom The Directions widget will

It is expected that many of the [contributed CMV widgets](https://github.com/cmv/cmv-contrib-widgets) and widgets for Esri's Web AppBuilder (Using the method documented in [this repo](https://github.com/tmcgee/cmv-wab-widgets)) should work without modification though few have been tested at this point. Widgets that use a full pane like the [Attributes Table widget](https://github.com/tmcgee/cmv-widgets#attributes-tables) are not currently supported though hopefully will be in the near future.

<img src="images/cmv-calcite-maps3.jpg">

## Mobile
One of the strengths of using Calcite Maps is the responsive design provided by the Bootstrap framework.

<img src="images/cmv-calcite-maps4.jpg">

<img src="images/cmv-calcite-maps5.jpg">

## License

[MIT](LICENSE.md)
Loading

0 comments on commit 6b60c92

Please sign in to comment.