-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from MKAbuMattar/dev-ts
Dev ts
- Loading branch information
Showing
2,869 changed files
with
56,626 additions
and
78,854 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": "defaults" | ||
} | ||
], | ||
"@babel/preset-react" | ||
"@babel/preset-env", | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,4 @@ | ||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials" | ||
] | ||
} | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const testFolder = './src/icons' | ||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
let name | ||
let componentName | ||
let fileName | ||
let obj = {} | ||
const data = [] | ||
|
||
fs.readdirSync(testFolder).forEach((file) => { | ||
name = file | ||
.replace(/([A-Z])/g, ' $1') | ||
.trim() | ||
.replace('.tsx', '') | ||
componentName = file.replace('.tsx', '') | ||
fileName = `devicons-react/icons/${file.replace('.tsx', '')}` | ||
obj = { name: name, componentName: componentName, fileName: fileName } | ||
data.push(obj) | ||
}) | ||
|
||
fs.writeFileSync(path.resolve(__dirname, 'tmp.data.json'), JSON.stringify(data)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* eslint-disable import/prefer-default-export */ | ||
const fs = require('fs') | ||
|
||
export const getFiles = (entry, extensions = [], excludeExtensions = []) => { | ||
let fileNames = [] | ||
const dirs = fs.readdirSync(entry) | ||
|
||
dirs.forEach((dir) => { | ||
const path = `${entry}/${dir}` | ||
|
||
if (fs.lstatSync(path).isDirectory()) { | ||
fileNames = [...fileNames, ...getFiles(path, extensions, excludeExtensions)] | ||
|
||
return | ||
} | ||
|
||
if ( | ||
!excludeExtensions.some((exclude) => dir.endsWith(exclude)) && | ||
extensions.some((ext) => dir.endsWith(ext)) | ||
) { | ||
fileNames.push(path) | ||
} | ||
}) | ||
|
||
return fileNames | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
25a932d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: