Skip to content

Commit

Permalink
build task fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
putskoo committed Sep 7, 2013
1 parent ad567c2 commit d85a501
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
bower_components
node_modules
temp
dist
lib-cov
*.seed
*.log
Expand Down
7 changes: 6 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ module.exports = function(grunt) {
},
build: {
files: {
'dist/': ['./public/{css/**, img/**}', 'views/**']
'dist/': [
'./public/{css/**, img/**}',
'views/**',
'server.js',
'node_modules/**'
]
}
}
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"grunt-contrib-less": "~0.7.0",
"grunt-contrib-watch": "~0.5.1",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-uglify": "~0.2.4",
"grunt-usemin": "~0.1.12"
},
"scripts": {
Expand Down
8 changes: 3 additions & 5 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
require('colors');

var express = require('express'),
app = express(),
path = require('path'),
isProduction = process.argv[2] === 'prod';
app = express();

app
.disable('x-powered-by')
.engine('html', require('ejs').renderFile)

.set('view engine', 'html')
.set('port', process.env.PORT || 3000)
.set('views', (isProduction ? 'dist/' : '') + 'views')
.set('views', 'views')

.use(express.favicon())
.use(express.logger('tiny'))
.use(express.static((isProduction ? 'dist/' : '') + 'public'))
.use(express.static('public'))
.use(express.bodyParser())
.use(express.methodOverride())
.use(express.cookieParser())
Expand Down

0 comments on commit d85a501

Please sign in to comment.