-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
490 additions
and
438 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import './term'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import './polyfill'; | ||
import './code'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import '@diplodoc/cut-extension/runtime'; | ||
import '@diplodoc/tabs-extension/runtime'; | ||
|
||
import './polyfill'; | ||
import './code'; | ||
import './term'; | ||
import './base'; | ||
import './_yfm-only'; | ||
import './wide-mode'; | ||
import './patch'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
Note: This file excludes "cut" and "tabs" as they are handled separately | ||
in dedicated extensions (packages). In the future, "note", "file", "term" | ||
and "table" will also be excluded from this file and moved to yfm.scss, | ||
once they are moved to separate packages. Direct usage is not recommended, | ||
as the file is subject to changes without prior notice. | ||
*/ | ||
|
||
@import 'note'; | ||
@import 'file'; | ||
@import 'table'; | ||
@import 'term'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@import 'common'; | ||
@import 'anchor'; | ||
@import 'highlight'; | ||
@import 'code'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
@import 'common'; | ||
@import 'note'; | ||
@import 'anchor'; | ||
@import 'highlight'; | ||
@import 'code'; | ||
@import 'file'; | ||
@import 'term'; | ||
@import 'table'; | ||
@import 'base'; | ||
@import 'yfm-only'; | ||
@import 'modal'; | ||
|
||
@import '@diplodoc/cut-extension/runtime'; | ||
@import '@diplodoc/tabs-extension/runtime'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import {readFileSync, writeFileSync} from 'fs'; | ||
import {readFile, writeFile} from 'fs/promises'; | ||
|
||
import {FsContext} from './typings'; | ||
import {isFileExists, isFileExistsAsync} from './utilsFS'; | ||
|
||
export class DefaultFsContext implements FsContext { | ||
exist(path: string): boolean { | ||
return isFileExists(path); | ||
} | ||
|
||
read(path: string): string { | ||
return readFileSync(path, 'utf8'); | ||
} | ||
|
||
write(path: string, content: string): void { | ||
writeFileSync(path, content, { | ||
encoding: 'utf8', | ||
}); | ||
} | ||
|
||
async existAsync(path: string): Promise<boolean> { | ||
return await isFileExistsAsync(path); | ||
} | ||
|
||
async readAsync(path: string): Promise<string> { | ||
return readFile(path, 'utf8'); | ||
} | ||
|
||
async writeAsync(path: string, content: string): Promise<void> { | ||
writeFile(path, content, { | ||
encoding: 'utf8', | ||
}); | ||
} | ||
} | ||
|
||
export const defaultFsContext = new DefaultFsContext(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.