Skip to content

Commit

Permalink
Add tailwind and prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-tse committed Jul 8, 2020
1 parent fec634e commit 33f6a5f
Show file tree
Hide file tree
Showing 8 changed files with 567 additions and 49 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

compiled.css
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package-lock.json
package.json
src/css/compiled.css
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true,
"printWidth": 120,
"arrowParens": "avoid"
}
82 changes: 45 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,47 @@
{
"name": "framework-matcher",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@types/jest": "^24.0.0",
"@types/node": "^12.0.0",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1",
"typescript": "~3.7.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
"name": "framework-matcher",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@types/jest": "^24.0.0",
"@types/node": "^12.0.0",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"autoprefixer": "^9.8.4",
"cssnano": "^4.1.10",
"postcss-cli": "^7.1.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1",
"tailwindcss": "^1.4.6",
"typescript": "~3.7.2"
},
"scripts": {
"start": "npm run build:css && react-scripts start --no-cache",
"build": "npm run build:css && react-scripts build",
"build:css": "postcss build src/css/tailwind.css -o src/css/compiled.css",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"prettier": "^2.0.5"
}
}
7 changes: 7 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const tailwindcss = require('tailwindcss')
const autoprefixer = require('autoprefixer')
const cssnano = require('cssnano')

module.exports = {
plugins: [tailwindcss, autoprefixer, ...(process.env.NODE_ENV === 'production' ? [cssnano] : [])],
}
9 changes: 9 additions & 0 deletions src/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@tailwind base;

@tailwind components;

@tailwind utilities;

.is-flipped {
transform: rotateY(180deg);
}
8 changes: 8 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
purge: ['./src/**/*.tsx'],
theme: {
extend: {},
},
variants: {},
plugins: [],
}
Loading

0 comments on commit 33f6a5f

Please sign in to comment.