-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from mrb/all_command
One command to run them all
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
'use strict'; | ||
|
||
var Watson = require('../../index'); | ||
var watson = new Watson(); | ||
|
||
module.exports = { | ||
name: 'watson:all', | ||
description: 'Performs all available Watson commands on a project.', | ||
works: 'insideProject', | ||
availableOptions: [ | ||
{ name: 'app-path', type: String, description: 'Path to app directory.', default: 'app' }, | ||
{ name: 'tests-path', type: String, description: 'Path to tests directory.', default: 'tests' }, | ||
{ name: 'router-path', type: String, description: 'Path to router file.', default: 'app/router.js' }, | ||
{ name: 'output', type: String, description: 'Output format: pretty or json.', default: 'pretty' }, | ||
{ name: 'acceptance-path', type: String, description: 'Path to acceptance tests directory.', default: 'tests/acceptance' }, | ||
{ name: 'controllers-path', type: String, description: 'Path to controllers directory.', default: 'app/controllers' }, | ||
], | ||
run: function(options) { | ||
watson.transformQUnitTest(options.testsPath); | ||
watson.transformPrototypeExtensions(options.appPath); | ||
watson.transformEmberDataModelLookups(options.appPath); | ||
watson.transformEmberDataAsyncFalseRelationships(options.appPath); | ||
watson.transformResourceRouterMapping(options.routerPath); | ||
watson.transformMethodify(options.appPath); | ||
watson.findOverloadedCPs(options.appPath).outputSummary(options.output); | ||
watson.transformTestToUseDestroyApp(options.acceptancePath); | ||
watson.replaceNeedsWithInjection(options.controllersPath); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters