html-webpack-plugin/examples/jade-loader/example.js

10 lines
280 B
JavaScript
Executable File

'use strict';
require('./main.css');
// Use the same template for the frontend code
var template = require('./time.jade');
setInterval(function() {
var div = document.getElementById('main');
div.innerHTML = template({ time: new Date()});
div.style.color = 'navy';
}, 1000);