Git Product home page Git Product logo

ember-component-template-colocation-migrator's Introduction

ember-component-template-colocation

This codemod will co-locate component JS and HBS as described in the Component Templates Co-location RFC.

Examples

Usage

To run the migrator on your app:

cd your/project/path
npx github:ember-codemods/ember-component-template-colocation-migrator

Flat component structure

By default, the migrator changes the classic component structure to the flat component structure.

your-project-name
├── app
│   └── components
│       ├── foo-bar
│       │   ├── baz.hbs
│       │   └── baz.js
│       ├── foo-bar.hbs
│       └── foo-bar.js
│   ...

Nested component structure

If you want to change from classic to nested, you can add the -ns flag:

cd your/project/path
npx github:ember-codemods/ember-component-template-colocation-migrator -ns

The nested component structure looks like:

your-project-name
├── app
│   └── components
│       └── foo-bar
│           ├── baz
│           │   ├── index.hbs
│           │   └── index.js
│           ├── index.hbs
│           └── index.js
│   ...

Running Tests

The tests were inspired by ember-module-migrator.

If you are contributing to this codemod, please check that all tests pass by running,

yarn test

ember-component-template-colocation-migrator's People

Contributors

chriskrycho avatar donaldwasserman avatar gavinjoyce avatar ijlee2 avatar patocallaghan avatar rwjblue avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.