Compare commits
19 Commits
master
...
EXP-webpac
Author | SHA1 | Date | |
---|---|---|---|
178388becc | |||
d5f6a5f2cb | |||
a17886e300 | |||
3af9423871 | |||
5a6c798e93 | |||
02e8b407c3 | |||
e44298c172 | |||
8df09ddb11 | |||
bd59534bac | |||
0679ad31a7 | |||
83ecd84d78 | |||
055a73fb05 | |||
584a6b632f | |||
d90b08f45e | |||
7934c926d9 | |||
|
8364e9a146 | ||
|
ab89f5f93f | ||
|
29bcf75470 | ||
|
fcddbf85b0 |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
clientpack/**
|
||||||
|
node_modules/**
|
@ -3,6 +3,7 @@ mode:regex
|
|||||||
\.exe$
|
\.exe$
|
||||||
^nmdc-webfrontend\.conf$
|
^nmdc-webfrontend\.conf$
|
||||||
^clientpack/
|
^clientpack/
|
||||||
|
^node_modules/
|
||||||
|
|
||||||
^_dist/
|
^_dist/
|
||||||
^vendor/
|
^vendor/
|
||||||
|
23
.vscode/tasks.json
vendored
Normal file
23
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
|
// for the documentation about the tasks.json format
|
||||||
|
"version": "0.1.0",
|
||||||
|
"command": "npm",
|
||||||
|
"isShellCommand": true,
|
||||||
|
"showOutput": "always",
|
||||||
|
"suppressTaskName": true,
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"taskName": "install",
|
||||||
|
"args": ["install"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskName": "update",
|
||||||
|
"args": ["update"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskName": "test",
|
||||||
|
"args": ["run", "test"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
39
Makefile
39
Makefile
@ -9,17 +9,17 @@ GOFLAGS=-a \
|
|||||||
-gcflags "-trimpath ${GOPATH}" \
|
-gcflags "-trimpath ${GOPATH}" \
|
||||||
-asmflags "-trimpath ${GOPATH}"
|
-asmflags "-trimpath ${GOPATH}"
|
||||||
|
|
||||||
SOURCES=client/ Gopkg.lock Gopkg.toml Makefile Config.go main.go nmdc-webfrontend.conf.SAMPLE
|
.PHONY: all dist deps clean clean-deps
|
||||||
|
|
||||||
.PHONY: all deps clean
|
all: $(BINNAME) $(BINNAME).exe
|
||||||
|
|
||||||
all: $(BINNAME)-$(VERSION)-win32.7z $(BINNAME)-$(VERSION)-linux64.tar.xz $(BINNAME)-$(VERSION)-src.tar.xz
|
dist: $(BINNAME)-$(VERSION)-win32.7z $(BINNAME)-$(VERSION)-linux64.tar.xz $(BINNAME)-$(VERSION)-src.zip
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
npm install -g less uglify-js less-plugin-clean-css html-minifier
|
npm i
|
||||||
go get -u github.com/jteeuwen/go-bindata/...
|
go get -u github.com/jteeuwen/go-bindata/...
|
||||||
go get -u github.com/golang/dep/cmd/dep
|
go get -u github.com/golang/dep/cmd/dep
|
||||||
dep ensure
|
$(GOPATH)/bin/dep ensure
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ./$(BINNAME)
|
rm -f ./$(BINNAME)
|
||||||
@ -27,22 +27,21 @@ clean:
|
|||||||
rm -fr ./clientpack
|
rm -fr ./clientpack
|
||||||
rm -f ./bindata.go
|
rm -f ./bindata.go
|
||||||
|
|
||||||
|
clean-deps:
|
||||||
|
rm -fr ./vendor
|
||||||
|
rm -fr ./node_modules
|
||||||
|
|
||||||
bindata.go: client client/*
|
bindata.go: client client/*
|
||||||
rm -fr ./clientpack
|
mkdir -p clientpack
|
||||||
cp -r ./client ./clientpack
|
cp client/favicon.ico client/apple-touch-icon.png clientpack/
|
||||||
( echo ';(function() {' ; cat clientpack/dcwebui.js ; echo '})();' ) | uglifyjs -o clientpack/dcwebui.min.js -c -m --ie8
|
npm run webpack
|
||||||
lessc --clean-css clientpack/dcwebui.css clientpack/dcwebui.min.css
|
cat client/index.htm \
|
||||||
cat clientpack/index.htm \
|
| sed -e '/bundle.js/{i <script>' -e 'r clientpack/bundle.min.js' -e 'a </script>' -e 'd}' \
|
||||||
| sed -e '/dcwebui.css/{i <style>' -e 'r clientpack/dcwebui.min.css' -e 'a </style>' -e 'd}' \
|
> clientpack/index.htm
|
||||||
| sed -e '/dcwebui.js/{i <script>' -e 'r clientpack/dcwebui.min.js' -e 'a </script>' -e 'd}' \
|
|
||||||
| sed -e '/socket.io-1.7.2.js/{i <script>' -e 'r clientpack/socket.io-1.7.2.js' -e 'a </script>' -e 'd}' \
|
|
||||||
> clientpack/index.packed.htm
|
|
||||||
mv clientpack/index.packed.htm clientpack/index.htm
|
|
||||||
html-minifier --collapse-whitespace -o clientpack/index.min.htm clientpack/index.htm
|
html-minifier --collapse-whitespace -o clientpack/index.min.htm clientpack/index.htm
|
||||||
mv clientpack/index.min.htm clientpack/index.htm
|
mv clientpack/index.min.htm clientpack/index.htm
|
||||||
rm ./clientpack/*.js
|
rm clientpack/bundle.min.js
|
||||||
rm ./clientpack/*.css
|
$(GOPATH)/bin/go-bindata -nomemcopy -nometadata -prefix clientpack clientpack
|
||||||
go-bindata -nomemcopy -nometadata -prefix clientpack clientpack
|
|
||||||
|
|
||||||
$(BINNAME).exe: bindata.go *.go
|
$(BINNAME).exe: bindata.go *.go
|
||||||
GOARCH=386 GOOS=windows go build $(GOFLAGS) -o $(BINNAME).exe
|
GOARCH=386 GOOS=windows go build $(GOFLAGS) -o $(BINNAME).exe
|
||||||
@ -56,5 +55,5 @@ $(BINNAME)-$(VERSION)-win32.7z: $(BINNAME).exe nmdc-webfrontend.conf.SAMPLE
|
|||||||
$(BINNAME)-$(VERSION)-linux64.tar.xz: $(BINNAME) nmdc-webfrontend.conf.SAMPLE
|
$(BINNAME)-$(VERSION)-linux64.tar.xz: $(BINNAME) nmdc-webfrontend.conf.SAMPLE
|
||||||
XZ_OPT='-9' tar caf "$(BINNAME)-$(VERSION)-linux64.tar.xz" $(BINNAME) nmdc-webfrontend.conf.SAMPLE --owner=0 --group=0
|
XZ_OPT='-9' tar caf "$(BINNAME)-$(VERSION)-linux64.tar.xz" $(BINNAME) nmdc-webfrontend.conf.SAMPLE --owner=0 --group=0
|
||||||
|
|
||||||
$(BINNAME)-$(VERSION)-src.tar.xz: $(SOURCES)
|
$(BINNAME)-$(VERSION)-src.zip:
|
||||||
XZ_OPT='-9' tar caf "$(BINNAME)-$(VERSION)-src.tar.xz" $(SOURCES) --owner=0 --group=0
|
hg archive "$(BINNAME)-$(VERSION)-src.zip" || git archive -o "$(BINNAME)-$(VERSION)-src.zip" HEAD
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
/* dcwebui.js */
|
/* dcwebui.js */
|
||||||
|
|
||||||
|
require("./dcwebui.less");
|
||||||
|
|
||||||
|
import io from 'socket.io-client'
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var SENTINEL_PASSWORD = "************";
|
var SENTINEL_PASSWORD = "************";
|
||||||
|
@ -51,15 +51,17 @@ html,body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* WiiU placements */
|
/* WiiU placements */
|
||||||
.navigator-wiiu .placement-mid {
|
.navigator-wiiu {
|
||||||
|
.placement-mid {
|
||||||
bottom:120px;
|
bottom:120px;
|
||||||
}
|
}
|
||||||
.navigator-wiiu .placement-bottom {
|
.placement-bottom {
|
||||||
height:120px;
|
height:120px;
|
||||||
}
|
}
|
||||||
.navigator-wiiu .placement-panel {
|
.placement-panel {
|
||||||
bottom:120px;
|
bottom:120px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Menu button */
|
/* Menu button */
|
||||||
.menubutton {
|
.menubutton {
|
||||||
@ -75,14 +77,17 @@ html,body {
|
|||||||
height:18px;
|
height:18px;
|
||||||
width:18px;
|
width:18px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
|
||||||
.menubutton svg {
|
svg {
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
}
|
}
|
||||||
.menubutton:hover {
|
|
||||||
|
&:hover {
|
||||||
background:white;
|
background:white;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Menu list */
|
/* Menu list */
|
||||||
.menu {
|
.menu {
|
||||||
background:#DDD;
|
background:#DDD;
|
||||||
@ -97,20 +102,24 @@ html,body {
|
|||||||
z-index:10; /* above placement-panel */
|
z-index:10; /* above placement-panel */
|
||||||
|
|
||||||
overflow-y:auto;
|
overflow-y:auto;
|
||||||
}
|
|
||||||
.menu ul {
|
ul {
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:0;
|
padding:0;
|
||||||
}
|
}
|
||||||
.menu li {
|
|
||||||
|
li {
|
||||||
list-style-type:none;
|
list-style-type:none;
|
||||||
padding:6px;
|
padding:6px;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
}
|
|
||||||
.menu li:hover {
|
&:hover {
|
||||||
background:#333;
|
background:#333;
|
||||||
color:white;
|
color:white;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Tabs */
|
/* Tabs */
|
||||||
.tabbar {
|
.tabbar {
|
||||||
position:relative;
|
position:relative;
|
||||||
@ -132,16 +141,20 @@ html,body {
|
|||||||
border-right:1px solid lightgrey;
|
border-right:1px solid lightgrey;
|
||||||
margin-top:2px;
|
margin-top:2px;
|
||||||
padding:0 8px;
|
padding:0 8px;
|
||||||
}
|
|
||||||
.tabitem:hover {
|
&:hover {
|
||||||
border-top:2px solid #EEE;
|
border-top:2px solid #EEE;
|
||||||
}
|
}
|
||||||
.tabitem.selected {
|
|
||||||
|
&.selected {
|
||||||
border-top:2px solid darkgreen;
|
border-top:2px solid darkgreen;
|
||||||
}
|
}
|
||||||
.tabitem.unread {
|
|
||||||
|
&.unread {
|
||||||
background:lightyellow;
|
background:lightyellow;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.tab-label {
|
.tab-label {
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
}
|
}
|
||||||
@ -170,12 +183,14 @@ html,body {
|
|||||||
-webkit-transition:0.1s linear all;
|
-webkit-transition:0.1s linear all;
|
||||||
-moz-transition:0.1s linear all;
|
-moz-transition:0.1s linear all;
|
||||||
transition:0.1s linear all;
|
transition:0.1s linear all;
|
||||||
}
|
|
||||||
.tab-closer:hover {
|
&:hover {
|
||||||
background:#FFDDDD;
|
background:#FFDDDD;
|
||||||
border:1px solid red;
|
border:1px solid red;
|
||||||
color:black;
|
color:black;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
.content {
|
.content {
|
||||||
display:block;
|
display:block;
|
||||||
@ -241,7 +256,10 @@ html,body {
|
|||||||
}
|
}
|
||||||
#submit-container {
|
#submit-container {
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0;bottom:0;right:0;width:32px;
|
top:0;
|
||||||
|
bottom:0;
|
||||||
|
right:0;
|
||||||
|
width:32px;
|
||||||
}
|
}
|
||||||
#btsubmit {
|
#btsubmit {
|
||||||
width:100%;
|
width:100%;
|
||||||
@ -265,8 +283,8 @@ html,body {
|
|||||||
-webkit-border-radius: 12px;
|
-webkit-border-radius: 12px;
|
||||||
-moz-border-radius: 12px;
|
-moz-border-radius: 12px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
}
|
|
||||||
.ul-large li {
|
li {
|
||||||
color: #333;
|
color: #333;
|
||||||
font: bold 15px Geneva, Arial, Helvetica, sans-serif;
|
font: bold 15px Geneva, Arial, Helvetica, sans-serif;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@ -279,8 +297,9 @@ html,body {
|
|||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
display: block;
|
display: block;
|
||||||
padding: 15px 5px 5px 10px;
|
padding: 15px 5px 5px 10px;
|
||||||
}
|
cursor:pointer;
|
||||||
.ul-large li:first-child {
|
|
||||||
|
&:first-child {
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
-webkit-border-top-left-radius: 12px;
|
-webkit-border-top-left-radius: 12px;
|
||||||
-webkit-border-top-right-radius: 12px;
|
-webkit-border-top-right-radius: 12px;
|
||||||
@ -289,7 +308,8 @@ html,body {
|
|||||||
border-top-left-radius: 12px;
|
border-top-left-radius: 12px;
|
||||||
border-top-right-radius: 12px;
|
border-top-right-radius: 12px;
|
||||||
}
|
}
|
||||||
.ul-large li:last-child {
|
|
||||||
|
&:last-child {
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
-webkit-border-bottom-left-radius: 12px;
|
-webkit-border-bottom-left-radius: 12px;
|
||||||
-webkit-border-bottom-right-radius: 12px;
|
-webkit-border-bottom-right-radius: 12px;
|
||||||
@ -298,9 +318,7 @@ html,body {
|
|||||||
border-bottom-left-radius: 12px;
|
border-bottom-left-radius: 12px;
|
||||||
border-bottom-right-radius: 12px;
|
border-bottom-right-radius: 12px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.ul-large li {
|
|
||||||
cursor:pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Text */
|
/* Text */
|
||||||
@ -368,8 +386,8 @@ html,body {
|
|||||||
.ul-mini {
|
.ul-mini {
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
margin-top:4px;
|
margin-top:4px;
|
||||||
}
|
|
||||||
.ul-mini li {
|
li {
|
||||||
list-style-type:none;
|
list-style-type:none;
|
||||||
min-height:13px;
|
min-height:13px;
|
||||||
line-height:13px;
|
line-height:13px;
|
||||||
@ -378,10 +396,12 @@ html,body {
|
|||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
|
|
||||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAANCAYAAACQN/8FAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABh0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzT7MfTgAAAZJJREFUKJFtz71rE2EAgPHnrknbXBKkLWhx0DhoWsEOxk0taMGlQ7cimElK5uroH5DFSUQ3KQpV2qlQEDJ4mKFQ0MVS6kfN1dQP2ss1ydW79y6Xu3udBG36zL/lUaSUVKtVqes6hmGgaRqlUulUoVAw+ScV4P2bFfrEPhnF4+v2NuVy+QFHSjiNXWV2cgzh+dRqX1hsNflcr5/tgcJ14larSdDxCYIOuWEV0c3+7oEAxk4NANu2GUnFFIt3FnvgydxFZb9hSRmFCCGwmjb3i3OVo1AFyF2bZm/PxDRN4rDDo4WHt4+F77RfmKNZ1MQA9ukTPPeXXt14OvXita5f+guVJ+uPZ1brlZUJI08qG/F26AP9chDXO8RpeyzNvMyMnc+7fembmU9WYJFXL7M1YtBNhqRIEYURh1Gb/u+DH69fubqRaLQOcAccHDy++TW0pEaATzcOkFHMxs/NCQD13oV50laaH/EuQdhBhAIRClzF/W9GkVIC8Gx54dZafa3SDmxc1SEdZxgfHmdu+m7y3Jlc+AextbuG6q1RSQAAAABJRU5ErkJggg==') no-repeat 0 0;
|
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAANCAYAAACQN/8FAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABh0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzT7MfTgAAAZJJREFUKJFtz71rE2EAgPHnrknbXBKkLWhx0DhoWsEOxk0taMGlQ7cimElK5uroH5DFSUQ3KQpV2qlQEDJ4mKFQ0MVS6kfN1dQP2ss1ydW79y6Xu3udBG36zL/lUaSUVKtVqes6hmGgaRqlUulUoVAw+ScV4P2bFfrEPhnF4+v2NuVy+QFHSjiNXWV2cgzh+dRqX1hsNflcr5/tgcJ14larSdDxCYIOuWEV0c3+7oEAxk4NANu2GUnFFIt3FnvgydxFZb9hSRmFCCGwmjb3i3OVo1AFyF2bZm/PxDRN4rDDo4WHt4+F77RfmKNZ1MQA9ukTPPeXXt14OvXita5f+guVJ+uPZ1brlZUJI08qG/F26AP9chDXO8RpeyzNvMyMnc+7fembmU9WYJFXL7M1YtBNhqRIEYURh1Gb/u+DH69fubqRaLQOcAccHDy++TW0pEaATzcOkFHMxs/NCQD13oV50laaH/EuQdhBhAIRClzF/W9GkVIC8Gx54dZafa3SDmxc1SEdZxgfHmdu+m7y3Jlc+AextbuG6q1RSQAAAABJRU5ErkJggg==') no-repeat 0 0;
|
||||||
}
|
|
||||||
.ul-mini li:hover {
|
&:hover {
|
||||||
background-color:#EEE;
|
background-color:#EEE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Display userlist alongside main chat for wide screens */
|
/* Display userlist alongside main chat for wide screens */
|
||||||
|
|
@ -5,8 +5,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
<link rel="apple-touch-icon" href="./apple-touch-icon.png">
|
||||||
<link rel="stylesheet" href="/dcwebui.css">
|
|
||||||
<title>Loading...</title>
|
<title>Loading...</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -55,8 +54,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript" src="/socket.io-1.7.2.js"></script>
|
|
||||||
<script type="text/javascript" src="/dcwebui.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
File diff suppressed because one or more lines are too long
4989
package-lock.json
generated
Normal file
4989
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
33
package.json
Normal file
33
package.json
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"name": "nmdc-webfrontend",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "A web interface to an NMDC hub",
|
||||||
|
"homepage": "https://code.ivysaur.me/nmdc-webfrontend/",
|
||||||
|
"main": "s",
|
||||||
|
"scripts": {
|
||||||
|
"webpack": "webpack"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.ivysaur.me/code.ivysaur.me/nmdc-webfrontend"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"awesome-typescript-loader": "^3.3.0",
|
||||||
|
"css-loader": "^0.28.7",
|
||||||
|
"html-minifier": "^3.5.6",
|
||||||
|
"html-webpack-plugin": "^2.30.1",
|
||||||
|
"less": "^2.7.3",
|
||||||
|
"less-loader": "^4.0.5",
|
||||||
|
"less-plugin-clean-css": "^1.5.1",
|
||||||
|
"script-ext-html-webpack-plugin": "^1.8.8",
|
||||||
|
"socket.io-client": "^2.0.4",
|
||||||
|
"style-ext-html-webpack-plugin": "^3.4.5",
|
||||||
|
"style-loader": "^0.19.0",
|
||||||
|
"typescript": "^2.6.1",
|
||||||
|
"uglify-js": "^3.1.8",
|
||||||
|
"webpack": "^3.8.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {}
|
||||||
|
}
|
56
webpack.config.js
Normal file
56
webpack.config.js
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/*! webpack.config.js */
|
||||||
|
|
||||||
|
const webpack = require("webpack");
|
||||||
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
|
const CleanCSSPlugin = require("less-plugin-clean-css");
|
||||||
|
const ScriptExtHtmlWebpackPlugin = require("script-ext-html-webpack-plugin");
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
entry: "./client/dcwebui.js",
|
||||||
|
output: {
|
||||||
|
path: __dirname,
|
||||||
|
filename: "clientpack/bundle.min.js"
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
loaders: [
|
||||||
|
|
||||||
|
// Plain CSS files (no longer present)
|
||||||
|
{ test: /\.css$/, loader: "style-loader!css-loader" },
|
||||||
|
|
||||||
|
// LESS CSS files
|
||||||
|
{
|
||||||
|
test: /\.less$/,
|
||||||
|
use: [
|
||||||
|
{ loader: "style-loader" },
|
||||||
|
{ loader: "css-loader" },
|
||||||
|
{
|
||||||
|
loader: "less-loader",
|
||||||
|
options: {
|
||||||
|
noIeCompat: false,
|
||||||
|
plugins: [
|
||||||
|
new CleanCSSPlugin({ advanced: true })
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
|
compress: {
|
||||||
|
warnings: true
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
template: './client/index.htm',
|
||||||
|
filename: 'output.html',
|
||||||
|
//filename: './clientpack/index.htm',
|
||||||
|
minify: {},
|
||||||
|
}),
|
||||||
|
new ScriptExtHtmlWebpackPlugin({
|
||||||
|
inline: [ /\.*/ ]
|
||||||
|
})
|
||||||
|
]
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user