Skip to content

Commit

Permalink
feat: change package scope 'csvjs' to 'csv-js'
Browse files Browse the repository at this point in the history
  • Loading branch information
eddieyg committed Jan 31, 2023
1 parent 7cd3bd3 commit ddd43a8
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 29 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@ A js library specialized in processing csv data.

## 📦︎ Packages

- `@csvjs/csv` A class specialized in processing csv data.
- `@csvjs/core` The core module for processing csv.
- `@csvjs/type` Generic types for csvjs packsge.
- `@csv-js/csv` A class specialized in processing csv data.
- `@csv-js/core` The core module for processing csv.
- `@csv-js/type` Generic types for csv-js packsge.

## 👨‍💻 Usage

### Install

```shell
npm install @csvjs/csv --save
npm install @csv-js/csv --save
```

### Example

```typescript
import Csv from '@csvjs/csv'
import Csv from '@csv-js/csv'

const header = [
{
key: 'name',
Expand Down
4 changes: 2 additions & 2 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# @csvjs/core
# @csv-js/core
The core module for processing csv.

## Usage


```
npm install @csvjs/core --save
npm install @csv-js/core --save
```
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@csvjs/core",
"name": "@csv-js/core",
"version": "0.0.1",
"description": "The core module for processing csv",
"main": "dist/index.js",
Expand All @@ -11,7 +11,7 @@
"test:w": "vitest watch"
},
"dependencies": {
"@csvjs/type": "workspace:^0.0.1"
"@csv-js/type": "workspace:^0.0.1"
},
"keywords": [
"csv",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {
csvHeaderKeys,
CsvRow,
CsvHeader,
} from '@csvjs/type'
} from '@csv-js/type'
import { removeDoubleQuotes } from './utils'

export function parseCsv (
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/stringify.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {
CsvRow,
CsvHeader,
} from '@csvjs/type'
} from '@csv-js/type'
import { isUndefined } from './utils'

export function stringifyCsv (
Expand Down
4 changes: 2 additions & 2 deletions packages/csv/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @csvjs/csv
# @csv-js/csv
Main module for processing with Csv.

## Usage

```
npm install @csvjs/csv --save
npm install @csv-js/csv --save
```
6 changes: 3 additions & 3 deletions packages/csv/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@csvjs/csv",
"name": "@csv-js/csv",
"version": "0.0.1",
"description": "Main module for processing with Csv.",
"main": "dist/index.js",
Expand All @@ -11,8 +11,8 @@
"test:w": "vitest watch"
},
"dependencies": {
"@csvjs/core": "workspace:^0.0.1",
"@csvjs/type": "workspace:^0.0.1"
"@csv-js/core": "workspace:^0.0.1",
"@csv-js/type": "workspace:^0.0.1"
},
"keywords": [
"csv",
Expand Down
4 changes: 2 additions & 2 deletions packages/csv/src/csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type {
CsvRow,
CsvOptions,
csvHeaderKeys,
} from '@csvjs/type'
import { downloadCsvFile, isArray, parseCsv, stringifyCsv } from '@csvjs/core'
} from '@csv-js/type'
import { downloadCsvFile, isArray, parseCsv, stringifyCsv } from '@csv-js/core'

export default class Csv {
readonly header: CsvHeader[]
Expand Down
6 changes: 3 additions & 3 deletions packages/type/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @csvjs/type
Generic types for csvjs packsge.
# @csv-js/type
Generic types for csv-js packsge.

## Usage

```
npm install @csvjs/type --save
npm install @csv-js/type --save
```
4 changes: 2 additions & 2 deletions packages/type/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@csvjs/type",
"name": "@csv-js/type",
"version": "0.0.1",
"description": "Generic types for csvjs packsge.",
"description": "Generic types for csv-js packsge.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
Expand Down
15 changes: 9 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ddd43a8

Please sign in to comment.