Skip to content

Commit

Permalink
env: add babel and small refactorings
Browse files Browse the repository at this point in the history
Signed-off-by: dittrichlucas <[email protected]>
  • Loading branch information
dittrichlucas committed Nov 5, 2021
1 parent d82a32e commit a969afd
Show file tree
Hide file tree
Showing 4 changed files with 1,167 additions and 27 deletions.
16 changes: 16 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
"plugins": [
"@babel/plugin-transform-runtime",
"transform-class-properties"
],
"presets": [
"@babel/env",
"@babel/react",
"@babel/typescript"
],
"ignore": [
"./src/tests/**/*",
"./src/stories/**/*",
"./src/core/**/*.test.tsx"
]
}
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
{
"name": "adonimals-ui",
"version": "0.1.3",
"version": "0.1.4",
"description": "React UI toolkit for the web.",
"main": "dist/index.js",
"author": "<[email protected]>",
"license": "MIT",
"scripts": {
"build": "tsc",
"build:ts": "tsc",
"build:babel": "babel src --out-dir dist --extensions \".ts,.tsx\"",
"build": "yarn build:ts && yarn build:babel",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"lint": "eslint -c .eslintrc.json 'src/**/*.{ts,tsx}'",
"lint:fix": "eslint -c .eslintrc.json --fix 'src/**/*.{ts,tsx}'",
"test": "jest -c jest.config.js --watch"
},
"devDependencies": {
"@babel/core": "7.13.8",
"@babel/cli": "7.16.0",
"@babel/core": "7.16.0",
"@babel/plugin-transform-runtime": "7.16.0",
"@babel/preset-env": "7.16.0",
"@babel/preset-react": "7.16.0",
"@babel/preset-typescript": "7.16.0",
"@storybook/addon-actions": "6.3.8",
"@storybook/addon-essentials": "6.3.8",
"@storybook/addon-links": "6.3.8",
Expand All @@ -30,6 +37,8 @@
"@typescript-eslint/eslint-plugin": "4.31.1",
"@typescript-eslint/parser": "4.31.1",
"babel-loader": "8.2.2",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-imports": "2.0.0",
"eslint": "7.32.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-prefer-arrow": "1.2.3",
Expand Down
7 changes: 5 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"target": "es6",
"module": "commonjs",
"jsx": "react",
"declaration": true,
"sourceMap": true,
"sourceRoot": ".",
"outDir": "./dist",
Expand All @@ -15,7 +14,11 @@
"node",
"jest"
],
"esModuleInterop": true
"esModuleInterop": true,
"declaration": true,
"emitDeclarationOnly": true,
// Ensure that Babel can safely transpile files in the TypeScript project
"isolatedModules": true
},
"include": [
"./src/*",
Expand Down
Loading

0 comments on commit a969afd

Please sign in to comment.