-
-
Notifications
You must be signed in to change notification settings - Fork 2
Rename exports & cleanup #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,7 @@ | |
}, | ||
"devDependencies": { | ||
"@ava/typescript": "3.0.1", | ||
"@nrwl/workspace": "14.4.3", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice! |
||
"@types/inquirer": "8.2.1", | ||
"@types/inquirer": "9.0.0", | ||
"@types/node": "16.11.47", | ||
"ava": "4.3.1", | ||
"bumpp": "8.2.1", | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -31,7 +31,11 @@ To use the most common setup for markdown files sourced from the filesystem, Fla | |||||||||||||||||||||||||||||||||||||||||||||
The following example takes you through the default flatbread setup. | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||||||||||||||||
pnpm i flatbread@latest | ||||||||||||||||||||||||||||||||||||||||||||||
# barebones | ||||||||||||||||||||||||||||||||||||||||||||||
pnpm i flatbread | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
# these are your likely suspects, but other plugins might fit your use cases | ||||||||||||||||||||||||||||||||||||||||||||||
pnpm i flatbread @flatbread/transformer-markdown @flatbread/source-filesystem | ||||||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||
Automatically create a `flatbread.config.js` file: | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -60,7 +64,9 @@ package.json | |||||||||||||||||||||||||||||||||||||||||||||
In reference to that structure, set up a `flatbread.config.js` in the root of your project: | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
```js | ||||||||||||||||||||||||||||||||||||||||||||||
import { defineConfig, transformerMarkdown, sourceFilesystem } from 'flatbread'; | ||||||||||||||||||||||||||||||||||||||||||||||
import { defineConfig } from 'flatbread'; | ||||||||||||||||||||||||||||||||||||||||||||||
import { transformMarkdown } from '@flatbread/transformer-markdown'; | ||||||||||||||||||||||||||||||||||||||||||||||
import { sourceFilesystem } from '@flatbread/source-filesystem'; | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
const transformerConfig = { | ||||||||||||||||||||||||||||||||||||||||||||||
markdown: { | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -70,7 +76,7 @@ const transformerConfig = { | |||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||
export default defineConfig({ | ||||||||||||||||||||||||||||||||||||||||||||||
source: sourceFilesystem(), | ||||||||||||||||||||||||||||||||||||||||||||||
transformer: transformerMarkdown(transformerConfig), | ||||||||||||||||||||||||||||||||||||||||||||||
transformer: transformMarkdown(transformerConfig), | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
content: [ | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,35 +31,27 @@ | |
"*.d.ts" | ||
], | ||
"dependencies": { | ||
"@apollo/utils.keyvaluecache": "^1.0.1", | ||
"@apollo/utils.keyvaluecache": "1.0.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should split out |
||
"@flatbread/config": "workspace:*", | ||
"@flatbread/core": "workspace:*", | ||
"@flatbread/source-filesystem": "workspace:*", | ||
"@flatbread/transformer-markdown": "workspace:*", | ||
"@flatbread/transformer-yaml": "workspace:*", | ||
"apollo-server-core": "^3.9.0", | ||
"apollo-server-express": "^3.9.0", | ||
"cors": "^2.8.5", | ||
"express": "^4.18.1", | ||
"express-graphql": "^0.12.0", | ||
"find-up": "^6.3.0", | ||
"gradient-string": "^2.0.1", | ||
"apollo-server-core": "3.10.0", | ||
"apollo-server-express": "3.10.0", | ||
"express": "4.18.1", | ||
"express-graphql": "0.12.0", | ||
"find-up": "6.3.0", | ||
"gradient-string": "2.0.1", | ||
"graphql": "16.5.0", | ||
"kleur": "^4.1.5", | ||
"remark-github": "^11.2.3", | ||
"sade": "^1.8.1", | ||
"serialize-javascript": "^6.0.0" | ||
"kleur": "4.1.5", | ||
"sade": "1.8.1" | ||
}, | ||
"devDependencies": { | ||
"@types/cors": "2.8.12", | ||
"@types/express": "4.17.13", | ||
"@types/gradient-string": "1.1.2", | ||
"@types/node": "16.11.47", | ||
"@types/sade": "1.7.4", | ||
"@types/serialize-javascript": "5.0.2", | ||
"tsup": "6.2.1", | ||
"typescript": "4.7.4", | ||
"vfile": "5.3.4" | ||
"typescript": "4.7.4" | ||
}, | ||
"pnpm": { | ||
"peerDependencyRules": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
export * from '@flatbread/core'; | ||
|
||
// Convenience exports for the most common use-cases | ||
// Convenience re-export | ||
export { default as defineConfig, loadConfig } from '@flatbread/config'; | ||
export { source as sourceFilesystem } from '@flatbread/source-filesystem'; | ||
export { transformer as transformerMarkdown } from '@flatbread/transformer-markdown'; | ||
export { transformer as transformerYaml } from '@flatbread/transformer-yaml'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we rename this too?
resolveSvimgField
?