Skip to content

Commit

Permalink
fix(csv-demo-webpack-ts): simplify export paths
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Dec 29, 2021
1 parent 47a99bd commit 8d63a14
Show file tree
Hide file tree
Showing 20 changed files with 56 additions and 62 deletions.
13 changes: 12 additions & 1 deletion demo/webpack-ts/README.md
@@ -1,8 +1,19 @@

# `webpack` bundler with TypeScript demonstration

The project illustrate the usage of TypeScript with `webpack` version 5.
The project illustrates the usage of TypeScript with `webpack` version 5.

## Running

```bash
npm run build
npm run start
```

## Testing

```bash
npm run test
```

The test suite consists in building the code with webpack. We don't check if the code is working.
2 changes: 1 addition & 1 deletion demo/webpack-ts/src/generate.ts
@@ -1,5 +1,5 @@

import {generate} from 'csv-generate/browser/esm/index.js';
import {generate} from 'csv-generate/browser/esm';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack-ts/src/parse.ts
@@ -1,5 +1,5 @@

import { parse, CsvError } from 'csv-parse/browser/esm/index.js'
import { parse, CsvError } from 'csv-parse/browser/esm'

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack-ts/src/stringify.ts
@@ -1,5 +1,5 @@

import {stringify} from 'csv-stringify/browser/esm/index.js';
import {stringify} from 'csv-stringify/browser/esm';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack-ts/src/transform.ts
@@ -1,5 +1,5 @@

import {transform} from 'stream-transform/browser/esm/index.js';
import {transform} from 'stream-transform/browser/esm';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack/src/csv.js
@@ -1,5 +1,5 @@

import * as csv from 'csv/browser/esm/index.js';
import * as csv from 'csv/browser/esm';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack/src/csv_sync.js
@@ -1,5 +1,5 @@

import * as csv from 'csv/browser/esm/sync.js';
import * as csv from 'csv/browser/esm/sync';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack/src/generate.js
@@ -1,5 +1,5 @@

import {generate} from 'csv-generate/browser/esm/index.js';
import {generate} from 'csv-generate/browser/esm';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack/src/generate_sync.js
@@ -1,5 +1,5 @@

import {generate} from 'csv-generate/browser/esm/sync.js';
import {generate} from 'csv-generate/browser/esm/sync';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack/src/parse.js
@@ -1,5 +1,5 @@

import {parse} from 'csv-parse/browser/esm/index.js';
import {parse} from 'csv-parse/browser/esm';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack/src/parse_sync.js
@@ -1,5 +1,5 @@

import {parse} from 'csv-parse/browser/esm/sync.js';
import {parse} from 'csv-parse/browser/esm/sync';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack/src/stringify.js
@@ -1,5 +1,5 @@

import {stringify} from 'csv-stringify/browser/esm/index.js';
import {stringify} from 'csv-stringify/browser/esm';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack/src/stringify_sync.js
@@ -1,5 +1,5 @@

import {stringify} from 'csv-stringify/browser/esm/sync.js';
import {stringify} from 'csv-stringify/browser/esm/sync';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack/src/transform.js
@@ -1,5 +1,5 @@

import {transform} from 'stream-transform/browser/esm/index.js';
import {transform} from 'stream-transform/browser/esm';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack/src/transform_sync.js
@@ -1,5 +1,5 @@

import {transform} from 'stream-transform/browser/esm/sync.js';
import {transform} from 'stream-transform/browser/esm/sync';

window.onload = () => {
const runEl = document.getElementById('run');
Expand Down
16 changes: 6 additions & 10 deletions packages/csv-generate/package.json
Expand Up @@ -36,7 +36,8 @@
"import": "./lib/sync.js",
"require": "./dist/cjs/sync.cjs"
},
"./browser/esm/*": "./dist/esm/*"
"./browser/esm": "./dist/esm/index.js",
"./browser/esm/sync": "./dist/esm/sync.js"
},
"files": [
"dist",
Expand Down Expand Up @@ -78,15 +79,10 @@
"types": "dist/esm/index.d.ts",
"typesVersions": {
"*": {
".": [
"dist/esm/index.d.ts"
],
"sync": [
"dist/esm/sync.d.ts"
],
"browser/esm/*": [
"dist/esm/*"
]
".": ["dist/esm/index.d.ts"],
"sync": ["dist/esm/sync.d.ts"],
"browser/esm": ["dist/esm/index.d.ts"],
"browser/esm/sync": ["dist/esm/sync.d.ts"]
}
}
}
16 changes: 6 additions & 10 deletions packages/csv-parse/package.json
Expand Up @@ -38,7 +38,8 @@
"import": "./lib/sync.js",
"require": "./dist/cjs/sync.cjs"
},
"./browser/esm/*": "./dist/esm/*"
"./browser/esm": "./dist/esm/index.js",
"./browser/esm/sync": "./dist/esm/sync.js"
},
"devDependencies": {
"@rollup/plugin-eslint": "^8.0.1",
Expand Down Expand Up @@ -101,15 +102,10 @@
"types": "dist/esm/index.d.ts",
"typesVersions": {
"*": {
".": [
"dist/esm/index.d.ts"
],
"sync": [
"dist/esm/sync.d.ts"
],
"browser/esm/*": [
"dist/esm/*"
]
".": ["dist/esm/index.d.ts"],
"sync": ["dist/esm/sync.d.ts"],
"browser/esm": ["dist/esm/index.d.ts"],
"browser/esm/sync": ["dist/esm/sync.d.ts"]
}
}
}
16 changes: 6 additions & 10 deletions packages/csv-stringify/package.json
Expand Up @@ -36,7 +36,8 @@
"import": "./lib/sync.js",
"require": "./dist/cjs/sync.cjs"
},
"./browser/esm/*": "./dist/esm/*"
"./browser/esm": "./dist/esm/index.js",
"./browser/esm/sync": "./dist/esm/sync.js"
},
"files": [
"dist",
Expand Down Expand Up @@ -78,15 +79,10 @@
"types": "dist/esm/index.d.ts",
"typesVersions": {
"*": {
".": [
"dist/esm/index.d.ts"
],
"sync": [
"dist/esm/sync.d.ts"
],
"browser/esm/*": [
"dist/esm/*"
]
".": ["dist/esm/index.d.ts"],
"sync": ["dist/esm/sync.d.ts"],
"browser/esm": ["dist/esm/index.d.ts"],
"browser/esm/sync": ["dist/esm/sync.d.ts"]
}
}
}
13 changes: 6 additions & 7 deletions packages/csv/package.json
Expand Up @@ -54,7 +54,8 @@
"import": "./lib/sync.js",
"require": "./dist/cjs/sync.cjs"
},
"./browser/esm/*": "./dist/esm/*"
"./browser/esm": "./dist/esm/index.js",
"./browser/esm/sync": "./dist/esm/sync.js"
},
"homepage": "https://csv.js.org/",
"files": [
Expand Down Expand Up @@ -96,12 +97,10 @@
"types": "dist/esm/index.d.ts",
"typesVersions": {
"*": {
".": [
"dist/esm/index.d.ts"
],
"sync": [
"dist/esm/sync.d.ts"
]
".": ["dist/esm/index.d.ts"],
"sync": ["dist/esm/sync.d.ts"],
"browser/esm": ["dist/esm/index.d.ts"],
"browser/esm/sync": ["dist/esm/sync.d.ts"]
}
}
}
16 changes: 6 additions & 10 deletions packages/stream-transform/package.json
Expand Up @@ -36,7 +36,8 @@
"import": "./lib/sync.js",
"require": "./dist/cjs/sync.cjs"
},
"./browser/esm/*": "./dist/esm/*"
"./browser/esm": "./dist/esm/index.js",
"./browser/esm/sync": "./dist/esm/sync.js"
},
"files": [
"dist",
Expand Down Expand Up @@ -78,15 +79,10 @@
"types": "dist/esm/index.d.ts",
"typesVersions": {
"*": {
".": [
"dist/esm/index.d.ts"
],
"sync": [
"dist/esm/sync.d.ts"
],
"browser/esm/*": [
"dist/esm/*"
]
".": ["dist/esm/index.d.ts"],
"sync": ["dist/esm/sync.d.ts"],
"browser/esm": ["dist/esm/index.d.ts"],
"browser/esm/sync": ["dist/esm/sync.d.ts"]
}
}
}

0 comments on commit 8d63a14

Please sign in to comment.