Skip to content

Commit b06dccd

Browse files
author
Robert Jackson
authored
Merge pull request #4 from NullVoxPopuli/updates-to-work-with-codemod-clis-extension-support
Updates to support custom extensions in codemod-cli
2 parents 92ce435 + a28968c commit b06dccd

20 files changed

Lines changed: 538 additions & 152 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
tmp
3-
*.log
3+
*.log
4+
test/**/yarn.lock

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A collection of codemod's for ember-no-implicit-this-codemod.
88
To run a specific codemod from this project, you would run the following:
99

1010
```
11-
npx ember-no-implicit-this-codemod <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
11+
npx ember-no-implicit-this-codemod no-implicit-this path/of/files/ or/some**/*glob.hbs
1212
1313
# or
1414

bin/cli.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44
const transformName = process.argv[2];
55
const args = process.argv.slice(3);
66

7-
console.log(transformName, args);
8-
9-
require('codemod-cli').runTransform(__dirname, transformName, args);
7+
require('codemod-cli').runTransform(__dirname, transformName, args, 'hbs');

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,26 @@
3131
"codemod-cli"
3232
],
3333
"dependencies": {
34-
"codemod-cli": "^1.0.0",
35-
"ember-template-recast": "^2.0.0",
34+
"codemod-cli": "^1.1.0",
35+
"ember-template-recast": "^3.1.1",
3636
"fs-extra": "^8.1.0",
3737
"git-repo-info": "^2.1.0",
3838
"minimatch": "^3.0.4",
3939
"puppeteer": "^1.18.1",
4040
"sync-disk-cache": "^1.3.3",
41-
"walk-sync": "^2.0.1",
41+
"walk-sync": "^2.0.2",
4242
"winston": "^3.2.1"
4343
},
4444
"devDependencies": {
4545
"babel-plugin-htmlbars-inline-precompile": "^1.0.0",
46-
"coveralls": "^3.0.4",
46+
"coveralls": "^3.0.5",
4747
"eslint": "^6.0.1",
4848
"eslint-config-prettier": "^6.0.0",
4949
"eslint-plugin-prettier": "^3.1.0",
50-
"execa": "^2.0.1",
50+
"execa": "^2.0.3",
5151
"jest": "^24.8.0",
5252
"prettier": "^1.18.2",
53-
"release-it": "^12.3.0",
53+
"release-it": "^12.3.3",
5454
"release-it-lerna-changelog": "^1.0.3"
5555
},
5656
"engines": {

test/fixtures/input/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# input
1+
# app
22

33
This README outlines the details of collaborating on this Ember application.
44
A short introduction of this app could easily go here.
@@ -15,7 +15,7 @@ You will need the following things properly installed on your computer.
1515
## Installation
1616

1717
* `git clone <repository-url>` this repository
18-
* `cd input`
18+
* `cd app`
1919
* `npm install`
2020

2121
## Running / Development

test/fixtures/input/app/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<title>Input</title>
6+
<title>App</title>
77
<meta name="description" content="">
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99

1010
{{content-for "head"}}
1111

1212
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
13-
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/input.css">
13+
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/app.css">
1414

1515
{{content-for "head-footer"}}
1616
</head>
1717
<body>
1818
{{content-for "body"}}
1919

2020
<script src="{{rootURL}}assets/vendor.js"></script>
21-
<script src="{{rootURL}}assets/input.js"></script>
21+
<script src="{{rootURL}}assets/app.js"></script>
2222

2323
{{content-for "body-footer"}}
2424
</body>

test/fixtures/input/config/environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module.exports = function(environment) {
44
let ENV = {
5-
modulePrefix: 'input',
5+
modulePrefix: 'app',
66
environment,
77
rootURL: '/',
88
locationType: 'auto',

test/fixtures/input/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "input",
2+
"name": "app",
33
"version": "0.0.0",
44
"private": true,
5-
"description": "Small description for input goes here",
5+
"description": "Small description for app goes here",
66
"repository": "",
77
"license": "MIT",
88
"author": "",

test/fixtures/input/tests/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<title>Input Tests</title>
6+
<title>App Tests</title>
77
<meta name="description" content="">
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99

1010
{{content-for "head"}}
1111
{{content-for "test-head"}}
1212

1313
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
14-
<link rel="stylesheet" href="{{rootURL}}assets/input.css">
14+
<link rel="stylesheet" href="{{rootURL}}assets/app.css">
1515
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
1616

1717
{{content-for "head-footer"}}
@@ -24,7 +24,7 @@
2424
<script src="/testem.js" integrity=""></script>
2525
<script src="{{rootURL}}assets/vendor.js"></script>
2626
<script src="{{rootURL}}assets/test-support.js"></script>
27-
<script src="{{rootURL}}assets/input.js"></script>
27+
<script src="{{rootURL}}assets/app.js"></script>
2828
<script src="{{rootURL}}assets/tests.js"></script>
2929

3030
{{content-for "body-footer"}}

test/fixtures/output/.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/blueprints/*/files/
33
/vendor/
44

5-
# compiled output
5+
# compiled app
66
/dist/
77
/tmp/
88

0 commit comments

Comments
 (0)