Skip to content

Commit

Permalink
moved gulp commands to npm scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tobinbradley committed May 25, 2016
1 parent f3c53f8 commit e1fc4fe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
18 changes: 8 additions & 10 deletions README.md
Expand Up @@ -10,28 +10,26 @@ Built using:

## Building the Project

GeoPortal is strictly HTML/CSS/JS and can run locally via `gulp`.

First, install the global dependencies. You'll need Node and npm (if separate with your distro) installed before you begin.
First, install the project dependencies.

``` bash
npm install -g gulp tape
npm install
```

Next install the required modules.
Then build the public folder.

``` bash
npm install
npm run build
```

Then build the public folder.
Now you can launch a development environment at any time by typing:

``` bash
gulp build
npm run server
```

Now you can launch a development environment at any time by typing `gulp`. To build the app for deployment (minifying CSS and uglifying JS), add a type of production to your build.
To build the app for deployment (minifying CSS and uglifying JS), run the build again:

``` bash
gulp build --type production
npm run build
```
1 change: 0 additions & 1 deletion app/js/app.js
Expand Up @@ -125,7 +125,6 @@ function questionChange(elem, navs, container, changeType) {
// activate layers
if (global.map) {
if (elem.getAttribute("data-layers")) {
//console.log("hi");
global.map.setOverlayLayer(elem.getAttribute("data-layers"));
} else {
global.map.setOverlayLayer();
Expand Down
5 changes: 3 additions & 2 deletions app/js/modules/trash.js
Expand Up @@ -61,8 +61,9 @@ class TrashInfo extends React.Component {
}

recyclingWeek(w) {
var theDate = new Date().getTime();
var currentWeek = this.checkOddEven(this.weekNumber(theDate));
var theDate = new Date();
theDate.setHours(0, 0, 0, 0);
var currentWeek = this.checkOddEven(this.weekNumber(theDate.getTime()));
var propertyWeek = this.weekEvenOdd(w);

if (currentWeek === propertyWeek) {
Expand Down
7 changes: 5 additions & 2 deletions package.json
Expand Up @@ -3,7 +3,10 @@
"version": "1.5.4",
"description": "",
"main": "index.js",
"scripts": {},
"scripts": {
"server": "gulp",
"build": "gulp build --type=production"
},
"author": "",
"license": "MIT",
"dependencies": {
Expand All @@ -27,7 +30,7 @@
"gulp-sourcemaps": "^1.5.2",
"gulp-uglify": "^1.4.1",
"gulp-util": "^3.0.6",
"mapbox-gl": "^0.16.0",
"mapbox-gl": "^0.18.0",
"react": "^0.14.7",
"react-dom": "^0.14.7",
"react-timer-mixin": "^0.13.2",
Expand Down

0 comments on commit e1fc4fe

Please sign in to comment.