Skip to content

Commit 866d5bf

Browse files
committed
up
1 parent 8225043 commit 866d5bf

File tree

7 files changed

+44
-9
lines changed

7 files changed

+44
-9
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

dev.cmd

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@if "%~1"=="" goto usage
2+
3+
set NODE_LANG=%1
4+
@set NODE_ENV=development
5+
@set ASSET_VERSIONING=query
6+
@set WATCH=1
7+
@set SITE_HOST=http://javascript.local
8+
@set PORT=80
9+
@set NODE_PATH=./handlers;./modules
10+
@set TUTORIAL_EDIT=1
11+
12+
call gulp dev
13+
14+
goto :eof
15+
16+
:usage
17+
echo Usage: %0 <Language>
18+
exit /B 1

edit.cmd

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@if "%~1"=="" goto usage
2+
3+
set NODE_LANG=%1
4+
@set NODE_ENV=development
5+
@set ASSET_VERSIONING=query
6+
@set WATCH=1
7+
@set SITE_HOST=http://javascript.local
8+
@set PORT=80
9+
@set NODE_PATH=./handlers;./modules
10+
@set PLUNK_REMOTE_OFF=1
11+
12+
call gulp tutorial:import --root /js/javascript-tutorial-%NODE_LANG%
13+
14+
call gulp edit --root /js/javascript-tutorial-%NODE_LANG%
15+
16+
goto :eof
17+
18+
:usage
19+
echo Usage: %0 <Language>
20+
exit /B 1

handlers/tutorial/tutorialImporter.js

+1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ TutorialImporter.prototype.syncFolder = function*(sourceFolderPath, parent) {
130130

131131
data.githubLink = config.tutorialGithubBaseUrl + sourceFolderPath.slice(this.root.length);
132132

133+
console.log(data);
133134
const folder = new Article(data);
134135

135136
yield folder.persist();

modules/client/prism/index.js

-5
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@ require('prismjs/components/prism-css.js');
88
require('prismjs/components/prism-css-extras.js');
99
require('prismjs/components/prism-clike.js');
1010
require('prismjs/components/prism-javascript.js');
11-
require('prismjs/components/prism-coffeescript.js');
1211
require('prismjs/components/prism-http.js');
1312
require('prismjs/components/prism-scss.js');
1413
require('prismjs/components/prism-sql.js');
15-
require('prismjs/components/prism-php.js');
16-
require('prismjs/components/prism-php-extras.js');
17-
require('prismjs/components/prism-python.js');
18-
require('prismjs/components/prism-ruby.js');
1914
require('prismjs/components/prism-java.js');
2015

2116
Prism.tokenTag = 'code'; // for iBooks to use monospace font

modules/markit/loadImgSizeAsync.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ module.exports = function* (tokens, options) {
6868
function srcUnderRoot(root, src) {
6969
let absolutePath = path.join(root, src);
7070

71-
if (absolutePath.slice(0, root.length + 1) != root + '/') {
72-
throw new SrcError(t('markit.error.src_outside_of_root', {src}));
71+
if (absolutePath.slice(0, root.length + 1) != root + path.sep) {
72+
throw new SrcError(t('markit.error.src_out_of_root', {src}));
7373
}
7474

7575
return absolutePath;

modules/markit/loadSrcAsync.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class SrcError extends Error {
3030
function srcUnderRoot(root, src) {
3131
let absolutePath = path.join(root, src);
3232

33-
if (absolutePath.slice(0, root.length + 1) != root + '/') {
34-
throw new SrcError(t('markit.error.src_outside_of_root', {src}));
33+
if (absolutePath.slice(0, root.length + 1) != root + path.sep) {
34+
throw new SrcError(t('markit.error.src_out_of_root', {src}));
3535
}
3636

3737
return absolutePath;

0 commit comments

Comments
 (0)