Skip to content

Commit a72b8cb

Browse files
author
Tiago Azevedo
committed
Initial commit
0 parents  commit a72b8cb

13 files changed

+140
-0
lines changed

.eslintignore

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

.eslintrc

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"parser": "babel-eslint",
3+
"env": {
4+
"node": true,
5+
"browser": true,
6+
"mocha": true
7+
},
8+
"rules": {
9+
"no-bitwise": 1,
10+
"camelcase": [2, { "properties": "never" }],
11+
"indent": [2, 2],
12+
"max-depth": [1, 4],
13+
"max-statements": [1, 15],
14+
"complexity": [1, 10],
15+
"quotes": 0,
16+
"strict": 0
17+
}
18+
}

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
npm-debug.log
2+
node_modules/
3+
lib/

README.md

Whitespace-only changes.

gulpfile.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require('babel/register');
2+
require('./tasks');

package.json

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "arch-nemesis",
3+
"version": "0.0.0",
4+
"description": "ES6 fork of Arch (React UI framework)",
5+
"main": "lib/index.js",
6+
"scripts": {
7+
"test": "./node_modules/.bin/gulp test"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "http://github.com/tabazevedo/arch-nemesis"
12+
},
13+
"keywords": [
14+
"arch",
15+
"arch-nemesis",
16+
"immutable",
17+
"react"
18+
],
19+
"author": "Tiago Azevedo",
20+
"license": "ISC",
21+
"bugs": {
22+
"url": "https://github.com/tabazevedo/arch-nemesis/issues"
23+
},
24+
"homepage": "https://github.com/tabazevedo/arch-nemesis",
25+
"devDependencies": {
26+
"babel": "^5.4.3",
27+
"babel-eslint": "^3.1.7",
28+
"chai": "^2.3.0",
29+
"eslint": "^0.21.2",
30+
"find": "^0.2.2",
31+
"gulp": "^3.8.11",
32+
"gulp-babel": "^5.1.0",
33+
"gulp-eslint": "^0.12.0",
34+
"gulp-load-plugins": "^0.10.0",
35+
"gulp-mocha": "^2.0.1",
36+
"gulp-util": "^3.0.4"
37+
},
38+
"dependencies": {}
39+
}

spec/unit/index.t.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import core from '../../src/index.js';
2+
import {assert} from 'chai';
3+
4+
describe('Core', () => {
5+
it('returns true', () => {
6+
assert(core());
7+
});
8+
});

src/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function() {
2+
return true;
3+
}

tasks/bundle.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
bundle.js
3+
gulp task for bundling src into lib
4+
*/
5+
6+
export default function Bundle(gulp, plugins) {
7+
gulp.task('bundle', () => {
8+
let {babel} = plugins;
9+
return gulp.src('src/**/*.js')
10+
.pipe(babel())
11+
.pipe(gulp.dest('lib'));
12+
});
13+
}

tasks/index.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import find from 'find';
2+
import gulp from 'gulp';
3+
import gulpLoadPlugins from 'gulp-load-plugins';
4+
import path from 'path';
5+
6+
const plugins = gulpLoadPlugins();
7+
8+
find
9+
.fileSync(/^(?!index\.js)/, __dirname)
10+
.map(file => `./${path.basename(file)}`)
11+
.map(file => require(file))
12+
.forEach(task => {
13+
task(gulp, plugins);
14+
});
15+
16+
gulp.task('default', ['test', 'bundle']);

tasks/lint.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
lint.js
3+
gulp task for running eslint
4+
*/
5+
6+
export default function Lint(gulp, plugins) {
7+
gulp.task('lint', () => {
8+
let {eslint} = plugins;
9+
return gulp.src('.')
10+
.pipe(eslint());
11+
});
12+
}

tasks/test.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
test.js
3+
gulp task for running unit tests
4+
*/
5+
6+
export default function Test(gulp, plugins) {
7+
gulp.task('test', () => {
8+
let {mocha} = plugins;
9+
return gulp.src('spec/unit/**/*.js')
10+
.pipe(mocha());
11+
});
12+
}

tasks/watch.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
watch.js
3+
gulp task for watching in development
4+
*/
5+
6+
export default function Watch(gulp, plugins) {
7+
gulp.task('watch', () => {
8+
gulp.watch('src/**/*.js', 'bundle');
9+
gulp.watch('**/*.js', 'lint');
10+
gulp.watch('spec/**/*.t.js', 'test');
11+
});
12+
}

0 commit comments

Comments
 (0)