mirror of
https://github.com/openstf/stf
synced 2025-10-05 19:42:01 +02:00
Refactored settings.
This commit is contained in:
parent
8e674928ea
commit
6df8ed7184
4 changed files with 50 additions and 50 deletions
|
@ -17,9 +17,6 @@ var wireutil = require('../wire/util')
|
|||
var wirerouter = require('../wire/router')
|
||||
var dbapi = require('../db/api')
|
||||
|
||||
var webpackMiddleware = require("webpack-dev-middleware")
|
||||
var webpack = require("webpack")
|
||||
|
||||
var auth = require('../middleware/auth')
|
||||
|
||||
module.exports = function(options) {
|
||||
|
@ -41,50 +38,7 @@ module.exports = function(options) {
|
|||
app.use('/static/lib', express.static(pathutil.resource('lib')))
|
||||
app.use('/static', express.static(pathutil.resource('app')))
|
||||
|
||||
// WebPack settings
|
||||
app.use(webpackMiddleware(webpack( {
|
||||
cache: true,
|
||||
debug: true,
|
||||
devtool: 'eval',
|
||||
entry: pathutil.resource('app') + '/entry.js',
|
||||
output: {
|
||||
path: '/static/build/',
|
||||
filename: 'bundle.js'
|
||||
},
|
||||
resolve: {
|
||||
modulesDirectories: [pathutil.resource('lib'), 'web_modules', './../../node_modules'],
|
||||
alias: {
|
||||
'socket.io': 'socket.io-client/dist/socket.io'
|
||||
}
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.css$/, loader: 'style!css' },
|
||||
{ test: /\.jade/, loader: 'template-html-loader' },
|
||||
{ test: /angular\.js/, loader: 'exports?angular'},
|
||||
{ test: /angular-route\.js/, loader: 'imports?angular=angular'}
|
||||
],
|
||||
noParse: [
|
||||
pathutil.resource('lib')
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ResolverPlugin(
|
||||
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin('bower.json', ['main'])
|
||||
),
|
||||
new webpack.ResolverPlugin(
|
||||
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin('.bower.json', ['main'])
|
||||
)
|
||||
]
|
||||
}), {
|
||||
noInfo: false,
|
||||
quiet: false,
|
||||
lazy: false,
|
||||
publicPath: '/static/build/',
|
||||
stats: {
|
||||
colors: true
|
||||
}
|
||||
}))
|
||||
app.use(require('./webpack-config'))
|
||||
|
||||
app.use(express.cookieParser(options.secret))
|
||||
app.use(express.cookieSession({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue