Skip to content

Commit 972cd66

Browse files
committed
init
1 parent 6b535aa commit 972cd66

29 files changed

+701
-0
lines changed

.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"stage": 2,
3+
"loose": "all"
4+
}

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[Makefile]
13+
indent_style = tab
14+
15+
[*.md]
16+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
lib
2+
dist
3+
node_modules

.eslintrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": "airbnb",
3+
"env": {
4+
"browser": true,
5+
"node": true
6+
},
7+
"rules": {
8+
"comma-dangle": 0,
9+
"react/jsx-uses-react": 2,
10+
"react/jsx-uses-vars": 2,
11+
"react/react-in-jsx-scope": 2
12+
},
13+
"plugins": [
14+
"react"
15+
]
16+
}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lib
2+
dist
3+
node_modules
4+
*.log
5+
.DS_Store
6+
.idea

.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
examples
2+
node_modules
3+
*.log
4+
.DS_Store
5+
.idea

package.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"name": "react-inline-grid",
3+
"description": "Predictable flexbox based grid for React.",
4+
"main": "./lib/index.js",
5+
"version": "0.1.0",
6+
"scripts": {
7+
"clean": "rimraf lib dist",
8+
"lint": "eslint src",
9+
"build:lib": "babel src --out-dir lib",
10+
"build:umd": "webpack src/index.js dist/react-inline-grid.js --config webpack.config.development.js",
11+
"build:umd:min": "webpack src/index.js dist/react-inline-grid.min.js --config webpack.config.production.js",
12+
"build": "npm run build:lib && npm run build:umd && npm run build:umd:min",
13+
"prepublish": "npm run clean && npm run build",
14+
"test": "echo \"Error: no test specified\" && exit 1"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "git+https://github.com/broucz/react-inline-grid.git"
19+
},
20+
"keywords": [
21+
"react",
22+
"reactjs",
23+
"grid",
24+
"inline",
25+
"style",
26+
"flux",
27+
"redux",
28+
"immutable",
29+
"predictable"
30+
],
31+
"author": "Pierre Brouca <[email protected]> (https://github.com/broucz)",
32+
"license": "MIT",
33+
"bugs": {
34+
"url": "https://github.com/broucz/react-inline-grid/issues"
35+
},
36+
"homepage": "https://github.com/broucz/react-inline-grid",
37+
"dependencies": {
38+
"immutable": "^3.7.4",
39+
"react-redux": "^0.9.0",
40+
"redux": "^1.0.1"
41+
},
42+
"devDependencies": {
43+
"babel": "^5.8.21",
44+
"babel-core": "^5.8.22",
45+
"babel-eslint": "^4.0.10",
46+
"babel-loader": "^5.3.2",
47+
"eslint": "^1.2.0",
48+
"eslint-config-airbnb": "0.0.7",
49+
"eslint-plugin-react": "^3.2.3",
50+
"react-hot-loader": "^1.2.8",
51+
"rimraf": "^2.4.2",
52+
"webpack": "^1.11.0",
53+
"webpack-dev-server": "^1.10.1"
54+
}
55+
}

server.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var webpack = require('webpack');
2+
var WebpackDevServer = require('webpack-dev-server');
3+
var config = require('./webpack.config');
4+
5+
new WebpackDevServer(webpack(config), {
6+
publicPath: config.output.publicPath,
7+
hot: true
8+
}).listen(3000, 'localhost', function (err, result) {
9+
if (err) {
10+
console.log(err);
11+
}
12+
13+
console.log('Listening at localhost:3000');
14+
});

src/actions.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { UPDATE_CONTEXT_SCREEN } from './constants';
2+
3+
export function updateContextScreen(payload) {
4+
return {
5+
type: UPDATE_CONTEXT_SCREEN,
6+
payload
7+
};
8+
}

src/components/create.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import createGrid from './createGrid';
2+
import createSmart from './createSmart';
3+
import { ROW, CELL } from '../constants';
4+
5+
export function createProvider(...args) {
6+
return createGrid(...args);
7+
}
8+
9+
export function createComponent(...args) {
10+
const Row = createSmart(...args, ROW);
11+
const Cell = createSmart(...args, CELL);
12+
13+
return { Row, Cell };
14+
}

0 commit comments

Comments
 (0)