-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.coffee
93 lines (80 loc) · 2.17 KB
/
webpack.config.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
path = require 'path'
webpack = require 'webpack'
WebpackNotifierPlugin = require 'webpack-notifier'
HtmlWebpackPlugin = require 'html-webpack-plugin'
PUBLIC_DIRECTORY = path.join __dirname, 'public'
module.exports =
context: __dirname
resolve:
alias:
'nexus-node': 'nexus'
common: path.join PUBLIC_DIRECTORY, 'common'
root: PUBLIC_DIRECTORY
extensions: ['', '.js', '.coffee']
modulesDirectories: ['lib']
entry:
'bundle-test': 'test.coffee'
'bundle-sandbox': 'dom-sandbox/app.coffee'
'bundle-game': 'game/app.coffee'
'bundle-game-master': 'game-master/app.coffee'
'bundle-quick-login': 'quick-login/app.coffee'
'bundle-landing': 'landing/landing.coffee'
output:
path: path.join __dirname, './public/dist'
filename: '[name].js'
devtool: 'source-map'
plugins: [
new webpack.NoErrorsPlugin # for example to prevent tests from passing when there are coffee-lint errors
new WebpackNotifierPlugin
new webpack.ResolverPlugin(
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin 'bower.json', ['main']
)
new HtmlWebpackPlugin
title: 'CSS Quickdraw'
template: 'public/landing/index.html'
inject: no
new HtmlWebpackPlugin
title: 'CSS Quickdraw DOM Sandbox'
template: 'public/dom-sandbox/index.html'
filename: 'sandbox.html'
inject: no
new HtmlWebpackPlugin
title: 'CSS Quickdraw Login'
template: 'public/quick-login/index.html'
filename: 'quick-login.html'
inject: no
]
coffeelint:
configFile: path.join __dirname, './coffeelint.json'
stylint:
config: path.join __dirname, './stylint.json'
module:
preLoaders: [
{
test: /\.coffee?$/
loader: 'coffee-lint-loader'
}
{
test: /\.styl$/
loader: 'stylint-loader'
}
]
loaders: [
{ test: /\.coffee$/, loader: 'coffee-loader' }
{
test: /\.styl$/
loader: 'style-loader!css-loader!autoprefixer-loader?browsers=last 1 version!stylus-loader'
}
{
test: /\.css$/
loader: 'style-loader!css-loader!autoprefixer-loader?browsers=last 1 version'
}
{
test: /\.(jpg|png)$/,
loader: 'file-loader?name=[name].[ext]'
}
{
test: /\.(otf|ttf)$/,
loader: 'file-loader'
}
]