Skip to content

Commit

Permalink
Start removing TS
Browse files Browse the repository at this point in the history
  • Loading branch information
nolledgeable committed Feb 17, 2022
1 parent a698639 commit f891b8a
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 125 deletions.
7 changes: 6 additions & 1 deletion packages/ui-library/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import "../src/elements/style.css";

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
actions: {
disable: true,
argTypesRegex: "^on[A-Z].*",
},
controls: {
disable: true,
matchers: {
Expand All @@ -10,3 +13,5 @@ export const parameters = {
},
},
};

// TODO: disable all addons here by default and enable manually?
16 changes: 7 additions & 9 deletions packages/ui-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
"version": "0.0.0",
"description": "Yoast UI library",
"main": "dist/index.js",
"author": "nolledgeable <nollegroen@gmail.com>",
"author": "Team Yoast <support@yoast.com>",
"license": "MIT",
"private": true,
"sideEffects": false,
"scripts": {
"clean:build": "rm -rf build",
"build:ts": "tsc",
"build:js": "babel src --out-dir dist --ignore \"src/**/*.stories.@(js|jsx|ts|tsx)\",\"src/**/stories.@(js|jsx|ts|tsx)\"",
"build:css": "postcss src/components/style.css --dir build",
"build": "yarn clean:build && yarn build:ts && yarn build:css",
"build:storybook": "build-storybook",
"storybook": "start-storybook -p 6006"
},
"devDependencies": {
"@babel/cli": "^7.17.3",
"@babel/core": "^7.15.5",
"@babel/parser": "^7.16.8",
"@storybook/addon-a11y": "^6.4.14",
Expand All @@ -25,12 +26,6 @@
"@storybook/addons": "^6.3.9",
"@storybook/react": "^6.3.8",
"@storybook/theming": "^6.3.9",
"@tsconfig/recommended": "^1.0.1",
"@types/classnames": "^2.3.1",
"@types/react": "^17.0.26",
"@types/react-dom": "^17.0.9",
"@typescript-eslint/eslint-plugin": "^4.31.2",
"@typescript-eslint/parser": "^4.31.2",
"@whitespace/storybook-addon-html": "^5.0.0",
"autoprefixer": "^10.4.2",
"babel-loader": "^8.2.2",
Expand All @@ -42,12 +37,15 @@
"postcss-cli": "^9.0.0",
"postcss-import": "^14.0.2",
"tailwindcss": "^3.0.15",
"typescript": "^4.4.3"
"@yoast/babel-preset": "link:packages/babel-preset"
},
"dependencies": {
"@heroicons/react": "^1.0.5",
"classnames": "^2.3.1",
"lodash": "^4.17.21",
"prop-types": "^15.8.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}

1 change: 1 addition & 0 deletions packages/ui-library/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
plugins: [
require( "postcss-import" ),
require( "tailwindcss" ),
require( "tailwindcss/nesting" ),
require( "autoprefixer" ),
...( process.env.NODE_ENV === "production" ? [ require( "cssnano" ) ] : [] )
],
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-library/src/elements/Button/stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Button from ".";


export default {
title: "Elements/Forms/Button",
title: "Elements/Button",
component: Button,
argTypes: {
children: { control: "text" },
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-library/src/theme/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// TODO: Move this to Tailwind preset package.
module.exports = {
fontSize: {
fontSizes: {
"xxs": "0.6rem",
"xs": ".75rem",
"sm": ".8125rem", // 13px instead of 14pxx
Expand Down
3 changes: 2 additions & 1 deletion packages/ui-library/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
const theme = require( "./src/theme" );

module.exports = {
content: [ "./src/**/*.tsx" ],
content: [ "./src/**/*.js" ],
theme: {
extend: {
fontSizes: theme.fontSizes,
colors: theme.colors
},
},
Expand Down
112 changes: 0 additions & 112 deletions packages/ui-library/tsconfig.json

This file was deleted.

0 comments on commit f891b8a

Please sign in to comment.