Skip to content

Commit

Permalink
feat: implement csv parser with unist/mircomark stack (#1468)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Aug 25, 2022
1 parent df85e8e commit ce5397d
Show file tree
Hide file tree
Showing 8 changed files with 1,189 additions and 39 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"dependencies": {
"@nuxt/kit": "^3.0.0-rc.8",
"consola": "^2.15.3",
"csvtojson": "^2.0.10",
"defu": "^6.1.0",
"destr": "^1.1.1",
"detab": "^3.0.1",
Expand Down Expand Up @@ -87,6 +86,7 @@
"@nuxtjs/eslint-config-typescript": "latest",
"@types/ws": "^8.5.3",
"c8": "^7.12.0",
"csvtojson": "^2.0.10",
"eslint": "^8.22.0",
"globby": "^13.1.2",
"husky": "^8.0.1",
Expand Down
10 changes: 8 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ export interface ModuleOptions {
*
* @default {}
*/
csv: false | Record<string, any>
csv: false | {
json?: boolean
delimeter?: string
}
/**
* Enable/Disable navigation.
*
Expand Down Expand Up @@ -217,7 +220,10 @@ export default defineNuxtModule<ModuleOptions>({
tags: Object.fromEntries(PROSE_TAGS.map(t => [t, `prose-${t}`]))
},
yaml: {},
csv: {},
csv: {
delimeter: ',',
json: true
},
navigation: {
fields: []
},
Expand Down
19 changes: 0 additions & 19 deletions src/runtime/transformers/csv.ts

This file was deleted.

0 comments on commit ce5397d

Please sign in to comment.