Skip to content

Commit 0527063

Browse files
committed
Updated README.md and package.json
1 parent 6fd72b3 commit 0527063

3 files changed

Lines changed: 128 additions & 7 deletions

File tree

README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,92 @@
11
# Setup CLI
2+
3+
The setup CLI automatically sets up a [prettier](https://www.npmjs.com/package/prettier) and [typescript](https://www.npmjs.com/package/typescript) config.
4+
5+
## API
6+
7+
<table>
8+
<thead>
9+
<th>Short flag</th>
10+
<th>Long flag</th>
11+
<th>Default</th>
12+
<th>Description</th>
13+
</thead>
14+
<tbody>
15+
<tr>
16+
<td>-d</td>
17+
<td>--dir</td>
18+
<td><i>Current Directory</i></td>
19+
<td>Where the directory and package.json is located</td>
20+
</tr>
21+
<tr>
22+
<td>-t</td>
23+
<td>--template</td>
24+
<td><i>See below</i></td>
25+
<td>Prettier config template located on your system</td>
26+
</tr>
27+
<tr>
28+
<td><i>None</i></td>
29+
<td>--typescript</td>
30+
<td><i>None</i></td>
31+
<td>If you want to use Typescript, it installs typescript if you didn't before and adds the default config</td>
32+
</tr>
33+
<tr>
34+
<td><i>None</i></td>
35+
<td>--typescript-template</td>
36+
<td><i>None</i></td>
37+
<td>Location of your tsconfig.json template, same as <code>--typescript</code> flag, just uses your custom template</td>
38+
</tr>
39+
</tbody>
40+
</table>
41+
42+
## Default Values
43+
44+
Prettier config:
45+
```json
46+
{
47+
"prettier": {
48+
"tabWidth": 4,
49+
"printWidth": 80,
50+
"semi": true,
51+
"quoteProps": "consistent",
52+
"bracketSpacing": true,
53+
"bracketSameLine": true,
54+
"singleQuote": true,
55+
"jsxSingleQuote": true,
56+
"jsxBracketSameLine": true,
57+
"arrowParens": "avoid"
58+
}
59+
}
60+
```
61+
62+
tsconfig.json
63+
```json
64+
{
65+
"compilerOptions": {
66+
"target": "es5",
67+
"lib": [
68+
"dom",
69+
"dom.iterable",
70+
"esnext"
71+
],
72+
"allowJs": true,
73+
"skipLibCheck": true,
74+
"esModuleInterop": true,
75+
"allowSyntheticDefaultImports": true,
76+
"strict": true,
77+
"forceConsistentCasingInFileNames": true,
78+
"noFallthroughCasesInSwitch": true,
79+
"module": "esnext",
80+
"moduleResolution": "node",
81+
"resolveJsonModule": true,
82+
"isolatedModules": true,
83+
"noEmit": true,
84+
"noImplicitAny": true,
85+
"noImplicitReturns": true,
86+
"jsx": "react-jsx"
87+
},
88+
"include": [
89+
"./src/"
90+
]
91+
}
92+
```

package-lock.json

Lines changed: 21 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,23 @@
99
"url": "https://github.com/C0RR1T/setup-cli/issues"
1010
},
1111
"description": "Inserts your prettier and tsconfig settings into your projects.",
12-
"readme": "/README.md",
13-
"version": "1.0.2",
12+
"keywords": [
13+
"prettier",
14+
"typescript",
15+
"setup",
16+
"cli"
17+
],
18+
"readme": "./README.md",
19+
"version": "2.0.0",
20+
"files": [
21+
"./README.md"
22+
],
1423
"main": "/index.js",
1524
"license": "MIT",
1625
"bin": "/index.js",
1726
"dependencies": {
18-
"argparse": "^2.0.1"
27+
"argparse": "^2.0.1",
28+
"prettier": "latest"
1929
},
2030
"prettier": {
2131
"tabWidth": 4,
@@ -28,5 +38,8 @@
2838
"jsxSingleQuote": true,
2939
"jsxBracketSameLine": true,
3040
"arrowParens": "avoid"
41+
},
42+
"devDependencies": {
43+
"typescript": "^4.4.3"
3144
}
3245
}

0 commit comments

Comments
 (0)