Skip to content

Commit d1ce5ba

Browse files
committed
chore: fmt
1 parent 893f0c3 commit d1ce5ba

28 files changed

Lines changed: 572 additions & 556 deletions

.github/workflows/ci.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@ name: Tests
33
on: [push, pull_request]
44

55
jobs:
6-
test:
7-
runs-on: ubuntu-latest
8-
9-
strategy:
10-
matrix:
11-
node-version: [14.x, 16.x, 18.x]
12-
13-
steps:
14-
- uses: actions/checkout@v2
15-
16-
- name: Setup Node 16
17-
uses: actions/setup-node@v1
18-
with:
19-
node-version: 16
20-
registry-url: https://registry.npmjs.org/
21-
22-
- name: Setup PNPM
23-
uses: pnpm/action-setup@v2.0.1
24-
with:
25-
version: 7.0.0
26-
27-
- name: Install
28-
run: pnpm install
29-
30-
- name: Test
31-
run: pnpm test
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [14.x, 16.x, 18.x]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Setup Node 16
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 16
20+
registry-url: https://registry.npmjs.org/
21+
22+
- name: Setup PNPM
23+
uses: pnpm/action-setup@v2.0.1
24+
with:
25+
version: 7.0.0
26+
27+
- name: Install
28+
run: pnpm install
29+
30+
- name: Test
31+
run: pnpm test

.github/workflows/release.yml

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
11
name: Release Package & Test
22

33
on:
4-
release:
5-
types: [created]
4+
release:
5+
types: [created]
66

77
jobs:
8-
test:
9-
runs-on: ubuntu-latest
10-
11-
strategy:
12-
matrix:
13-
node-version: [14.x, 16.x, 18.x]
14-
15-
steps:
16-
- uses: actions/checkout@v2
17-
18-
- name: Setup Node 16
19-
uses: actions/setup-node@v1
20-
with:
21-
node-version: 16
22-
registry-url: https://registry.npmjs.org/
23-
24-
- name: Setup PNPM
25-
uses: pnpm/action-setup@v2.0.1
26-
with:
27-
version: 7.0.0
28-
29-
- name: Install
30-
run: pnpm install
31-
32-
- name: Test
33-
run: pnpm test
34-
35-
publish-npm:
36-
runs-on: ubuntu-latest
37-
steps:
38-
- name: Checkout
39-
uses: actions/checkout@v2
40-
41-
- name: Setup Node 16
42-
uses: actions/setup-node@v1
43-
with:
44-
node-version: 16
45-
registry-url: https://registry.npmjs.org/
46-
47-
- name: Setup PNPM
48-
uses: pnpm/action-setup@v2.0.1
49-
with:
50-
version: 7.0.0
51-
52-
- name: Install
53-
run: pnpm install
54-
55-
- name: Build
56-
run: pnpm build
57-
58-
- name: Publish
59-
run: |
60-
pnpm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
61-
pnpm publish --no-git-checks
62-
env:
63-
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node-version: [14.x, 16.x, 18.x]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Setup Node 16
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: 16
22+
registry-url: https://registry.npmjs.org/
23+
24+
- name: Setup PNPM
25+
uses: pnpm/action-setup@v2.0.1
26+
with:
27+
version: 7.0.0
28+
29+
- name: Install
30+
run: pnpm install
31+
32+
- name: Test
33+
run: pnpm test
34+
35+
publish-npm:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v2
40+
41+
- name: Setup Node 16
42+
uses: actions/setup-node@v1
43+
with:
44+
node-version: 16
45+
registry-url: https://registry.npmjs.org/
46+
47+
- name: Setup PNPM
48+
uses: pnpm/action-setup@v2.0.1
49+
with:
50+
version: 7.0.0
51+
52+
- name: Install
53+
run: pnpm install
54+
55+
- name: Build
56+
run: pnpm build
57+
58+
- name: Publish
59+
run: |
60+
pnpm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
61+
pnpm publish --no-git-checks
62+
env:
63+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/node_modules
2+
/pnpm-lock.yaml
3+
/dist
4+
/docs

.prettierrc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
2-
"singleQuote": true,
3-
"quoteProps": "as-needed",
4-
"trailingComma": "all",
5-
"bracketSpacing": true,
6-
"arrowParens": "always",
7-
"semi": true,
8-
"useTabs": false,
9-
"tabWidth": 4
2+
"singleQuote": true,
3+
"quoteProps": "as-needed",
4+
"trailingComma": "all",
5+
"bracketSpacing": true,
6+
"bracketSameLine": false,
7+
"arrowParens": "always",
8+
"semi": true,
9+
"useTabs": true,
10+
"tabWidth": 4
1011
}

.vscode/extensions.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"recommendations": [
3-
"esbenp.prettier-vscode",
4-
"christian-kohler.npm-intellisense"
5-
]
2+
"recommendations": [
3+
"esbenp.prettier-vscode",
4+
"christian-kohler.npm-intellisense"
5+
]
66
}

.vscode/settings.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"[javascript]": {
3-
"editor.defaultFormatter": "esbenp.prettier-vscode",
4-
"editor.formatOnSave": true
5-
},
6-
"[typescript]": {
7-
"editor.defaultFormatter": "esbenp.prettier-vscode",
8-
"editor.formatOnSave": true
9-
},
10-
"[svelte]": {
11-
"editor.defaultFormatter": "svelte.svelte-vscode",
12-
"editor.formatOnSave": true
13-
},
14-
"[json]": {
15-
"editor.defaultFormatter": "vscode.json-language-features",
16-
"editor.formatOnSave": true
17-
}
2+
"[javascript]": {
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.formatOnSave": true
5+
},
6+
"[typescript]": {
7+
"editor.defaultFormatter": "esbenp.prettier-vscode",
8+
"editor.formatOnSave": true
9+
},
10+
"[svelte]": {
11+
"editor.defaultFormatter": "svelte.svelte-vscode",
12+
"editor.formatOnSave": true
13+
},
14+
"[json]": {
15+
"editor.defaultFormatter": "vscode.json-language-features",
16+
"editor.formatOnSave": true
17+
}
1818
}

README.md

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ const { create, get, url } = require('sourcebin');
4141

4242
```js
4343
const bin = await get({
44-
key: 'qXO2NVhRc6'
44+
key: 'qXO2NVhRc6',
4545
});
4646
```
4747

4848
## Options
4949

5050
| Option | Description | Default | Required |
51-
|----------------|-----------------------------------|---------|----------|
51+
| -------------- | --------------------------------- | ------- | -------- |
5252
| `key` | The key to get | n/a ||
5353
| `fetchContent` | Should the bin content be fetched | `true` ||
5454

@@ -57,34 +57,32 @@ const bin = await get({
5757
`create(options)`
5858

5959
```js
60-
const bin = await create(
61-
{
62-
title: 'bin name',
63-
description: 'test bin',
64-
files: [
65-
{
66-
content: 'Hello World',
67-
language: 'text',
68-
},
69-
],
70-
},
71-
);
60+
const bin = await create({
61+
title: 'bin name',
62+
description: 'test bin',
63+
files: [
64+
{
65+
content: 'Hello World',
66+
language: 'text',
67+
},
68+
],
69+
});
7270
```
7371

7472
## Options
7573

76-
| Option | Description | Required |
77-
|----------------|------------------------|----------|
78-
| `title` | Title of the bin ||
79-
| `description` | Description of the bin ||
80-
| `files` | Bin files - see below ||
74+
| Option | Description | Required |
75+
| ------------- | ---------------------- | -------- |
76+
| `title` | Title of the bin ||
77+
| `description` | Description of the bin ||
78+
| `files` | Bin files - see below ||
8179

8280
### File Options
8381

84-
| Option | Description | Default | Required |
85-
|----------------|----------------------------------|---------|----------|
86-
| `content` | Contents of the file | n/a ||
87-
| `language` | What language should the file be | `text` ||
82+
| Option | Description | Default | Required |
83+
| ---------- | -------------------------------- | ------- | -------- |
84+
| `content` | Contents of the file | n/a ||
85+
| `language` | What language should the file be | `text` ||
8886

8987
# Url Helper
9088

@@ -110,11 +108,11 @@ This returns an object that looks like:
110108

111109
# FAQ
112110

113-
- ## Multiple files in one bin
111+
- ## Multiple files in one bin
114112

115113
This is not currently possible with this wrapper as sourcebin doesn't have a token system for authentication, only pro users are able to have multiple files in one bin. This may come in the future
116114

117-
- ## Migrate from v4 to v5
115+
- ## Migrate from v4 to v5
118116

119117
v5 is a overhaull of `sourcebin` so we changed some apis.
120118

@@ -133,7 +131,7 @@ This returns an object that looks like:
133131
### Create a bin
134132

135133
We also unified the options for this function:
136-
134+
137135
```diff
138136
- const bin = await create(
139137
- [
@@ -164,5 +162,5 @@ This returns an object that looks like:
164162

165163
# Support
166164

167-
- Join the [discord](https://discord.gg/2Vd4wAjJnm)
168-
- Create a issue on the [github](https://github.com/ghostdevv/sourcebin)
165+
- Join the [discord](https://discord.gg/2Vd4wAjJnm)
166+
- Create a issue on the [github](https://github.com/ghostdevv/sourcebin)

0 commit comments

Comments
 (0)