Skip to content

Commit

Permalink
Adapt Site/index to TypeScript
Browse files Browse the repository at this point in the history
Site/index.ts was previously bugged and caused errors with markbind
deploy. As a stopgap measure, Site/index.ts was re-adapted back to JS.

The bug has now been identified along with a fix, however,
Site/index will need to be remigrated back to TS. The false negative
test case in deploy has also been identifed and will be fixed as well.

Let's remigrate Site/index to TS, fix the deploy option that caused
the markbind deploy bug and also fix the negative test case that failed
to detect the bug.

Migration was made according to the original migration PR and the latest
v5.0.0.
  • Loading branch information
WillCWX authored and tlylt committed Jul 30, 2023
1 parent 8150b7b commit 77d6410
Show file tree
Hide file tree
Showing 8 changed files with 280 additions and 194 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ packages/core/src/variables/*.js
packages/core/test/unit/**/*.js

# TODO: remove when migrated to TS
!packages/core/src/Layout/*.js
!markdown-it-icons.test.js
!Site.test.js

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ packages/core/src/variables/*.js
packages/core/test/unit/**/*.js

# TODO: remove when migrated to TS
!packages/core/src/Layout/*.js
!markdown-it-icons.test.js
!Site.test.js

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cmd/build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path');

const { Site } = require('@markbind/core');
const { Site } = require('@markbind/core').Site;

const cliUtil = require('../util/cliUtil');
const logger = require('../util/logger');
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cmd/deploy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path');

const { Site } = require('@markbind/core');
const { Site } = require('@markbind/core').Site;

const cliUtil = require('../util/cliUtil');
const logger = require('../util/logger');
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cmd/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const fs = require('fs-extra');
const path = require('path');

const { Template } = require('@markbind/core');
const { Site } = require('@markbind/core');
const { Site } = require('@markbind/core').Site;

const logger = require('../util/logger');

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cmd/serve.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const chokidar = require('chokidar');
const path = require('path');

const { Site } = require('@markbind/core');
const { Site } = require('@markbind/core').Site;
const { pageVueServerRenderer } = require('@markbind/core/src/Page/PageVueServerRenderer');

const fsUtil = require('@markbind/core/src/utils/fsUtil');
Expand Down
Loading

0 comments on commit 77d6410

Please sign in to comment.