@@ -35,34 +35,34 @@ let config = module.exports = {
3535 host : env . HOST || 'localhost'
3636 } ,
3737
38- appKeys : [ secret . sessionKey ] ,
38+ appKeys : [ secret . sessionKey ] ,
3939 adminKey : secret . adminKey ,
4040
4141 certDir : path . join ( secret . dir , 'cert' ) ,
42-
43- lang : lang ,
42+
43+ lang : lang ,
4444
4545 plnkrAuthId : secret . plnkrAuthId ,
4646
4747 assetVersioning : env . ASSET_VERSIONING === 'file' ? 'file' :
48- env . ASSET_VERSIONING === 'query' ? 'query' : null ,
48+ env . ASSET_VERSIONING === 'query' ? 'query' : null ,
4949
50- pug : {
50+ pug : {
5151 basedir : path . join ( process . cwd ( ) , 'templates' ) ,
52- cache : env . NODE_ENV !== 'development'
52+ cache : env . NODE_ENV !== 'development'
5353 } ,
5454
5555 supportEmail : 'iliakan@javascript.info' ,
5656
57- projectRoot : process . cwd ( ) ,
57+ projectRoot : process . cwd ( ) ,
5858 // public files, served by nginx
59- publicRoot : path . join ( process . cwd ( ) , 'public' , lang ) ,
59+ publicRoot : path . join ( process . cwd ( ) , 'public' , lang ) ,
6060 // private files, for expiring links, not directly accessible
61- tutorialRoot : env . TUTORIAL_ROOT || path . join ( process . cwd ( ) , 'repo' , `${ env . TUTORIAL_LANG || lang } .javascript.info` ) ,
62- tmpRoot : path . join ( process . cwd ( ) , 'tmp' , lang ) ,
61+ tutorialRoot : env . TUTORIAL_ROOT || path . join ( process . cwd ( ) , 'repo' , `${ ( env . TUTORIAL_LANG || lang ) . replace ( / " / g , '' ) } .javascript.info` ) ,
62+ tmpRoot : path . join ( process . cwd ( ) , 'tmp' , lang ) ,
6363 // js/css build versions
64- cacheRoot : path . join ( process . cwd ( ) , 'cache' , lang ) ,
65- assetsRoot : path . join ( process . cwd ( ) , 'assets' ) ,
64+ cacheRoot : path . join ( process . cwd ( ) , 'cache' , lang ) ,
65+ assetsRoot : path . join ( process . cwd ( ) , 'assets' ) ,
6666
6767 handlers : require ( './handlers' )
6868} ;
@@ -71,13 +71,13 @@ let repo = `javascript-tutorial/${config.lang}.javascript.info`;
7171
7272config . tutorialRepo = {
7373 github : repo ,
74- url : new URL ( 'https://github.com/' + repo ) ,
75- tree : new URL ( 'https://github.com/' + repo + '/tree/master' ) ,
76- blob : new URL ( 'https://github.com/' + repo + '/blob/master' )
74+ url : new URL ( 'https://github.com/' + repo ) ,
75+ tree : new URL ( 'https://github.com/' + repo + '/tree/master' ) ,
76+ blob : new URL ( 'https://github.com/' + repo + '/blob/master' )
7777} ;
7878
7979
80- require . extensions [ '.yml' ] = function ( module , filename ) {
80+ require . extensions [ '.yml' ] = function ( module , filename ) {
8181 module . exports = yaml . load ( fs . readFileSync ( filename , 'utf-8' ) ) ;
8282} ;
8383
@@ -95,7 +95,7 @@ createRoot(config.publicRoot);
9595createRoot ( config . cacheRoot ) ;
9696createRoot ( config . tmpRoot ) ;
9797
98- function createRoot ( root ) {
98+ function createRoot ( root ) {
9999 // may be existing symlink
100100 if ( fs . existsSync ( root ) && fs . statSync ( root ) . isFile ( ) ) {
101101 fs . unlinkSync ( root ) ;
0 commit comments