Skip to content

Commit a030be6

Browse files
author
Santosh Sutar
committed
Add dyfactor and runtime config details
1 parent baf2ee7 commit a030be6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

howto.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Ember ES6 - How to run ES6 class codemods
22

33
## Overview
4-
The [ES6 native classes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) support is available in Ember starting with 3.4.x via [polyfill](https://github.com/pzuraq/ember-native-class-polyfill) (3.6.x without polyfill). Transitioning to the new ES6 classes syntax would provide better overall developer experience. The [ember ES6 class codemods](https://github.com/scalvert/ember-es6-class-codemod) are developed to make this transition easier.
4+
The [ES6 native classes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) support is available in Ember starting with 3.4.x via [polyfill](https://github.com/pzuraq/ember-native-class-polyfill) (3.6.x without polyfill). Transitioning to the new ES6 classes syntax would provide better overall developer experience. The [ember ES6 class codemods](https://github.com/ember-codemods/ember-es6-class-codemod) are developed to make this transition easier.
55

66
The purpose of this document is to provide step by step guide to install and run codemods on your code base.
77

@@ -14,7 +14,7 @@ The application must be running on
1414

1515
Before moving on to installation steps, let's take a quick overview of dependencies which will be added to the application.
1616

17-
### [ember-es6-class-codemod](https://github.com/scalvert/ember-es6-class-codemod)
17+
### [ember-es6-class-codemod](https://github.com/ember-codemods/ember-es6-class-codemod)
1818
Codemods for transforming ember app code to native ES6 class syntax with decorators. The codemods can be installed globally (recommended) or locally.
1919

2020
### [ember-es6-class-codemod-dyfactor](https://github.com/ssutar/ember-es6-class-codemod-dyfactor)
@@ -45,13 +45,18 @@ yarn add eslint-plugin-ember-es6-class ember-es6-class-codemod-dyfactor --dev
4545
```
4646
yarn ember install ember-decorators
4747
```
48+
**Note** Make sure the `@ember-decorators/babel-transforms` version is `^2.1.0`. This is required with the decision to use stage 1 decorators
49+
4850
- _Install [ember native class polyfill](https://github.com/pzuraq/ember-native-class-polyfill) only if your application is running on `ember-source` less than v3.6.x_
4951
```
5052
yarn ember install ember-native-class-polyfill
5153
```
5254

5355
## Setup dyfactor plugin
54-
Once all the dependencies are installed successfully, the application need to be setup to run the [dyfactor plugin](https://github.com/ssutar/ember-es6-class-codemod-dyfactor), which is used to gather valuable runtime information from the application for use within the codemod
56+
Once all the dependencies are installed successfully, the application need to be setup to run the [dyfactor plugin](https://github.com/ssutar/ember-es6-class-codemod-dyfactor), which is used to gather valuable runtime information from the application for use within the codemod. The codemods are designed with runtime data as input to correctly transform the code. See the documentation of [Runtime Config Path](https://github.com/ember-codemods/ember-es6-class-codemod#runtime-config-path) option for more details.
57+
58+
[Dyfactor](https://github.com/dyfactor/dyfactor) is a plugin runner system, which allows you to collect the runtime information about the code. See the [documentation](https://github.com/dyfactor/dyfactor#usage) for more details about dyfactor
59+
5560

5661
To initialize the dyfactor plugin, run
5762
```
@@ -71,7 +76,7 @@ Name: ember-object Type: template Levels: extract, modify
7176
✨ Done in 0.83s.
7277
```
7378

74-
Open `.dyfactor.json` and set the entry in navigation.pages list. The page entry must be of the test page url, for example:
79+
Open `.dyfactor.json` and set the entry in `navigation.pages` list. The page entry must be of the test page url, for example:
7580
```
7681
{
7782
"navigation": {

0 commit comments

Comments
 (0)