The Puggening: Update from Jade to Pug
1.) module dependency updated from jade 1.11.0 to pug 2.0.0-beta3 2.) All references to Jade have been changed to Pug 3.) /srv/web/jade.js is renamed to pug.js 4.) all template files renamed accordingly 5.) "mixin somename" is automatically considered a declaration, invocations must use "+somename" 6.) variable interpolation is no longer supported inside element attributes, use direct references and string concatenation instead. 7.) bumped minor version
This commit is contained in:
parent
f75d40d278
commit
df5c5cd54f
31 changed files with 233 additions and 233 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import CyTubeUtil from '../../utilities';
|
||||
import { sanitizeText } from '../../xss';
|
||||
import { sendJade } from '../jade';
|
||||
import { sendPug } from '../pug';
|
||||
import * as HTTPStatus from '../httpstatus';
|
||||
import { HTTPError } from '../../errors';
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ export default function initialize(app, ioConfig) {
|
|||
}
|
||||
const socketBaseURL = endpoints[0].url;
|
||||
|
||||
sendJade(res, 'channel', {
|
||||
sendPug(res, 'channel', {
|
||||
channelName: req.params.channel,
|
||||
sioSource: `${socketBaseURL}/socket.io/socket.io.js`
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import CyTubeUtil from '../../utilities';
|
||||
import { sendJade } from '../jade';
|
||||
import { sendPug } from '../pug';
|
||||
|
||||
export default function initialize(app, webConfig) {
|
||||
app.get('/contact', (req, res) => {
|
||||
|
|
@ -19,7 +19,7 @@ export default function initialize(app, webConfig) {
|
|||
return contact;
|
||||
});
|
||||
|
||||
return sendJade(res, 'contact', {
|
||||
return sendPug(res, 'contact', {
|
||||
contacts: contacts
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { sendJade } from '../jade';
|
||||
import { sendPug } from '../pug';
|
||||
|
||||
export default function initialize(app, channelIndex, maxEntries) {
|
||||
app.get('/', (req, res) => {
|
||||
|
|
@ -13,7 +13,7 @@ export default function initialize(app, channelIndex, maxEntries) {
|
|||
|
||||
channels = channels.slice(0, maxEntries);
|
||||
|
||||
sendJade(res, 'index', {
|
||||
sendPug(res, 'index', {
|
||||
channels: channels
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue