Skip to content
Open
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
10 changes: 5 additions & 5 deletions lib/core-generators/new/before.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ module.exports = function before (scope, done) {
website: util.format('https://github.com/%s', owner)
});

// To avoid confusion, disable the `async` dependency by default.
if (!_.contains(scope.without, 'async')) {
scope.without = _.uniq((scope.without||[]).concat(['async']));
}

// Provide a shortcut for generating an extremely minimal Sails app.
if (scope.minimal) {
scope.without = ['i18n','orm','sockets','grunt','lodash','async','session','views'];
Expand Down Expand Up @@ -236,6 +231,11 @@ module.exports = function before (scope, done) {
return done(new Error('Couldn\'t create a new Sails app. The provided `without` option (`'+util.inspect(scope.without, {depth:null})+'`) is invalid.'));
}//-•

// To avoid confusion, disable the `async` dependency by default.
if (!_.contains(scope.without, 'async')) {
scope.without = _.uniq((scope.without||[]).concat(['async']));
}

// Reject unrecognized "without" entries
var LEGAL_WITHOUT_IDENTIFIERS = ['lodash', 'async', 'orm', 'sockets', 'grunt', 'i18n', 'session', 'views'];
var unrecognizedEntries = _.difference(scope.without, LEGAL_WITHOUT_IDENTIFIERS);
Expand Down