Skip to content

Commit 96def1c

Browse files
committed
initial setup
0 parents  commit 96def1c

25 files changed

+897
-0
lines changed

.babelrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"presets": ["react", "es2015", "stage-0"],
3+
"env": {
4+
"development": {
5+
"presets": ["react-hmre"]
6+
}
7+
}
8+
}

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/node_modules/**
2+
lib/**
3+
scripts/**

.eslintrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"parser": "babel-eslint",
3+
"plugins": [ "mocha" ],
4+
"extends": "airbnb",
5+
"rules": {
6+
"max-len": 0,
7+
"comma-dangle": 0
8+
}
9+
}

.flowconfig

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[ignore]
2+
.*docs/node_modules.*
3+
.*examples/node_modules.*
4+
.*node_modules/babel.*
5+
.*node_modules/fbjs.*
6+
7+
[include]
8+
.*node_modules/react
9+
10+
[libs]
11+
./interfaces/CSSModule.js
12+
13+
[options]
14+
esproposal.class_static_fields=enable
15+
module.name_mapper='.*\(.css\)' -> 'CSSModule'
16+
module.system=haste
17+
strip_root=true
18+
19+
[version]
20+
0.21.0

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Dependency directory
2+
# Commenting this out is preferred by some people, see
3+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
4+
node_modules
5+
6+
# Browserify cache & build files
7+
bundle.js
8+
.bundle.js
9+
10+
# build
11+
/lib/
12+
13+
# NPM debug
14+
npm-debug.log
15+
npm-debug.log*

.jscsrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"preset": "airbnb",
3+
"validateQuoteMarks": null,
4+
"maximumLineLength": false,
5+
"excludeFiles": [
6+
"coverage/**",
7+
"node_modules/**",
8+
"**/node_modules/**",
9+
"lib/**"
10+
]
11+
}

.npmignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Dependency directory
2+
# Commenting this out is preferred by some people, see
3+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
4+
node_modules
5+
6+
# Browserify cache & build files
7+
bundle.js
8+
.bundle.js
9+
10+
# sources
11+
/src/
12+
13+
# NPM debug
14+
npm-debug.log
15+
16+
tests
17+
docs

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: node_js
2+
node_js:
3+
- "5"
4+
sudo: false
5+
script:
6+
- npm test
7+
- npm run lint

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
This project adheres to [Semantic Versioning](http://semver.org/).
4+
5+
## To Be Released

LICENSE

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (c) 2016 Nikolaus Graf
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Unicorn Editor
2+
3+
## License
4+
5+
MIT

interfaces/CSSModule.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
declare module CSSModule { // eslint-disable-line
2+
declare var exports: { [key: string]: string };
3+
}
4+
5+
declare module 'CSSModule' {
6+
declare var exports: { [key: string]: string };
7+
}

package.json

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"name": "unicorn-editor",
3+
"version": "0.0.0",
4+
"description": "Everything about Unicorns!",
5+
"author": {
6+
"name": "Nik Graf",
7+
"email": "[email protected]",
8+
"url": "http://www.nikgraf.com"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "http://github.com/nikgraf/unicorn-editor.git"
13+
},
14+
"main": "lib/index.js",
15+
"keywords": [
16+
"unicorn",
17+
"react",
18+
"ux",
19+
"components",
20+
"widget",
21+
"react-component"
22+
],
23+
"peerDependencies": {
24+
"react": ">=0.14.0",
25+
"react-dom": ">=0.14.0"
26+
},
27+
"scripts": {
28+
"build": "BABEL_ENV=production ./node_modules/.bin/babel --out-dir='lib' --ignore='__tests__/*' src",
29+
"prepublish": "npm run build",
30+
"postpublish": "./scripts/publish_gh_pages.sh",
31+
"test": "BABEL_ENV=test BABEL_JEST_STAGE=0 jest src/",
32+
"test:watch": "npm run test -- --watch",
33+
"lint": "npm run lint:eslint && npm run lint:jscs",
34+
"lint:eslint": "eslint --rule 'mocha/no-exclusive-tests:2' ./",
35+
"lint:eslint:fix": "eslint --fix --rule 'mocha/no-exclusive-tests:2' ./",
36+
"lint:jscs": "jscs ./",
37+
"lint:jscs:src": "jscs src",
38+
"lint:jscs:examples": "jscs examples --max-old-space-size=4096",
39+
"lint:jscs:docs": "jscs docs",
40+
"alex": "alex README.md"
41+
},
42+
"devDependencies": {
43+
"alex": "^2.0.1",
44+
"babel-cli": "^6.5.1",
45+
"babel-core": "^6.5.2",
46+
"babel-eslint": "^5.0.0",
47+
"babel-jest": "^6.0.1",
48+
"babel-loader": "^6.2.3",
49+
"babel-plugin-react-transform": "^2.0.0",
50+
"babel-preset-es2015": "^6.5.0",
51+
"babel-preset-react": "^6.5.0",
52+
"babel-preset-react-hmre": "^1.1.0",
53+
"babel-preset-stage-0": "^6.5.0",
54+
"css-loader": "^0.23.1",
55+
"eslint": "^2.2.0",
56+
"eslint-config-airbnb": "6.0.2",
57+
"eslint-plugin-mocha": "^2.0.0",
58+
"eslint-plugin-react": "^4.1.0",
59+
"jest-cli": "^0.8.2",
60+
"jscs": "^2.10.1",
61+
"react": "^0.14.7",
62+
"react-addons-test-utils": "^0.14.7",
63+
"react-dom": "^0.14.7",
64+
"react-transform-catch-errors": "^1.0.2",
65+
"react-transform-hmr": "^1.0.2",
66+
"redbox-react": "^1.2.2",
67+
"style-loader": "^0.13.0",
68+
"webpack": "^1.12.14",
69+
"webpack-dev-middleware": "^1.5.1",
70+
"webpack-hot-middleware": "^2.7.1"
71+
},
72+
"jest": {
73+
"testRunner": "<rootDir>/node_modules/jest-cli/src/testRunners/jasmine/jasmine2.js",
74+
"unmockedModulePathPatterns": [
75+
"<rootDir>/node_modules/react",
76+
"<rootDir>/node_modules/fbjs",
77+
"<rootDir>/node_modules/react-dom",
78+
"<rootDir>/node_modules/react-addons-test-utils",
79+
"../utils/helpers",
80+
"../utils/union-class-names",
81+
"../utils/is-component-of-type"
82+
],
83+
"scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
84+
"preprocessCachingDisabled": true
85+
},
86+
"license": "MIT",
87+
"dependencies": {
88+
"classnames": "^2.2.3",
89+
"extract-text-webpack-plugin": "^1.0.1"
90+
}
91+
}

scripts/publish_gh_pages.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
git checkout master
2+
git checkout -b tmp-gh-pages
3+
rm .gitignore
4+
5+
cd site
6+
npm prune
7+
npm install
8+
npm run build
9+
10+
git add static/bundle.js
11+
git add css/googlecode.css
12+
git commit -am 'add files'
13+
cd ..
14+
git subtree split --prefix site -b gh-pages
15+
git push -f origin gh-pages:gh-pages
16+
git checkout master
17+
git branch -D tmp-gh-pages
18+
git branch -D gh-pages

site/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Unicorn Editor Site
2+
================
3+
4+
## Install
5+
6+
```
7+
npm install
8+
```
9+
10+
Make sure you ran `npm install` in the root folder of site.
11+
12+
## Run
13+
14+
```
15+
npm start
16+
```
17+
18+
The app will run with hot reloading on `http://localhost:3000`.

0 commit comments

Comments
 (0)