Added JS to minifier

master
Keith Irwin 2018-03-08 21:13:19 +00:00
parent 6903b6c69a
commit fbbc290798
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
5 changed files with 6 additions and 10 deletions

5
.gitignore vendored
View File

@ -13,9 +13,8 @@ config/env/*
!config/env/sample.js !config/env/sample.js
!config/env/travis.js !config/env/travis.js
# Minified or bundled static files (can be built with `npm run minify && npm run build`) # Minified static files
static/css/*.min.* static/**/*.min.*
static/**/*.bun.*
# Ignore docs files # Ignore docs files
_gh_pages _gh_pages

View File

@ -7,7 +7,7 @@ branches:
before_script: before_script:
- echo "module.exports = require('./travis.js')" > config/env/env.js - echo "module.exports = require('./travis.js')" > config/env/env.js
script: script:
- npm run minify & npm run build - npm run minify
# Send coverage data to Coveralls # Send coverage data to Coveralls
after_script: after_script:

View File

@ -35,7 +35,7 @@ Then edit `config/env/local-config.js` to match your local environment.
Run Tracman with npm: Run Tracman with npm:
```sh ```sh
(npm run minify & npm run build) && npm start npm run minify && npm start
``` ```
...or with [nodemon](https://nodemon.io/): ...or with [nodemon](https://nodemon.io/):

View File

@ -60,7 +60,7 @@
"start": "node server.js", "start": "node server.js",
"nodemon": "nodemon --ignore 'static/**/*.min.*' server.js", "nodemon": "nodemon --ignore 'static/**/*.min.*' server.js",
"update": "sudo npm update && sudo npm prune", "update": "sudo npm update && sudo npm prune",
"minify": "minify --template .{{filename}}.min.{{ext}} --clean static/css*" "minify": "rm static/**/.*.min.* && minify --template .{{filename}}.min.{{ext}} --clean static/js ; minify --template .{{filename}}.min.{{ext}} --clean static/css"
}, },
"repository": "Tracman-org/Server", "repository": "Tracman-org/Server",
"keywords": [ "keywords": [

View File

@ -1,9 +1,6 @@
'use strict' 'use strict'
/* global alert mapuser userid disp noHeader mapKey navigator token */ /* global alert io $ loadGoogleMapsAPI mapuser userid disp noHeader mapKey navigator token */
import io from 'socket.io-client'
import $ from 'jquery'
import loadGoogleMapsAPI from 'load-google-maps-api'
// Variables // Variables
var map, marker, elevator, newLoc var map, marker, elevator, newLoc