-
Notifications
You must be signed in to change notification settings - Fork 929
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added gulp, Travis, a test framework, and made it Catapult-enabled
- Loading branch information
jwngr
committed
Jan 23, 2015
1 parent
ca970a1
commit 3add585
Showing
15 changed files
with
223 additions
and
214 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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
node_modules | ||
coverage/ | ||
node_modules/ | ||
|
||
.DS_Store | ||
.idea | ||
*.iml |
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,9 @@ | ||
language: node_js | ||
node_js: | ||
- '0.10' | ||
install: | ||
- npm install | ||
script: | ||
- npm run travis | ||
after_script: | ||
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Firebase | ||
|
||
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. |
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 |
---|---|---|
@@ -1,85 +1,43 @@ | ||
# firebase-tools | ||
|
||
[![Build Status](https://travis-ci.org/firebase/firebase-tools.svg?branch=master)](https://travis-ci.org/firebase/firebase-tools) | ||
[![Coverage Status](https://img.shields.io/coveralls/firebase/firebase-tools.svg)](https://coveralls.io/r/firebase/firebase-tools) | ||
[![NPM version](https://badge.fury.io/js/firebase-tools.svg)](http://badge.fury.io/js/firebase-tools) | ||
|
||
These are the Firebase Command Line (CLI) Tools. They can be used to: | ||
|
||
* Administer your Firebase account | ||
* Interact with [Firebase Hosting](https://www.firebase.com/hosting.html), our product to host your HTML, JS, CSS, images, etc. | ||
* Interact with [Firebase Hosting](https://www.firebase.com/hosting.html), our product to host your | ||
static HTML, JS, CSS, images, etc. | ||
|
||
To get started with the Firebase CLI, [read through our hosting quickstart guide](https://www.firebase.com/docs/hosting.html). | ||
|
||
|
||
## Installation | ||
|
||
To install the Firebase CLI, you first need to [sign up for a Firebase account](https://www.firebase.com/signup/). | ||
Then you need to install [Node.js](http://nodejs.org/) and [npm](https://npmjs.org/). | ||
Note that installing Node.js should install npm as well. | ||
|
||
Once npm is installed, get the Firebase CLI by running the following shell command: | ||
Then you need to install [Node.js](http://nodejs.org/) and [npm](https://npmjs.org/). Note that | ||
installing Node.js should install npm as well. | ||
|
||
Once npm is installed, get the Firebase CLI by running the following command: | ||
|
||
```shell | ||
```bash | ||
npm install -g firebase-tools | ||
``` | ||
|
||
This will provide you with the globally accessible `firebase` command. | ||
|
||
## Commands | ||
|
||
The command `firebase --help` lists the available commands and | ||
`firebase <command> --help` shows more details for an individual command. | ||
|
||
Here is the output of running `firebase --help`: | ||
|
||
```shell | ||
Usage: firebase <command> | ||
|
||
Available commands are: | ||
|
||
bootstrap | ||
Creates a new Firebase powered app from a prebuilt template to quickly | ||
get a project up and running. This creates a new folder and prompts | ||
you through all the required settings. | ||
|
||
deploy | ||
Deploys the current app to Firebase Hosting and creates your subdomain on | ||
firebaseapp.com if it doesn't exist already. | ||
|
||
init | ||
Initializes an existing Firebase app in the current directory and prompts | ||
you through configuring it for firebaseapp.com. | ||
open | ||
Opens the URL of the current Firebase app in a browser. | ||
list | ||
Lists the Firebases available to the currently logged in user. | ||
delete-site | ||
Deletes the current app from Firebase Hosting and displays a | ||
'Site not Found' page as if the site had never been deployed to. | ||
login | ||
Logs the user into Firebase. All commands that require login will prompt | ||
you if you're not currently logged in. | ||
|
||
logout | ||
Logs the user out of Firebase. | ||
## Commands | ||
|
||
-h, --help | ||
Shows this help screen. Use `firebase <command> --help` for more | ||
detailed help instructions. | ||
The command `firebase --help` lists the available commands and `firebase <command> --help` shows | ||
more details for an individual command. | ||
|
||
-v, --version | ||
Displays the current version. | ||
You can get more information about the available commands in our | ||
[command line documentation](https://www.firebase.com/docs/hosting/command-line-tool.html). | ||
|
||
-s, --silent | ||
Silent mode for scripting - commands will error with non-zero status code | ||
instead of waiting for prompt if not enough information supplied. | ||
``` | ||
|
||
## Credit | ||
|
||
Inspired by [Luke Vivier](https://github.com/lvivier/)'s Firebase command line tools. | ||
## License | ||
[MIT](http://firebase.mit-license.org) |
Empty file.
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,65 @@ | ||
/**************/ | ||
/* REQUIRES */ | ||
/**************/ | ||
var gulp = require('gulp'); | ||
|
||
// File I/O | ||
var exit = require('gulp-exit'); | ||
var jshint = require('gulp-jshint'); | ||
|
||
// Testing | ||
var mocha = require('gulp-mocha'); | ||
var istanbul = require('gulp-istanbul'); | ||
|
||
|
||
/****************/ | ||
/* FILE PATHS */ | ||
/****************/ | ||
var paths = { | ||
js: [ | ||
'lib/*.js' | ||
], | ||
|
||
tests: [ | ||
'test/*.spec.js' | ||
] | ||
}; | ||
|
||
|
||
/***********/ | ||
/* TASKS */ | ||
/***********/ | ||
// Lints the JavaScript files | ||
gulp.task('lint', function() { | ||
return gulp.src(paths.js) | ||
.pipe(jshint()) | ||
.pipe(jshint.reporter('jshint-stylish')) | ||
.pipe(jshint.reporter('fail')) | ||
.on('error', function(error) { | ||
throw error; | ||
}); | ||
}); | ||
|
||
// Runs the Mocha test suite | ||
gulp.task('test', function() { | ||
return gulp.src(paths.js) | ||
.pipe(istanbul()) | ||
.pipe(istanbul.hookRequire()) | ||
.on('finish', function () { | ||
gulp.src(paths.tests) | ||
.pipe(mocha({ | ||
reporter: 'spec', | ||
timeout: 5000 | ||
})) | ||
.pipe(istanbul.writeReports()) | ||
.pipe(exit()); | ||
}); | ||
}); | ||
|
||
// Reruns the linter every time a JavaScript file changes | ||
gulp.task('watch', function() { | ||
gulp.watch(paths.js, ['lint']); | ||
}); | ||
|
||
// Default task | ||
gulp.task('default', ['lint', 'test']); |
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
Oops, something went wrong.