-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: UI Kit 빌드 세팅 완료 * chore: remove unused config * chore: 리뷰내용반영
- Loading branch information
Showing
31 changed files
with
1,186 additions
and
895 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
extends: [ | ||
'plugin:react/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier/@typescript-eslint', | ||
'plugin:prettier/recommended', | ||
], | ||
rules: {}, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
src | ||
example | ||
.storybook | ||
.github | ||
config | ||
tasks | ||
.vscode | ||
.idea |
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 @@ | ||
10.15.0 |
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,3 @@ | ||
dist | ||
.github | ||
node_modules |
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,5 @@ | ||
{ | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
} |
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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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,72 @@ | ||
import path from 'path'; | ||
|
||
import autoprefixer from 'autoprefixer'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import postcss from 'rollup-plugin-postcss'; | ||
import typescript from 'rollup-plugin-typescript2'; | ||
// import babel from 'rollup-plugin-babel'; | ||
|
||
const extensions = ['.js', '.jsx', '.ts', '.tsx']; | ||
|
||
export default [ | ||
buildCJS('src/components/index.ts'), | ||
buildESM('src/components/index.ts'), | ||
buildCSS('src/components/index.scss', 'css/lubycon-ui-kit.css'), | ||
buildCSS('src/components/index.scss', 'css/lubycon-ui-kit.min.css', { | ||
minimize: { | ||
preset: ['default'], | ||
}, | ||
}), | ||
]; | ||
|
||
function buildJS(input, output, format) { | ||
return { | ||
input, | ||
external: ['react', 'react-dom'], | ||
output: [{ file: output, format, sourcemap: true }], | ||
plugins: [ | ||
typescript({ | ||
tsconfig: 'tsconfig.json', | ||
}), | ||
// babel({ | ||
// extensions, | ||
// runtimeHelpers: true, | ||
// include: ['src/**'], | ||
// }), | ||
resolve({ extensions }), | ||
commonjs({ | ||
namedExports: { | ||
'prop-types': ['node', 'bool', 'string', 'any', 'arrayOf', 'oneOfType', 'object', 'func'], | ||
}, | ||
}), | ||
], | ||
}; | ||
} | ||
|
||
function buildCJS(input) { | ||
const filename = path.parse(input).name; | ||
|
||
return buildJS(input, `dist/${filename}.js`, 'cjs'); | ||
} | ||
|
||
function buildESM(input) { | ||
const filename = path.parse(input).name; | ||
return buildJS(input, `dist/esm/${filename}.js`, 'es'); | ||
} | ||
|
||
function buildCSS(inputFile, outputFile, postCSSOptions = {}) { | ||
return { | ||
input: inputFile, | ||
output: { file: `dist/${outputFile}`, format: 'cjs' }, // format is not used. | ||
plugins: [ | ||
postcss({ | ||
plugins: [autoprefixer], | ||
sourceMap: true, | ||
extract: true, | ||
extensions: ['.scss', '.css'], | ||
...postCSSOptions, | ||
}), | ||
], | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
import React, { HTMLAttributes } from 'react'; | ||
|
||
export default function Button(props: HTMLAttributes<HTMLButtonElement>): JSX.Element { | ||
return <button className="button" {...props} />; | ||
} |
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,3 @@ | ||
.button { | ||
outline: 0; | ||
} |
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 @@ | ||
@import './Button/style.scss'; |
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 @@ | ||
export { default as Button } from './Button'; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.