Skip to content

Commit

Permalink
Added gulp, Travis, a test framework, and made it Catapult-enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jwngr committed Jan 23, 2015
1 parent ca970a1 commit 3add585
Show file tree
Hide file tree
Showing 15 changed files with 223 additions and 214 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
coverage/
node_modules/

.DS_Store
.idea
*.iml
9 changes: 9 additions & 0 deletions .travis.yml
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
39 changes: 0 additions & 39 deletions CHANGELOG.md

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
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.
72 changes: 15 additions & 57 deletions README.md
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 added changelog.txt
Empty file.
65 changes: 65 additions & 0 deletions gulpfile.js
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']);
81 changes: 50 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
{
"name": "firebase-tools",
"preferGlobal": true,
"version": "1.1.4",
"description": "The Firebase Command Line Tools",
"description": "Firebase command line tools",
"version": "0.0.0",
"author": "Firebase <support@firebase.com> (https://www.firebase.com/)",
"homepage": "https://github.com/firebase/firebase-tools/",
"repository": {
"type": "git",
"url": "https://github.com/firebase/firebase-tools.git"
},
"bugs": {
"url": "https://github.com/firebase/firebase-tools/issues"
},
"licenses": [
{
"type": "MIT",
"url": "http://firebase.mit-license.org/"
}
],
"keywords": [
"firebase",
"hosting",
"ssl",
"cdn",
"cli",
"synchronization",
"real-time",
"ssl",
"cloud",
"hosting",
"firebase",
"realtime",
"websockets",
"cloud"
"synchronization"
],
"author": "Firebase <support@firebase.com>",
"contributors": [
{
"name": "Chris Raynor",
"email": "chris@firebase.com"
},
{
"name": "Adam Putinski",
"email": "adam@firebase.com"
},
{
"name": "Rob DiMarco",
"email": "rob@firebase.com"
}
"preferGlobal": true,
"bin": {
"firebase": "./bin/firebase"
},
"engines": {
"node": ">=0.10.0"
},
"engineStrict": true,
"files": [
"bin/**",
"lib/**",
"LICENSE",
"README.md",
"package.json"
],
"repository": "https://github.com/firebase/firebase-tools.git",
"homepage": "https://github.com/firebase/firebase-tools",
"dependencies": {
"optimist": "0.6.x",
"prompt": "0.2.x",
Expand All @@ -44,11 +56,18 @@
"when": "3.1.0",
"chalk": "~0.4.0"
},
"bin": {
"firebase": "./bin/firebase"
},
"engines": {
"node": ">=0.10.0"
"devDependencies": {
"chai": "^1.10.0",
"coveralls": "2.11.2",
"gulp": "3.8.10",
"gulp-exit": "0.0.2",
"gulp-istanbul": "0.5.0",
"gulp-jshint": "1.9.0",
"gulp-mocha": "2.0.0",
"jshint-stylish": "1.0.0"
},
"engineStrict": true
"scripts": {
"test": "gulp test",
"travis": "gulp"
}
}
Loading

0 comments on commit 3add585

Please sign in to comment.