Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes/remove custom dir #143

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
10 changes: 6 additions & 4 deletions bin/mean
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// MEAN CLI.
var program = require('commander'),
anonymizedData = require('../lib/controllers/anonymized-data'),
_ = require('lodash');
anonymizedData = require('../lib/controllers/anonymized-data'),
_ = require('lodash');

// set program version
var version = require('../package').version;
Expand Down Expand Up @@ -33,15 +33,17 @@ program
.command('enable <name>', 'enable user reporting')
.option('--env [env]', 'Mean environment defaults to `development`')

.parse(process.argv);
.parse(process.argv);

// print help with no args
if (program.args.length < 1) {
program.help();
}

if (program.rawArgs[2] !== 'init' && program.rawArgs[2] !== 'install')
anonymizedData.create({cmd: program.rawArgs[2]});
anonymizedData.create({
cmd: program.rawArgs[2]
});

// if there is a command, make sure it's valid
var commands = program.commands.map(function(command) {
Expand Down
14 changes: 9 additions & 5 deletions bin/mean-init
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
'use strict';

var wizard = require('../lib/wizard'),
anonymizedData = require('../lib/controllers/anonymized-data'),
utils = require('../lib//utils'),
program = require('commander');
anonymizedData = require('../lib/controllers/anonymized-data'),
utils = require('../lib//utils'),
program = require('commander');


var anonymizeVal = utils.readMeanSync('anonymizedData');
Expand Down Expand Up @@ -36,5 +36,9 @@ var options = {
};

wizard(options);
anonymizedData.create({cmd: 'init', data: {name: options.name}});

anonymizedData.create({
cmd: 'init',
data: {
name: options.name
}
});
12 changes: 8 additions & 4 deletions bin/mean-install
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
'use strict';

var cli = require('../lib/cli'),
anonymizedData = require('../lib/controllers/anonymized-data'),
program = require('commander');
anonymizedData = require('../lib/controllers/anonymized-data'),
program = require('commander');

program
.description('Installs a MEAN module')
Expand All @@ -17,5 +17,9 @@ var options = {

var name = program.args.length ? program.args[0] : 'mean';
cli.install(name, options);
anonymizedData.create({cmd: 'install', data: {name: name}});

anonymizedData.create({
cmd: 'install',
data: {
name: name
}
});
2 changes: 1 addition & 1 deletion bin/mean-login
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'use strict';

var users = require('../lib/controllers/users'),
program = require('commander');
program = require('commander');

program
.description('Login to the network')
Expand Down
10 changes: 5 additions & 5 deletions bin/mean-publish
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
'use strict';

var cli = require('../lib/cli'),
program = require('commander');
program = require('commander');

program
.description('Publishes package on the mean network.')
.option('--remote <remote>', 'Provide custom git remote')
.parse(process.argv);
.description('Publishes package on the mean network.')
.option('--remote <remote>', 'Provide custom git remote')
.parse(process.argv);

var options = {
remote: program.remote
remote: program.remote
};

cli.publish(options);
2 changes: 1 addition & 1 deletion bin/mean-register
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'use strict';

var users = require('../lib/controllers/users'),
program = require('commander');
program = require('commander');

program
.description('Registers a user on the mean.io network.')
Expand Down
2 changes: 1 addition & 1 deletion bin/mean-whoami
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'use strict';

var users = require('../lib/controllers/users'),
program = require('commander');
program = require('commander');

program
.description('Returns authorized id and email.')
Expand Down
10 changes: 5 additions & 5 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

module.exports = function() {
var config = {
napiUrl: 'https://network.mean.io/api/v0.1'
};
return config;
};
var config = {
napiUrl: 'https://network.mean.io/api/v0.1'
};
return config;
};
Loading