From ba670be7d8476f4ed59f148c068ad948fb95c298 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Tue, 31 May 2016 01:21:44 +0200 Subject: [PATCH] Update ghu. Switch from jade to pug. --- ghu.js | 9 ++++----- package.json | 4 ++-- src/_h5ai/private/php/pages/info.php.jade | 2 +- src/_h5ai/private/php/pages/page.tpl.jade | 8 ++++---- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/ghu.js b/ghu.js index b79f65d0..198cb02f 100644 --- a/ghu.js +++ b/ghu.js @@ -1,8 +1,7 @@ const {resolve, join} = require('path'); const { - ghu, - autoprefixer, cssmin, each, ife, includeit, jade, jszip, - less, mapfn, newerThan, read, remove, run, uglify, watch, wrap, write + ghu, autoprefixer, cssmin, each, ife, includeit, jszip, less, mapfn, + newerThan, pug, read, remove, run, uglify, watch, wrap, write } = require('ghu'); const ROOT = resolve(__dirname); @@ -72,7 +71,7 @@ ghu.task('build:styles', runtime => { ghu.task('build:pages', runtime => { return read(`${SRC}: **/*.jade, ! **/*.tpl.jade`) .then(newerThan(mapper, `${SRC}/**/*.tpl.jade`)) - .then(jade({pkg: runtime.pkg})) + .then(pug({pkg: runtime.pkg})) .then(wrap('', runtime.commentHtml)) .then(write(mapper, {overwrite: true})); }); @@ -117,7 +116,7 @@ ghu.task('build:tests', ['build:scripts', 'build:styles'], 'build the test suite read(`${TEST}/index.html.jade`) .then(newerThan(`${BUILD}/test/index.html`)) - .then(jade({pkg: runtime.pkg})) + .then(pug({pkg: runtime.pkg})) .then(write(`${BUILD}/test/index.html`, {overwrite: true})), read(`${BUILD}/_h5ai/public/js/scripts.js`) diff --git a/package.json b/package.json index 99d826ce..fc04fea0 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "build": "node ghu release" }, "devDependencies": { - "eslint": "2.10.2", - "ghu": "0.4.0" + "eslint": "2.11.0", + "ghu": "0.6.0" }, "engines": { "node": ">=6.0.0" diff --git a/src/_h5ai/private/php/pages/info.php.jade b/src/_h5ai/private/php/pages/info.php.jade index b30fabbc..2ef019b1 100644 --- a/src/_h5ai/private/php/pages/info.php.jade +++ b/src/_h5ai/private/php/pages/info.php.jade @@ -7,4 +7,4 @@ block init block body div#content h1#header - a(href='#{pkg.homepage}') h5ai + a(href=pkg.homepage) h5ai diff --git a/src/_h5ai/private/php/pages/page.tpl.jade b/src/_h5ai/private/php/pages/page.tpl.jade index 48c486a8..a42951af 100644 --- a/src/_h5ai/private/php/pages/page.tpl.jade +++ b/src/_h5ai/private/php/pages/page.tpl.jade @@ -9,23 +9,23 @@ html(class='no-js', lang='en') meta(charset='utf-8') meta(http-equiv='x-ua-compatible', content='ie=edge') title #{title} - meta(name='description', content='#{title}') + meta(name='description', content=title) meta(name='viewport', content='width=device-width, initial-scale=1') link(rel='shortcut icon', href!='images/favicon/favicon-16-32.ico') link(rel='apple-touch-icon-precomposed', type='image/png', href!='images/favicon/favicon-152.png') link(rel='stylesheet', href!='css/styles.css') - script(src!='js/scripts.js', data-module='#{module}') + script(src!='js/scripts.js', data-module=module) - body#root(class='#{module}') + body#root(class=module) div#fallback-hints span.noJsMsg Works best with JavaScript enabled! span.noBrowserMsg Works best in #[a(href='http://browsehappy.com') modern browsers]! - span.backlink #[a(href='#{pkg.homepage}', title='h5ai v#{pkg.version} - #{pkg.description}') powered by h5ai] + span.backlink #[a(href=pkg.homepage, title=`h5ai v${pkg.version} - ${pkg.description}`) powered by h5ai] block body