Skip to content

Commit

Permalink
Stylistic tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeStanton committed May 14, 2015
1 parent a5e2b6a commit 65e8b4e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
6 changes: 0 additions & 6 deletions local-cli/Libraries/BeaconManager/package.json

This file was deleted.

2 changes: 2 additions & 0 deletions local-cli/generator-utils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

var path = require('path');
var fs = require('fs');

Expand Down
3 changes: 1 addition & 2 deletions local-cli/init.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
'use strict';

var path = require('path');
var fs = require('fs');
var utils = require('./generator-utils')
var utils = require('./generator-utils');

function init(projectDir, appName) {
console.log('Setting up new React Native app in ' + projectDir);
Expand Down
13 changes: 6 additions & 7 deletions local-cli/new-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var path = require('path');
var fs = require('fs');
var utils = require('./generator-utils')
var utils = require('./generator-utils');

function showHelp() {
console.log([
Expand All @@ -13,10 +13,9 @@ function showHelp() {
}

function newLibrary(libraryName) {
//var root = path.resolve(__dirname, '../');
var root = '/Users/joe/Git/FortnumNative/'; //TODO: Remove
var root = process.cwd();
var libraries = path.resolve(root, 'Libraries');
var libraryDest = path.resolve(root, 'Libraries', libraryName);
var libraryDest = path.resolve(libraries, libraryName);
var source = path.resolve('node_modules', 'react-native', 'Libraries', 'Sample') + '/';

if (!fs.existsSync(libraries)) {
Expand Down Expand Up @@ -56,7 +55,7 @@ function writePackageJSON(libraryName, dest) {
name: libraryName,
version: '0.0.1',
private: false,
keywords: "react-native"
keywords: 'react-native'
};

fs.writeFileSync(
Expand All @@ -69,8 +68,8 @@ module.exports = {
init: function(args) {
var libraryName = args[1];
if (!libraryName) { showHelp(); }

utils.validatePackageName(libraryName);

newLibrary(libraryName);
}
}
};
1 change: 0 additions & 1 deletion react-native-cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ function init(name) {
}

function run(command, cb) {
utils.validatePackageName()
var parts = command.split(/\s+/);
var cmd = parts[0];
var args = parts.slice(1);
Expand Down

0 comments on commit 65e8b4e

Please sign in to comment.