Skip to content

Commit 5dcfe0e

Browse files
committed
upgrade jade to pug
1 parent e7a66da commit 5dcfe0e

16 files changed

+28
-49
lines changed

app.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ if (process.env.VCAP_APPLICATION) {
4848

4949
// --- Pathing and Module Setup --- //
5050
app.set('views', path.join(__dirname, 'views'));
51-
app.set('view engine', 'jade');
52-
app.engine('.html', require('jade').__express);
51+
app.set('view engine', 'pug');
5352
app.use(compression());
5453
app.use(cookieParser());
5554
app.use(serve_static(path.join(__dirname, 'public')));
@@ -60,8 +59,8 @@ app.use(cors());
6059
//---------------------
6160
// Cache Busting Hash
6261
//---------------------
63-
process.env.cachebust_js = Date.now(); //i'm just making 1 hash against all js for easier jade implementation
64-
process.env.cachebust_css = Date.now(); //i'm just making 1 hash against all css for easier jade implementation
62+
process.env.cachebust_js = Date.now(); //i'm just making 1 hash against all js for easier pug implementation
63+
process.env.cachebust_css = Date.now(); //i'm just making 1 hash against all css for easier pug implementation
6564
logger.debug('cache busting hash js', process.env.cachebust_js, 'css', process.env.cachebust_css);
6665

6766
// ============================================================================================================================

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"express-session": "1.14.*",
1616
"fabric-ca-client": "1.0.0-alpha.0",
1717
"fabric-client": "1.0.0-alpha",
18-
"jade": "1.11.*",
18+
"pug": "2.0.0-beta11",
1919
"serve-static": "1.11.*",
2020
"winston": "2.2.*",
2121
"ws": "1.1.*"

routes/site_router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
var express = require('express');
1010
var router = express.Router();
1111

12-
//anything in here gets passed to JADE template engine
12+
//anything in here gets passed to Pug template engine
1313
function build_bag(req) {
1414
return {
1515
e: process.error, //send any setup errors

views/login.jade renamed to views/login.pug

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
extends ./template/layout.jade
1+
extends ./template/layout.pug
22

33

4-
// --------------- Header -------------- //
54
block custom_header
5+
// --------------- Header -------------- //
66
script(type='text/javascript').
77
$(document).ready(function(){
88

99
});
1010

1111

12-
// --------------- Navigation Bar -------------- //
1312
block navpanel
14-
include ./template/nav.jade
13+
// --------------- Navigation Bar -------------- //
14+
include ./template/nav.pug
1515

1616

17-
// --------------- Main Stuff -------------- //
1817
block content
18+
// --------------- Main Stuff -------------- //
1919
#notificationWrap
2020

2121
#contentPanel
@@ -74,16 +74,3 @@ block content
7474
hr
7575
input(type="text" placeholder="username" value="admin" name="username")
7676
button(type="submit") Login
77-
78-
79-
//#test(style="position: relative;")
80-
#marbleWrap
81-
div.ball#proposeMarbleStable.hideBorders
82-
div.ball#marbleBorderTop
83-
div.ball#marbleBorderBottom
84-
div.ball#marbleBorderLeft
85-
div.ball#marbleBorderRight
86-
#dummy
87-
88-
//block footer
89-
include ./template/blockchain.jade
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
extends ./template/layout.jade
1+
extends ./template/layout.pug
22

33

4-
// --------------- Header -------------- //
54
block custom_header
5+
// --------------- Header -------------- //
66
script(src='/js/ui_events.js?v=#{bag.jshash}')
77
script(src='/js/websocket.js?v=#{bag.jshash}')
88
script(src='/js/startup.js?v=#{bag.jshash}')
@@ -13,13 +13,13 @@ block custom_header
1313
});
1414

1515

16-
// --------------- Navigation Bar -------------- //
1716
block navpanel
18-
include ./template/nav.jade
17+
// --------------- Navigation Bar -------------- //
18+
include ./template/nav.pug
1919

2020

21-
// --------------- Main Stuff -------------- //
2221
block content
22+
// --------------- Main Stuff -------------- //
2323
#notificationsWrap
2424
#noticeScrollWrap
2525
#emptyNotifications.hint No Notifications
@@ -32,19 +32,19 @@ block content
3232
#contentPanel
3333

3434
// --------------- Home Panel
35-
include ./panel_home.jade
35+
include ./panel_home.pug
3636

3737
// --------------- Create Panel
38-
include ./panel_create.jade
38+
include ./panel_create.pug
3939

4040
// --------------- Start Up Walk Through Panel
41-
include ./panel_startup.jade
41+
include ./panel_startup.pug
4242

4343
// --------------- Walk Transaction Panel
44-
include ./panel_tx_story.jade
44+
include ./panel_tx_story.pug
4545

4646
// --------------- Settings Panel
47-
include ./panel_settings.jade
47+
include ./panel_settings.pug
4848

4949
block footer
50-
include ./template/blockchain.jade
50+
include ./template/blockchain.pug
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
//br
1717
legend
18-
include ./template/color_options.jade
18+
include ./template/color_options.pug
1919

2020
br
2121
legend

0 commit comments

Comments
 (0)