-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f96bfdd
Showing
12 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"presets": ["env"], | ||
"env": { | ||
"test": { | ||
"plugins": ["istanbul"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/node_modules/ | ||
/coverage/ | ||
/lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
extends: 'google', | ||
env: { | ||
node: true, | ||
es6: true | ||
}, | ||
rules: { | ||
'no-unused-vars': [2, {'args': 'after-used', 'argsIgnorePattern': '^_', 'varsIgnorePattern': '^_'}], | ||
'require-jsdoc': 0 | ||
}, | ||
parserOptions: { | ||
sourceType: 'module' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/npm-debug.log | ||
/node_modules/ | ||
/coverage/ | ||
/.nyc_output/ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"check-coverage": true, | ||
"lines": 100, | ||
"statements": 100, | ||
"functions": 100, | ||
"branches": 100, | ||
"reporter": [ | ||
"lcov", | ||
"text" | ||
], | ||
"require": [ | ||
"babel-register" | ||
], | ||
"sourceMap": false, | ||
"instrument": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
language: node_js | ||
node_js: | ||
- '5' | ||
- '6' | ||
- 'stable' | ||
script: npm run ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# firegen | ||
|
||
[![Build Status](https://travis-ci.org/pghalliday/firegen.svg?branch=master)](https://travis-ci.org/pghalliday/firegen) | ||
[![Coverage Status](https://coveralls.io/repos/github/pghalliday/firegen/badge.svg?branch=master)](https://coveralls.io/github/pghalliday/firegen?branch=master) | ||
|
||
Generate database rules and JavaScript APIs for Firebase projects | ||
|
||
## npm scripts | ||
|
||
- `npm test` - lint and test | ||
- `npm run build` - run tests then build | ||
- `npm run watch` - watch for changes and run build | ||
- `npm run ci` - run build and submit coverage to coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
|
||
exports.default = function () { | ||
return 'hello world'; | ||
}; | ||
|
||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "firegen", | ||
"version": "1.0.0", | ||
"description": "Generate database rules and JavaScript APIs for Firebase projects", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"cmd:lint": "eslint .", | ||
"cmd:test": "cross-env NODE_ENV=test nyc mocha", | ||
"cmd:build": "babel src --out-dir lib", | ||
"cmd:coveralls": "cat ./coverage/lcov.info | coveralls", | ||
"test": "run-s cmd:lint cmd:test", | ||
"build": "run-s test cmd:build", | ||
"ci": "run-s build cmd:coveralls", | ||
"watch": "chokidar '+(src|test)/**/*' -c 'npm run -s build'" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/pghalliday/firegen.git" | ||
}, | ||
"keywords": [], | ||
"author": "Peter Halliday <pghalliday@gmail.com> (http://pghalliday.com)", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/pghalliday/firegen/issues" | ||
}, | ||
"homepage": "https://github.com/pghalliday/firegen#readme", | ||
"devDependencies": { | ||
"babel-cli": "^6.22.2", | ||
"babel-plugin-istanbul": "^3.1.2", | ||
"babel-preset-env": "^1.1.8", | ||
"chai": "^3.5.0", | ||
"chokidar-cli": "^1.2.0", | ||
"coveralls": "^2.11.15", | ||
"cross-env": "^3.1.4", | ||
"eslint": "^3.14.1", | ||
"eslint-config-google": "^0.7.1", | ||
"mocha": "^3.2.0", | ||
"npm-run-all": "^4.0.1", | ||
"nyc": "^10.1.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function() { | ||
return 'hello world'; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--recursive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import test from '../../src/index.js'; | ||
import chai from 'chai'; | ||
|
||
chai.should(); | ||
|
||
describe('test', () => { | ||
it('should pass', () => { | ||
test().should.eql('hello world'); | ||
}); | ||
}); |