Skip to content

Commit b64b379

Browse files
committed
WIP
1 parent c59e1c6 commit b64b379

134 files changed

Lines changed: 827 additions & 6083 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cache/tutorialTree.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

cache/tutorialViewStorage.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

cache/webpack.versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"footer":"/pack/footer.js","head":"/pack/head.js","styles":["/pack/styles.js","/pack/styles.css","/pack/styles.css.map"],"tutorial":"/pack/tutorial.js"}
1+
{"footer":"/pack/footer.js?8a8b5e8833c3f1ff8dc7","head":"/pack/head.js?8a8b5e8833c3f1ff8dc7","styles":["/pack/styles.js?8a8b5e8833c3f1ff8dc7","/pack/styles.css?7cad2a83ed59a4a872b6c00b58c0bc02"],"tutorial":"/pack/tutorial.js?8a8b5e8833c3f1ff8dc7"}

gulpfile.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ function requireModuleTasks(moduleName) {
6060

6161
}
6262

63-
// usage: gulp db:load --from fixture/init --harmony
64-
gulp.task('db:load', lazyRequireTask('./tasks/dbLoad'));
65-
gulp.task('db:clear', lazyRequireTask('./tasks/dbClear'));
6663

6764
gulp.task("nodemon", lazyRequireTask('./tasks/nodemon', {
6865
// shared client/server code has require('template.jade) which precompiles template on run
@@ -144,7 +141,7 @@ gulp.task('edit', ['tutorial:importWatch', "client:sync-resources", 'client:live
144141

145142

146143
gulp.task('dev', function(callback) {
147-
runSequence("tutorial:import", "client:sync-resources", ['nodemon', 'client:livereload', 'client:webpack', 'watch'], callback);
144+
runSequence("client:sync-resources", ['nodemon', 'client:livereload', 'client:webpack', 'watch'], callback);
148145
});
149146

150147
gulp.on('err', function(gulpErr) {

handlers/bodyParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ class BodyParser {
3030
ctx.log.debug("bodyParser done parse");
3131
} else {
3232
ctx.log.debug("bodyParser skip");
33+
await next();
3334
}
3435

35-
await next();
3636
};
3737
};
3838
}

handlers/dev/router.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ let router = module.exports = new Router();
44

55
router.get('/', async function(ctx) {
66
ctx.body = ctx.render('index');
7-
87
});
98

109
router.get('/die', async function(ctx) {

handlers/dev/tasks/convert.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

handlers/errorHandler/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ let isDevelopment = process.env.NODE_ENV == 'development';
88
// can be called not from this MW, but from anywhere
99
// this.templateDir can be anything
1010
function renderError(ctx, err) {
11-
/*jshint -W040 */
1211

1312
// don't pass just err, because for "stack too deep" errors it leads to logging problems
1413
let report = {
@@ -120,8 +119,6 @@ exports.init = function(app) {
120119
ctx.log.error(renderErr); // make it last to ensure that status/body are set
121120
}
122121

123-
console.log("HERE 2");
124-
125122
}
126123
});
127124

handlers/static/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ const serve = require('koa-static');
22
const config = require('config');
33

44
exports.init = function(app) {
5-
app.use(serve(config.publicRoot));
5+
app.use(serve(config.publicRoot, {
6+
maxage: 86400 * 1e3 // 1 day cache static
7+
}));
68
};
79

handlers/tutorial/client/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ function initSidebarHighlight() {
6868

6969
//debugger;
7070
let h2s = document.getElementsByTagName('h2');
71-
for (let i = 0; i < h2s.length; i++) {
71+
let i;
72+
for (i = 0; i < h2s.length; i++) {
7273
let h2 = h2s[i];
7374
// first in-page header
7475
// >1, because when visiting http://javascript.local/native-prototypes#native-prototype-change,

0 commit comments

Comments
 (0)