Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Commit

Permalink
add CLI for 'configure' task
Browse files Browse the repository at this point in the history
  • Loading branch information
mykmelez committed Sep 23, 2015
1 parent a27620b commit 6755e96
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
40 changes: 40 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#! /usr/bin/env node

/**
* Copyright 2015 Mozilla
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

var configure = require('./lib/configure');
var packageJson = require('./package.json');
var program = require('commander');

program
.version(packageJson.version)
.command('configure')
.description('configure repository to auto-deploy to GitHub Pages using Travis CI')
.action(function(env, options) {
configure()
.catch(function(err) {
console.error(err);
});
});

program.parse(process.argv);

if (!process.argv.slice(2).length) {
program.outputHelp();
}
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,20 @@
"url": "https://github.com/mozilla/oghliner/"
},
"author": "Myk Melez <myk@mykzilla.org>",
"bin": "./cli.js",
"license": "Apache-2.0",
"keywords": ["offline", "webapp", "github", "gh-pages", "travis"],
"keywords": [
"offline",
"webapp",
"github",
"gh-pages",
"travis"
],
"files": [
"index.js"
],
"dependencies": {
"commander": "^2.8.1",
"gh-pages": "^0.4.0",
"gitconfiglocal": "^1.0.0",
"github": "^0.2.4",
Expand Down

0 comments on commit 6755e96

Please sign in to comment.