Skip to content

Commit 6d70d5c

Browse files
authored
Merge pull request #28 from simonihmig/codemod-cli
Migrate to codemod-cli
2 parents dd2d75b + 27ccbdd commit 6d70d5c

143 files changed

Lines changed: 3583 additions & 1082 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: node_js
22
node_js:
3-
- "4"
43
- "6"
54
- "8"
65

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ running this tool.
2121

2222
```bash
2323
cd my-ember-app-or-addon
24-
npx ember-test-helpers-codemod --type=integration tests/integration
25-
npx ember-test-helpers-codemod --type=acceptance tests/acceptance
26-
npx ember-test-helpers-codemod --type=native-dom tests
24+
npx ember-test-helpers-codemod integration tests/integration
25+
npx ember-test-helpers-codemod acceptance tests/acceptance
26+
npx ember-test-helpers-codemod native-dom tests
2727
```
2828

2929
## Transformations
@@ -59,7 +59,7 @@ This addon will perform the following transformations suitable for integration t
5959
If you want to run only selected transforms on your code, you can pick just the needed transform:
6060

6161
```bash
62-
jscodeshift -t path/to/ember-test-helpers-codemod/lib/transforms/integration/click.js tests/integration
62+
jscodeshift -t path/to/ember-test-helpers-codemod/transforms/integration/transforms/click.js tests/integration
6363
```
6464

6565
### Acceptance tests
@@ -89,7 +89,7 @@ These transformations are available for acceptance tests:
8989
If you want to run only selected transforms on your code, you can pick just the needed transform:
9090

9191
```bash
92-
jscodeshift -t ../ember-test-helpers-codemod/lib/transforms/acceptance/click.js tests/integration
92+
jscodeshift -t ../ember-test-helpers-codemod/transforms/acceptance/transforms/click.js tests/integration
9393
```
9494

9595
### ember-native-dom-helpers tests
@@ -108,7 +108,7 @@ If you want to use the native query functions `this.element.querySelector()` / `
108108
you can use the `find.js` transform after you have run the other transformations:
109109

110110
```bash
111-
jscodeshift -t path/to/ember-test-helpers-codemod/lib/transforms/find.js tests
111+
npx ember-test-helpers-codemod find tests
112112
```
113113

114114
| Before | After | Transform |

__tests__/acceptance-test.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

__tests__/bin-test.js

Lines changed: 0 additions & 106 deletions
This file was deleted.

__tests__/find-test.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

__tests__/integration-test.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

__tests__/native-dom-test.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

appveyor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
environment:
22
matrix:
3-
- nodejs_version: "4"
43
- nodejs_version: "6"
54
- nodejs_version: "8"
65

bin/cli.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
require('codemod-cli').runTransform(
5+
__dirname,
6+
process.argv[2] /* transform name */,
7+
process.argv.slice(3) /* paths or globs */
8+
)

bin/ember-test-helpers-codemod.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)