Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e2a68c7

Browse files
committed
basic talwind samples added
1 parent 962ea95 commit e2a68c7

File tree

9 files changed

+72387
-47
lines changed

9 files changed

+72387
-47
lines changed

config/webpack.base.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = function({ plugins }) {
2828
},
2929
{
3030
test: /\.css$/i,
31-
use: ['style-loader', 'css-loader'],
31+
use: ['style-loader', 'css-loader', 'postcss-loader'],
3232
},
3333
{
3434
test: /\.(png|jpe?g|gif)$/i,

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { Suspense } from 'react';
22
import ReactDOM from 'react-dom';
33
import Loader from 'uielements/loader/loader.component';
4+
45
const App = React.lazy(() => import('./src/app'));
56

67
const Index = () => (

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
"description": "Simple react boilerplate with support for travis ci, webpack, sass etc.",
55
"main": "index.js",
66
"scripts": {
7-
"build": "webpack ---config ./config/webpack.prod.config.js",
8-
"dev": "webpack-dev-server --config ./config/webpack.dev.config.js --open",
7+
"build": "npm run build:css && webpack ---config ./config/webpack.prod.config.js",
8+
"dev": "npm run watch:css && webpack-dev-server --config ./config/webpack.dev.config.js --open",
99
"lint": "./node_modules/.bin/eslint --ext .js,.jsx src/",
10+
"build:css": "postcss src/styles.css -o src/main.css",
11+
"watch:css": "postcss src/styles.css -o src/main.css",
1012
"test": "jest --collect-coverage",
1113
"test:watch": "jest --watch"
1214
},
@@ -51,6 +53,7 @@
5153
"jest": "^25.3.0",
5254
"mini-css-extract-plugin": "^0.9.0",
5355
"node-sass": "^4.13.1",
56+
"postcss-loader": "^3.0.0",
5457
"sass-loader": "^8.0.2",
5558
"style-loader": "^1.1.3",
5659
"webpack-bundle-analyzer": "^3.6.1",

src/app.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import React from 'react';
22
import logo from './logo.png';
3+
import Button from 'uielements/button/button.component';
34
import './app.scss';
5+
import './main.css';
46

57
export default function App() {
68
return (
7-
<div className="App--Container">
8-
<p className="App--Title">Welcome To React Boilerplate!</p>
9-
<img src={logo} alt="React Logo" className="App--Image" />
9+
<div className="bg-blue-900 flex flex-col justify-center items-center p-20">
10+
<p className="text-4xl text-blue-100">Welcom To React Boilerplate!</p>
11+
<img src={logo} className="app--image" />
12+
<Button buttonText="Get Started!" />
1013
</div>
1114
);
1215
}

src/app.scss

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,5 @@
1-
$bg-color: #282b33;
2-
$txt-color: white;
3-
$primary-color: #61dbfc;
4-
5-
body {
6-
margin: 0px;
1+
.app--image {
2+
height: 200px;
3+
animation: rotation 10s infinite linear;
4+
-webkit-animation:rotation 10s infinite linear;
75
}
8-
9-
.App--Container {
10-
display: flex;
11-
flex: 1;
12-
justify-content: center;
13-
align-items: center;
14-
flex-direction: column;
15-
background: $bg-color;
16-
color: $txt-color;
17-
padding: 0;
18-
margin: 0;
19-
color: $primary-color;
20-
21-
.App--Image {
22-
height: 200px;
23-
animation: rotation 10s infinite linear;
24-
-webkit-animation:rotation 10s infinite linear;
25-
}
26-
27-
.App--Title {
28-
font-size: 2rem;
29-
}
30-
}
31-
32-
@keyframes rotation {
33-
from {
34-
-webkit-transform:rotate(0deg);
35-
transform: rotate(0deg);
36-
}
37-
to {
38-
-webkit-transform:rotate(359deg);
39-
transform: rotate(359deg);
40-
}
41-
}
42-

0 commit comments

Comments
 (0)