Skip to content

Commit

Permalink
Add Minifying scripts
Browse files Browse the repository at this point in the history
Also add gitignore to handle the npm files
  • Loading branch information
Robert Nordan committed Jan 22, 2015
1 parent 75d748a commit c86cee5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
1 change: 1 addition & 0 deletions dist/Control.MiniMap.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/Control.MiniMap.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,14 @@
},
"dependencies": {
"leaflet": ">=0.5.0"
},
"devDependencies": {
"uglify-js": "2.4.16",
"clean-css": "3.0.7"
},
"scripts": {
"build:js": "uglifyjs --output dist/Control.MiniMap.min.js src/Control.MiniMap.js",
"build:css": "cleancss --output dist/Control.MiniMap.min.css src/Control.MiniMap.css",
"build": "npm run build:css && npm run build:js"
}
}
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ These are not passed as options, but are overridden in a subclass. To do general
`hideText:` Text-String to be displayed as Tooltip when hovering over the toggle button on the MiniMap and it is visible.

`showText:` Text-String to be displayed as Tooltip when hovering over the toggle button on the MiniMap and it is hidden.

##Building minified versions
First, install node.js on your system. Then run `npm install` to get the dependencies, and `npm build` to build
the minified js and css.

0 comments on commit c86cee5

Please sign in to comment.