Skip to content
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

add default export, constructor options, fix demos and remove all dist #21

Merged
merged 6 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ pnpm-debug.log*

# Gitkeep
!/**/.gitkeep
plugins/**/dist
plugins/**/dist/*
5 changes: 2 additions & 3 deletions plugins/csv-parser/demo/demo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Vizzu from 'vizzu'
//import { CSVParser } from '../dist/mjs/index.js'
import { CSVParser } from 'https://unpkg.com/@vizzu/csv-parser@latest?module'
import Vizzu from 'https://cdn.jsdelivr.net/npm/[email protected]/dist/vizzu.min.js'
import { CSVParser } from '../dist/mjs/index.js'
let chart

window.addEventListener('load', async function () {
Expand Down
10 changes: 0 additions & 10 deletions plugins/csv-parser/dist/cjs/index.js

This file was deleted.

7 changes: 0 additions & 7 deletions plugins/csv-parser/dist/cjs/index.js.map

This file was deleted.

10 changes: 0 additions & 10 deletions plugins/csv-parser/dist/mjs/index.js

This file was deleted.

7 changes: 0 additions & 7 deletions plugins/csv-parser/dist/mjs/index.js.map

This file was deleted.

94 changes: 0 additions & 94 deletions plugins/csv-parser/dist/types/dataParser.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion plugins/csv-parser/dist/types/delimiterDetect.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion plugins/csv-parser/dist/types/headerDetect.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions plugins/csv-parser/dist/types/index.d.ts

This file was deleted.

13 changes: 0 additions & 13 deletions plugins/csv-parser/dist/types/node.d.ts

This file was deleted.

11 changes: 7 additions & 4 deletions plugins/csv-parser/src/dataParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,15 @@ export class DataParser implements Plugin {
}

meta = {
name: 'csvParser'
name: 'csvParser',
version: '0.9.0',
depends: []
}

constructor(debug: boolean = false) {
this._debug = debug
constructor(params: { options?: Options } | null = null) {
if (params?.options) {
this.parserOptions = { ...this.parserOptions, ...params.options }
}
}

get hasHeader(): boolean | null {
Expand Down Expand Up @@ -180,7 +184,6 @@ export class DataParser implements Plugin {
}

private _setOptions(options: optionsTypes) {
this._log(['setOptions', options])
if ('delimiter' in options && options.delimiter) {
this.parserOptions.delimiter = options.delimiter
}
Expand Down
2 changes: 2 additions & 0 deletions plugins/csv-parser/src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ export class CSVParser extends DataParser {
return fs.readFileSync(fileName, 'utf-8')
}
}

export default CSVParser
1 change: 0 additions & 1 deletion plugins/data-types/dist/cjs/index.js

This file was deleted.

Loading