Skip to content

Commit 8f9f8e1

Browse files
committed
clean
1 parent 0779a0f commit 8f9f8e1

6 files changed

Lines changed: 13 additions & 13 deletions

File tree

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function requireModuleTasks(moduleName) {
5959
gulp.task("nodemon", lazyRequireTask('./tasks/nodemon', {
6060
// shared client/server code has require('template.jade) which precompiles template on run
6161
// so I have to restart server to pickup the template change
62-
ext: "js",
62+
ext: "js,yml",
6363

6464
nodeArgs: process.env.NODE_DEBUG ? ['--debug'] : [],
6565
script: "./bin/server.js",

handlers/tutorial/controller/frontpage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exports.get = async function (ctx, next) {
1717
ctx.locals.siteToolbarCurrentSection = "tutorial";
1818
ctx.locals.title = t('tutorial.frontpage.modern_javascript_tutorial');
1919

20-
let topArticlesRendered = await localStorage.getOrGenerate('tutorial:frontpage', renderTop);
20+
let topArticlesRendered = await localStorage.getOrGenerate('tutorial:frontpage', renderTop, process.env.TUTORIAL_EDIT);
2121

2222
if (!Object.keys(topArticlesRendered).length) {
2323
ctx.throw(404, "Database is empty?"); // empty db

handlers/tutorial/templates/frontpage.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ block append variables
1313

1414
block append head
1515
!=js("tutorial", {defer: true})
16-
meta(name="description" content=t("site.meta.description"))
16+
meta(name="description" content=t("config.meta.description"))
1717

1818
block content
1919
+frontpage-content({

modules/config/webpack.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,18 +205,18 @@ module.exports = function (config) {
205205
new WriteVersionsPlugin(path.join(config.cacheRoot, 'webpack.versions.json')),
206206

207207
new MiniCssExtractPlugin({
208-
filename: devMode ? '[name].css' : extHash("[name]", 'css'),
209-
chunkFilename: devMode ? '[id].css' : extHash("[id]", 'css'),
208+
filename: extHash("[name]", 'css'),
209+
chunkFilename: extHash("[id]", 'css'),
210210
}),
211211

212212
function () {
213213

214-
let styles = glob.sync('styles/**/*.styl', {cwd: config.projectRoot});
214+
let styles = glob.sync('{styles,templates}/**/*.styl', {cwd: config.projectRoot});
215215

216-
config.handlers.forEach(handler => {
217-
let handlerStyles = glob.sync(`handlers/${handler}/client/styles/**/*.styl`, {cwd: config.projectRoot});
218-
styles.push(...handlerStyles);
219-
});
216+
// config.handlers.forEach(handler => {
217+
// let handlerStyles = glob.sync(`handlers/${handler}/client/styles/**/*.styl`, {cwd: config.projectRoot});
218+
// styles.push(...handlerStyles);
219+
// });
220220

221221
let content = styles.map(s => `@require '../${s}'`).join("\n");
222222

templates/blocks/frontpage-content/index.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mixin frontpage-contents(data)
1+
mixin frontpage-content(data)
22
- let {tutorialTree, topArticlesRendered} = data;
33

44
mixin partList(children)
@@ -16,7 +16,7 @@ mixin frontpage-contents(data)
1616
if (topic.children.length > 6)
1717
+e('li').more= t('tutorial.frontpage.more')
1818

19-
+b.main-en-contents
19+
+b.frontpage-content
2020
+e.container
2121
- let folder = tutorialTree.bySlug('js')
2222
+e.inner

templates/blocks/frontpage-content/index.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.main-en-contents
1+
.frontpage-content
22
background white
33
outline none
44

0 commit comments

Comments
 (0)