Skip to content

Commit 76ae0ee

Browse files
authored
Merge pull request #23 from JoshK2/move-to-typescript
Move to typescript
2 parents 8540b94 + 8573d01 commit 76ae0ee

38 files changed

+12214
-16105
lines changed

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.bitmap

Lines changed: 69 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,257 +1,269 @@
11
/* THIS IS A BIT-AUTO-GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. */
22

33
{
4-
"joshk.react-spinners-css/circle@1.2.1": {
4+
"joshk.react-spinners-css/circle@2.0.1": {
55
"files": [
66
{
7-
"relativePath": "src/components/Circle/index.js",
7+
"relativePath": "src/components/Circle/index.tsx",
88
"test": false,
9-
"name": "index.js"
9+
"name": "index.tsx"
1010
},
1111
{
1212
"relativePath": "src/components/Circle/style.module.css",
1313
"test": false,
1414
"name": "style.module.css"
1515
}
1616
],
17-
"mainFile": "src/components/Circle/index.js",
17+
"mainFile": "src/components/Circle/index.tsx",
1818
"trackDir": "src/components/Circle",
1919
"origin": "AUTHORED",
2020
"exported": true
2121
},
22-
"joshk.react-spinners-css/default@1.2.1": {
22+
"joshk.react-spinners-css/default@2.0.1": {
2323
"files": [
2424
{
25-
"relativePath": "src/components/Default/index.js",
25+
"relativePath": "src/components/Default/index.tsx",
2626
"test": false,
27-
"name": "index.js"
27+
"name": "index.tsx"
2828
},
2929
{
3030
"relativePath": "src/components/Default/style.module.css",
3131
"test": false,
3232
"name": "style.module.css"
3333
}
3434
],
35-
"mainFile": "src/components/Default/index.js",
35+
"mainFile": "src/components/Default/index.tsx",
3636
"trackDir": "src/components/Default",
3737
"origin": "AUTHORED",
3838
"exported": true
3939
},
40-
"joshk.react-spinners-css/dual-ring@1.2.1": {
40+
"joshk.react-spinners-css/dual-ring@2.0.1": {
4141
"files": [
4242
{
43-
"relativePath": "src/components/DualRing/index.js",
43+
"relativePath": "src/components/DualRing/index.tsx",
4444
"test": false,
45-
"name": "index.js"
45+
"name": "index.tsx"
4646
},
4747
{
4848
"relativePath": "src/components/DualRing/style.module.css",
4949
"test": false,
5050
"name": "style.module.css"
5151
}
5252
],
53-
"mainFile": "src/components/DualRing/index.js",
53+
"mainFile": "src/components/DualRing/index.tsx",
5454
"trackDir": "src/components/DualRing",
5555
"origin": "AUTHORED",
5656
"exported": true
5757
},
58-
"joshk.react-spinners-css/ellipsis@1.2.1": {
58+
"joshk.react-spinners-css/ellipsis@2.0.1": {
5959
"files": [
6060
{
61-
"relativePath": "src/components/Ellipsis/index.js",
61+
"relativePath": "src/components/Ellipsis/index.tsx",
6262
"test": false,
63-
"name": "index.js"
63+
"name": "index.tsx"
6464
},
6565
{
6666
"relativePath": "src/components/Ellipsis/style.module.css",
6767
"test": false,
6868
"name": "style.module.css"
6969
}
7070
],
71-
"mainFile": "src/components/Ellipsis/index.js",
71+
"mainFile": "src/components/Ellipsis/index.tsx",
7272
"trackDir": "src/components/Ellipsis",
7373
"origin": "AUTHORED",
7474
"exported": true
7575
},
76-
"joshk.react-spinners-css/facebook@1.2.1": {
76+
"joshk.react-spinners-css/facebook@2.0.1": {
7777
"files": [
7878
{
79-
"relativePath": "src/components/Facebook/index.js",
79+
"relativePath": "src/components/Facebook/index.tsx",
8080
"test": false,
81-
"name": "index.js"
81+
"name": "index.tsx"
8282
},
8383
{
8484
"relativePath": "src/components/Facebook/style.module.css",
8585
"test": false,
8686
"name": "style.module.css"
8787
}
8888
],
89-
"mainFile": "src/components/Facebook/index.js",
89+
"mainFile": "src/components/Facebook/index.tsx",
9090
"trackDir": "src/components/Facebook",
9191
"origin": "AUTHORED",
9292
"exported": true
9393
},
94-
"joshk.react-spinners-css/grid@1.2.1": {
94+
"joshk.react-spinners-css/grid@2.0.1": {
9595
"files": [
9696
{
97-
"relativePath": "src/components/Grid/index.js",
97+
"relativePath": "src/components/Grid/index.tsx",
9898
"test": false,
99-
"name": "index.js"
99+
"name": "index.tsx"
100100
},
101101
{
102102
"relativePath": "src/components/Grid/style.module.css",
103103
"test": false,
104104
"name": "style.module.css"
105105
}
106106
],
107-
"mainFile": "src/components/Grid/index.js",
107+
"mainFile": "src/components/Grid/index.tsx",
108108
"trackDir": "src/components/Grid",
109109
"origin": "AUTHORED",
110110
"exported": true
111111
},
112-
"joshk.react-spinners-css/heart@1.2.1": {
112+
"joshk.react-spinners-css/heart@2.0.1": {
113113
"files": [
114114
{
115-
"relativePath": "src/components/Heart/index.js",
115+
"relativePath": "src/components/Heart/index.tsx",
116116
"test": false,
117-
"name": "index.js"
117+
"name": "index.tsx"
118118
},
119119
{
120120
"relativePath": "src/components/Heart/style.module.css",
121121
"test": false,
122122
"name": "style.module.css"
123123
}
124124
],
125-
"mainFile": "src/components/Heart/index.js",
125+
"mainFile": "src/components/Heart/index.tsx",
126126
"trackDir": "src/components/Heart",
127127
"origin": "AUTHORED",
128128
"exported": true
129129
},
130-
"joshk.react-spinners-css/hourglass@1.2.1": {
130+
"joshk.react-spinners-css/hourglass@2.0.1": {
131131
"files": [
132132
{
133-
"relativePath": "src/components/Hourglass/index.js",
133+
"relativePath": "src/components/Hourglass/index.tsx",
134134
"test": false,
135-
"name": "index.js"
135+
"name": "index.tsx"
136136
},
137137
{
138138
"relativePath": "src/components/Hourglass/style.module.css",
139139
"test": false,
140140
"name": "style.module.css"
141141
}
142142
],
143-
"mainFile": "src/components/Hourglass/index.js",
143+
"mainFile": "src/components/Hourglass/index.tsx",
144144
"trackDir": "src/components/Hourglass",
145145
"origin": "AUTHORED",
146146
"exported": true
147147
},
148-
"joshk.react-spinners-css/orbitals@1.2.1": {
148+
"joshk.react-spinners-css/orbitals@2.0.1": {
149149
"files": [
150150
{
151-
"relativePath": "src/components/Orbitals/index.js",
151+
"relativePath": "src/components/Orbitals/index.tsx",
152152
"test": false,
153-
"name": "index.js"
153+
"name": "index.tsx"
154154
},
155155
{
156156
"relativePath": "src/components/Orbitals/style.module.css",
157157
"test": false,
158158
"name": "style.module.css"
159159
}
160160
],
161-
"mainFile": "src/components/Orbitals/index.js",
161+
"mainFile": "src/components/Orbitals/index.tsx",
162162
"trackDir": "src/components/Orbitals",
163163
"origin": "AUTHORED",
164164
"exported": true
165165
},
166-
"joshk.react-spinners-css/ouroboro@1.2.1": {
166+
"joshk.react-spinners-css/ouroboro@2.0.1": {
167167
"files": [
168168
{
169-
"relativePath": "src/components/Ouroboro/index.js",
169+
"relativePath": "src/components/Ouroboro/index.tsx",
170170
"test": false,
171-
"name": "index.js"
171+
"name": "index.tsx"
172172
},
173173
{
174174
"relativePath": "src/components/Ouroboro/style.module.css",
175175
"test": false,
176176
"name": "style.module.css"
177177
}
178178
],
179-
"mainFile": "src/components/Ouroboro/index.js",
179+
"mainFile": "src/components/Ouroboro/index.tsx",
180180
"trackDir": "src/components/Ouroboro",
181181
"origin": "AUTHORED",
182182
"exported": true
183183
},
184-
"joshk.react-spinners-css/ring@1.2.1": {
184+
"joshk.react-spinners-css/ring@2.0.1": {
185185
"files": [
186186
{
187-
"relativePath": "src/components/Ring/index.js",
187+
"relativePath": "src/components/Ring/index.tsx",
188188
"test": false,
189-
"name": "index.js"
189+
"name": "index.tsx"
190190
},
191191
{
192192
"relativePath": "src/components/Ring/style.module.css",
193193
"test": false,
194194
"name": "style.module.css"
195195
}
196196
],
197-
"mainFile": "src/components/Ring/index.js",
197+
"mainFile": "src/components/Ring/index.tsx",
198198
"trackDir": "src/components/Ring",
199199
"origin": "AUTHORED",
200200
"exported": true
201201
},
202-
"joshk.react-spinners-css/ripple@1.2.1": {
202+
"joshk.react-spinners-css/ripple@2.0.1": {
203203
"files": [
204204
{
205-
"relativePath": "src/components/Ripple/index.js",
205+
"relativePath": "src/components/Ripple/index.tsx",
206206
"test": false,
207-
"name": "index.js"
207+
"name": "index.tsx"
208208
},
209209
{
210210
"relativePath": "src/components/Ripple/style.module.css",
211211
"test": false,
212212
"name": "style.module.css"
213213
}
214214
],
215-
"mainFile": "src/components/Ripple/index.js",
215+
"mainFile": "src/components/Ripple/index.tsx",
216216
"trackDir": "src/components/Ripple",
217217
"origin": "AUTHORED",
218218
"exported": true
219219
},
220-
"joshk.react-spinners-css/roller@1.2.1": {
220+
"joshk.react-spinners-css/roller@2.0.1": {
221221
"files": [
222222
{
223-
"relativePath": "src/components/Roller/index.js",
223+
"relativePath": "src/components/Roller/index.tsx",
224224
"test": false,
225-
"name": "index.js"
225+
"name": "index.tsx"
226226
},
227227
{
228228
"relativePath": "src/components/Roller/style.module.css",
229229
"test": false,
230230
"name": "style.module.css"
231231
}
232232
],
233-
"mainFile": "src/components/Roller/index.js",
233+
"mainFile": "src/components/Roller/index.tsx",
234234
"trackDir": "src/components/Roller",
235235
"origin": "AUTHORED",
236236
"exported": true
237237
},
238-
"joshk.react-spinners-css/spinner@1.2.1": {
238+
"joshk.react-spinners-css/spinner@2.0.1": {
239239
"files": [
240240
{
241-
"relativePath": "src/components/Spinner/index.js",
241+
"relativePath": "src/components/Spinner/index.tsx",
242242
"test": false,
243-
"name": "index.js"
243+
"name": "index.tsx"
244244
},
245245
{
246246
"relativePath": "src/components/Spinner/style.module.css",
247247
"test": false,
248248
"name": "style.module.css"
249249
}
250250
],
251-
"mainFile": "src/components/Spinner/index.js",
251+
"mainFile": "src/components/Spinner/index.tsx",
252252
"trackDir": "src/components/Spinner",
253253
"origin": "AUTHORED",
254254
"exported": true
255255
},
256-
"version": "14.7.6"
256+
257+
"files": [
258+
{
259+
"relativePath": "src/components/types.ts",
260+
"test": false,
261+
"name": "types.ts"
262+
}
263+
],
264+
"mainFile": "src/components/types.ts",
265+
"origin": "AUTHORED",
266+
"exported": false
267+
},
268+
"version": "14.8.8"
257269
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# production
1313
/build
1414
/dist
15+
/lib
1516
.env
1617

1718
# misc

.npmrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

copyfiles.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const { readdirSync, readFileSync, writeFileSync } = require('fs')
2+
3+
const COMPONENTS_DIR = 'src/components'
4+
5+
const getDirectories = (source) =>
6+
readdirSync(source, { withFileTypes: true })
7+
.filter((dirent) => dirent.isDirectory())
8+
.map((dirent) => dirent.name)
9+
10+
getDirectories(COMPONENTS_DIR).forEach((dir) => {
11+
const styleFile = readFileSync(`${COMPONENTS_DIR}/${dir}/style.module.css`, 'utf8')
12+
writeFileSync(`lib/cjs/${dir}/style.module.css`, styleFile)
13+
writeFileSync(`lib/esm/${dir}/style.module.css`, styleFile)
14+
})
15+
16+
console.log('copied all styles files')

0 commit comments

Comments
 (0)