Skip to content

Commit

Permalink
Merge 4f24f7c into 2f057ec
Browse files Browse the repository at this point in the history
  • Loading branch information
dlmr committed Aug 31, 2016
2 parents 2f057ec + 4f24f7c commit 7834ca0
Show file tree
Hide file tree
Showing 351 changed files with 12,881 additions and 7,347 deletions.
8 changes: 7 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"env": {
"test": {
"plugins": ["babel-plugin-istanbul"]
}
},
"plugins": [
"babel-plugin-transform-object-rest-spread",
"babel-plugin-transform-es2015-spread",
Expand All @@ -8,6 +13,7 @@
"babel-plugin-transform-es2015-parameters",
"babel-plugin-transform-es2015-destructuring",
"babel-plugin-transform-es2015-modules-commonjs",
"babel-plugin-transform-export-extensions"
"babel-plugin-transform-export-extensions",
"babel-plugin-transform-async-to-generator"
]
}
24 changes: 14 additions & 10 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"extends": "vgno",
"extends": "airbnb-base",

"parser": "babel-eslint",

"env": {
"es6": true
},

"ecmaFeatures": {
"modules": true
},
plugins: ["eslint-plugin-babel"],

"rules": {
"no-console": 0,
"no-underscore-dangle": 0
"indent": [2, 4],
"max-len": [2, 120, 4],
"no-warning-comments": 1,
"no-underscore-dangle": 0,
"no-use-before-define": ["error", { "functions": false }],
"prefer-template": [1],

"generator-star-spacing": 0,
"babel/generator-star-spacing": [2, { before: false, after: true }],

"import/order": [2, { "groups": ["builtin", "external", "internal", "parent", "sibling", "index"], "newlines-between": "always"}],
"import/newline-after-import": [2]
}
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
node_modules
/node_modules
*.log
.DS_Store
lib
esdocs
coverage
.idea
.nyc_output
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Maintained and used in production by teams within [Schibsted](http://schibsted.c
_Currently supports Linux and OS X using Node4+ and npm3_

## Roc provides
- A way to eliminate boilerplate code within your projects
- Command Line Interface (CLI) for creating and managing your project
- Consistent configuration and runtime management
- Minimized complexity within projects by combining powerful modules together
- A way to eliminate boilerplate code within your projects
- Best in class developer tools ready to be used instantly

All of this is provided by a flexible extension system, and several extensions are available today.
Expand Down
15 changes: 9 additions & 6 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
const pkg = require('../package.json');
const runCli = require('../lib/cli').runCli;
const roc = require('../lib').roc;
const packageJSON = require('../package.json');
const runCli = require('../lib/cli/runCli').default;
const commands = require('../lib/commands').default;

runCli({
version: pkg.version,
name: pkg.name
}, roc.config, roc.meta);
info: {
version: packageJSON.version,
name: packageJSON.name,
},
commands,
});
16 changes: 8 additions & 8 deletions bin/index.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
#! /usr/bin/env node
require('source-map-support').install();
require('loud-rejection')();

const path = require('path');

const updateNotifier = require('update-notifier');
const pkg = require('../package.json');

const packageJSON = require('../package.json');
const fileExists = require('../lib/helpers').fileExists;

const currentCli = require.resolve('./cli');

const localCli = path.resolve(process.cwd(), 'node_modules/roc/bin/cli');

if (currentCli !== localCli) {
// Are we global?
if (!fileExists(path.resolve(process.cwd(), 'node_modules/.bin/roc'))) {
updateNotifier({ pkg }).notify({ defer: false });
require(currentCli);
updateNotifier({ pkg: packageJSON }).notify({ defer: false });
require(currentCli); // eslint-disable-line
} else {
// Will try to use the local CLI over the global one
try {
const cli = require.resolve(localCli);
console.log('Found a local version of Roc, will use that over the global one.', '\n');
return require(cli);
require(cli); // eslint-disable-line
} catch (err) {
console.log('An error happened when trying to load local CLI, will use the global one.', '\n');
}
}
} else {
require(currentCli); // eslint-disable-line
}

require(currentCli);
2 changes: 1 addition & 1 deletion converters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* This file makes it easier to import the converters.
* Can use "roc/converters" to only get the converters.
*/
module.exports = require('../lib/converters/index.js');
module.exports = require('../lib/converters');
Loading

0 comments on commit 7834ca0

Please sign in to comment.