Skip to content

Commit

Permalink
initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Feb 25, 2016
0 parents commit 96def1c
Show file tree
Hide file tree
Showing 25 changed files with 897 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .babelrc
@@ -0,0 +1,8 @@
{
"presets": ["react", "es2015", "stage-0"],
"env": {
"development": {
"presets": ["react-hmre"]
}
}
}
3 changes: 3 additions & 0 deletions .eslintignore
@@ -0,0 +1,3 @@
**/node_modules/**
lib/**
scripts/**
9 changes: 9 additions & 0 deletions .eslintrc
@@ -0,0 +1,9 @@
{
"parser": "babel-eslint",
"plugins": [ "mocha" ],
"extends": "airbnb",
"rules": {
"max-len": 0,
"comma-dangle": 0
}
}
20 changes: 20 additions & 0 deletions .flowconfig
@@ -0,0 +1,20 @@
[ignore]
.*docs/node_modules.*
.*examples/node_modules.*
.*node_modules/babel.*
.*node_modules/fbjs.*

[include]
.*node_modules/react

[libs]
./interfaces/CSSModule.js

[options]
esproposal.class_static_fields=enable
module.name_mapper='.*\(.css\)' -> 'CSSModule'
module.system=haste
strip_root=true

[version]
0.21.0
15 changes: 15 additions & 0 deletions .gitignore
@@ -0,0 +1,15 @@
# Dependency directory
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules

# Browserify cache & build files
bundle.js
.bundle.js

# build
/lib/

# NPM debug
npm-debug.log
npm-debug.log*
11 changes: 11 additions & 0 deletions .jscsrc
@@ -0,0 +1,11 @@
{
"preset": "airbnb",
"validateQuoteMarks": null,
"maximumLineLength": false,
"excludeFiles": [
"coverage/**",
"node_modules/**",
"**/node_modules/**",
"lib/**"
]
}
17 changes: 17 additions & 0 deletions .npmignore
@@ -0,0 +1,17 @@
# Dependency directory
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules

# Browserify cache & build files
bundle.js
.bundle.js

# sources
/src/

# NPM debug
npm-debug.log

tests
docs
7 changes: 7 additions & 0 deletions .travis.yml
@@ -0,0 +1,7 @@
language: node_js
node_js:
- "5"
sudo: false
script:
- npm test
- npm run lint
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,5 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## To Be Released
7 changes: 7 additions & 0 deletions LICENSE
@@ -0,0 +1,7 @@
Copyright (c) 2016 Nikolaus Graf

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.
5 changes: 5 additions & 0 deletions README.md
@@ -0,0 +1,5 @@
# Unicorn Editor

## License

MIT
7 changes: 7 additions & 0 deletions interfaces/CSSModule.js
@@ -0,0 +1,7 @@
declare module CSSModule { // eslint-disable-line
declare var exports: { [key: string]: string };
}

declare module 'CSSModule' {
declare var exports: { [key: string]: string };
}
91 changes: 91 additions & 0 deletions package.json
@@ -0,0 +1,91 @@
{
"name": "unicorn-editor",
"version": "0.0.0",
"description": "Everything about Unicorns!",
"author": {
"name": "Nik Graf",
"email": "nik@nikgraf.com",
"url": "http://www.nikgraf.com"
},
"repository": {
"type": "git",
"url": "http://github.com/nikgraf/unicorn-editor.git"
},
"main": "lib/index.js",
"keywords": [
"unicorn",
"react",
"ux",
"components",
"widget",
"react-component"
],
"peerDependencies": {
"react": ">=0.14.0",
"react-dom": ">=0.14.0"
},
"scripts": {
"build": "BABEL_ENV=production ./node_modules/.bin/babel --out-dir='lib' --ignore='__tests__/*' src",
"prepublish": "npm run build",
"postpublish": "./scripts/publish_gh_pages.sh",
"test": "BABEL_ENV=test BABEL_JEST_STAGE=0 jest src/",
"test:watch": "npm run test -- --watch",
"lint": "npm run lint:eslint && npm run lint:jscs",
"lint:eslint": "eslint --rule 'mocha/no-exclusive-tests:2' ./",
"lint:eslint:fix": "eslint --fix --rule 'mocha/no-exclusive-tests:2' ./",
"lint:jscs": "jscs ./",
"lint:jscs:src": "jscs src",
"lint:jscs:examples": "jscs examples --max-old-space-size=4096",
"lint:jscs:docs": "jscs docs",
"alex": "alex README.md"
},
"devDependencies": {
"alex": "^2.0.1",
"babel-cli": "^6.5.1",
"babel-core": "^6.5.2",
"babel-eslint": "^5.0.0",
"babel-jest": "^6.0.1",
"babel-loader": "^6.2.3",
"babel-plugin-react-transform": "^2.0.0",
"babel-preset-es2015": "^6.5.0",
"babel-preset-react": "^6.5.0",
"babel-preset-react-hmre": "^1.1.0",
"babel-preset-stage-0": "^6.5.0",
"css-loader": "^0.23.1",
"eslint": "^2.2.0",
"eslint-config-airbnb": "6.0.2",
"eslint-plugin-mocha": "^2.0.0",
"eslint-plugin-react": "^4.1.0",
"jest-cli": "^0.8.2",
"jscs": "^2.10.1",
"react": "^0.14.7",
"react-addons-test-utils": "^0.14.7",
"react-dom": "^0.14.7",
"react-transform-catch-errors": "^1.0.2",
"react-transform-hmr": "^1.0.2",
"redbox-react": "^1.2.2",
"style-loader": "^0.13.0",
"webpack": "^1.12.14",
"webpack-dev-middleware": "^1.5.1",
"webpack-hot-middleware": "^2.7.1"
},
"jest": {
"testRunner": "<rootDir>/node_modules/jest-cli/src/testRunners/jasmine/jasmine2.js",
"unmockedModulePathPatterns": [
"<rootDir>/node_modules/react",
"<rootDir>/node_modules/fbjs",
"<rootDir>/node_modules/react-dom",
"<rootDir>/node_modules/react-addons-test-utils",
"../utils/helpers",
"../utils/union-class-names",
"../utils/is-component-of-type"
],
"scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
"preprocessCachingDisabled": true
},
"license": "MIT",
"dependencies": {
"classnames": "^2.2.3",
"extract-text-webpack-plugin": "^1.0.1"
}
}
18 changes: 18 additions & 0 deletions scripts/publish_gh_pages.sh
@@ -0,0 +1,18 @@
git checkout master
git checkout -b tmp-gh-pages
rm .gitignore

cd site
npm prune
npm install
npm run build

git add static/bundle.js
git add css/googlecode.css
git commit -am 'add files'
cd ..
git subtree split --prefix site -b gh-pages
git push -f origin gh-pages:gh-pages
git checkout master
git branch -D tmp-gh-pages
git branch -D gh-pages
18 changes: 18 additions & 0 deletions site/README.md
@@ -0,0 +1,18 @@
Unicorn Editor Site
================

## Install

```
npm install
```

Make sure you ran `npm install` in the root folder of site.

## Run

```
npm start
```

The app will run with hot reloading on `http://localhost:3000`.

0 comments on commit 96def1c

Please sign in to comment.