-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING(front_matter): move to top-level folder (#3252)
- Loading branch information
Showing
22 changed files
with
569 additions
and
260 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. | ||
|
||
import { createExtractor, Format, Parser, test as _test } from "./mod.ts"; | ||
import { parse as parseYAML } from "../yaml.ts"; | ||
import { parse as parseTOML } from "../toml.ts"; | ||
import { extract } from "../../front_matter/any.ts"; | ||
|
||
export { Format, test } from "./mod.ts"; | ||
export const extract = createExtractor({ | ||
[Format.YAML]: parseYAML as Parser, | ||
[Format.TOML]: parseTOML as Parser, | ||
[Format.JSON]: JSON.parse as Parser, | ||
}); | ||
export { | ||
/** @deprecated (will be removed after 0.182.0) Import from `std/front_matter/any.ts` instead. */ | ||
Format, | ||
/** @deprecated (will be removed after 0.182.0) Import from `std/front_matter/any.ts` instead. */ | ||
test, | ||
} from "./mod.ts"; | ||
export { | ||
/** @deprecated (will be removed after 0.182.0) Import from `std/front_matter/any.ts` instead. */ | ||
extract, | ||
}; | ||
|
||
/** @deprecated (will be removed after 0.182.0) Import from `std/front_matter/any.ts` instead. */ | ||
export default extract; |
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,11 +1,19 @@ | ||
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. | ||
|
||
import { createExtractor, Format, Parser, test as _test } from "./mod.ts"; | ||
export { Format } from "./mod.ts"; | ||
import { extract } from "../../front_matter/json.ts"; | ||
|
||
export function test(str: string): boolean { | ||
return _test(str, [Format.JSON]); | ||
} | ||
export { | ||
/** @deprecated (will be removed after 0.182.0) Import from `std/front_matter/json.ts` instead. */ | ||
Format, | ||
} from "./mod.ts"; | ||
|
||
export const extract = createExtractor({ [Format.JSON]: JSON.parse as Parser }); | ||
export { | ||
/** @deprecated (will be removed after 0.182.0) Import from `std/front_matter/json.ts` instead. */ | ||
test, | ||
} from "../../front_matter/json.ts"; | ||
|
||
export { | ||
/** @deprecated (will be removed after 0.182.0) Import from `std/front_matter/json.ts` instead. */ | ||
extract, | ||
}; | ||
export default extract; |
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.