Skip to content

Commit 3c3c555

Browse files
authored
Update index.js
1 parent dd005e5 commit 3c3c555

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

modules/config/index.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,15 @@ let config = module.exports = {
6565
handlers: require('./handlers')
6666
};
6767

68-
let repos = require('engine/koa/tutorial/repos');
69-
for(let repo in repos) {
70-
if (repos[repo].lang === lang) {
71-
config.tutorialRepo = {
72-
github: repo,
73-
branch: repos[repo].branch || 'master',
74-
tree: new URL('https://github.com/' + repo + '/tree/' + (repos[repo].branch || 'master')),
75-
blob: new URL('https://github.com/' + repo + '/blob/' + (repos[repo].branch || 'master'))
76-
}
77-
}
78-
}
68+
let repo = `javascript-tutorial/${config.lang}.javascript.info`;
69+
70+
config.tutorialRepo = {
71+
github: repo,
72+
url: new URL('https://github.com/' + repo),
73+
tree: new URL('https://github.com/' + repo + '/tree/master'),
74+
blob: new URL('https://github.com/' + repo + '/blob/master')
75+
};
76+
7977

8078
require.extensions['.yml'] = function(module, filename) {
8179
module.exports = yaml.safeLoad(fs.readFileSync(filename, 'utf-8'));

0 commit comments

Comments
 (0)