1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-14 09:05:08 +01:00
Onion is the web client for ascribe
Go to file
2015-06-09 13:38:01 +02:00
fonts separat fonts and images 2015-05-29 11:57:24 +02:00
js resolve merge conflict 2015-06-09 13:38:01 +02:00
sass resolve merge conflict 2015-06-09 13:38:01 +02:00
.eslintignore finish integrating jest testing suite 2015-06-08 09:53:14 +02:00
.eslintrc add es6lint to build process and fix most (not really) errors and warnings 2015-06-05 11:06:36 +02:00
.gitignore Remove build from git, fix bugs in gulp and exclude variables.scss 2015-05-29 14:00:09 +02:00
gulpfile.js Merge branch 'AD-432-put-onion-online' 2015-06-08 18:00:17 +02:00
index.html resolve merge conflict 2015-06-09 13:38:01 +02:00
package.json Merge branch 'AD-432-put-onion-online' 2015-06-08 18:00:17 +02:00
README.md merge conflict 2015-06-08 13:47:24 +02:00
server.js Enable compression 2015-06-08 17:26:27 +02:00

Introduction

Onion is the web client for Ascribe. The idea is to have a well documented, easy to test, easy to hack, JavaScript application.

The code is JavaScript ECMA 6.

Getting started

Install some nice extensions for Chrom(e|ium): <<<<<<< HEAD

git clone git@bitbucket.org:ascribe/onion.git
cd onion
npm install
gulp serve

Code Conventions

For this project, we're using:

  • 4 Spaces
  • We use ES6
  • We don't use ES6's class declaration for React components because it does not support Mixins as well as Autobinding (Blog post about it)
  • We don't use camel case for file naming but in everything Javascript related
  • We use let instead of var: SA Post

Testing

We're using Facebook's jest to do testing as it integrates nicely with react.js as well.

Tests are always created per directory by creating a __tests__ folder. To test a specific file, a <file_name>_tests.js file needs to be created.

Since we're using mixed syntax, test files are not linted using ES6Lint. This is due to the fact that jest's function mocking and ES6 module syntax are fundamentally incompatible.

Therefore, to require a module in your test file, you need to use CommonJS's require syntax. Except for this, all tests can be written in ES6 syntax.

Workflow

Generally, when you're runing gulp serve, all tests are being run. If you want to test exclusively (without having the obnoxious ES6Linter warnings), you can just run gulp jest:watch.

Troubleshooting

Q: OMG nothing works

A: try npm install. Someone may have updated some dependencies

Reading list

Start here

Moar stuff