-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
17,581 additions
and
268 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,32 @@ | ||
name: CI | ||
on: [push] | ||
jobs: | ||
build: | ||
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node: ['10.x', '12.x', '14.x'] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node ${{ matrix.node }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install deps and build (with cache) | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Test | ||
run: yarn test --ci --coverage --maxWorkers=2 | ||
|
||
- name: Build | ||
run: yarn build |
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,12 @@ | ||
name: size | ||
on: [pull_request] | ||
jobs: | ||
size: | ||
runs-on: ubuntu-latest | ||
env: | ||
CI_JOB_NUMBER: 1 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: andresz1/size-limit-action@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
/coverage | ||
/demo/dist | ||
/es | ||
/lib | ||
/node_modules | ||
/umd | ||
npm-debug.log* | ||
*.log | ||
.DS_Store | ||
node_modules | ||
.cache | ||
dist | ||
.vscode |
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
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 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,3 @@ | ||
node_modules | ||
.cache | ||
dist |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[ | ||
export default [ | ||
{ | ||
"columns": 1 | ||
}, | ||
|
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,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
<title>Playground</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<script src="./index.tsx"></script> | ||
</body> | ||
</html> |
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,42 @@ | ||
import 'react-app-polyfill/ie11'; | ||
import * as React from 'react'; | ||
import * as ReactDOM from 'react-dom'; | ||
import { Flex, Item } from '../.' | ||
import myList from './example' | ||
|
||
const App = () => ( | ||
<div | ||
style={{ | ||
maxWidth: 960, | ||
margin: "0 auto" | ||
}} | ||
> | ||
<h1>Example</h1> | ||
<Flex col={4}> | ||
{myList.map(({ columns }, i: number) => ( | ||
<Item | ||
key={i} | ||
col={columns} | ||
colTablet={6} | ||
colMobile={12} | ||
gap={1} | ||
marginBottom={30} | ||
stretch | ||
> | ||
<div | ||
style={{ | ||
textAlign: "center", | ||
width: "100%", | ||
border: "1px solid #eee", | ||
background: "#eee" | ||
}} | ||
> | ||
<h1>{columns}</h1> | ||
</div> | ||
</Item> | ||
))} | ||
</Flex> | ||
</div> | ||
) | ||
|
||
ReactDOM.render(<App />, document.getElementById('root')); |
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,24 @@ | ||
{ | ||
"name": "example", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"start": "parcel index.html", | ||
"build": "parcel build index.html" | ||
}, | ||
"dependencies": { | ||
"react-app-polyfill": "^1.0.0" | ||
}, | ||
"alias": { | ||
"react": "../node_modules/react", | ||
"react-dom": "../node_modules/react-dom/profiling", | ||
"scheduler/tracing": "../node_modules/scheduler/tracing-profiling" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^16.9.11", | ||
"@types/react-dom": "^16.8.4", | ||
"parcel": "^1.12.3", | ||
"typescript": "^3.4.5" | ||
} | ||
} |
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,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": false, | ||
"target": "es5", | ||
"module": "commonjs", | ||
"jsx": "react", | ||
"moduleResolution": "node", | ||
"noImplicitAny": false, | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"removeComments": true, | ||
"strictNullChecks": true, | ||
"preserveConstEnums": true, | ||
"sourceMap": true, | ||
"lib": ["es2015", "es2016", "dom"], | ||
"types": ["node"], | ||
"resolveJsonModule": true, | ||
"esModuleInterop": true | ||
} | ||
} |
Oops, something went wrong.