Giter VIP home page Giter VIP logo

ember-case's Introduction

embercase README

Features

Template Inatantiation Syntax

If you have some legacy Ember code, you will most likely have components being called like the following:

{{x-user-avatar imageUrl=user.avatar name=user.fullName class="w-6 h-6 mr-4 rounded-full shrink-0"}}

With this extension you can put ypur cursor on the line, then press Ctrl+Shodt+P, then select Ember Case to get the following

<XUserAvatar @imageUrl={{user.avatar}} @name={{user.fullName}} class="w-h-6 mr-4 rounded-full Shrink0" />

embercase-has-block

Template Variable Scoping

In the paset it was totally fine to write {{variable}} in an Ember template, which was quite confusing and frustrating. Nowadays. you need to be more specific like {{this.variable}} or {{@variable}}. This can be a huge road blocker for migrating older apps to Ember 4+. If you are in such a situation, select the variable name you are interested in. Then press Ctrl + Shift + P. Type either thisify or @ify according to your needs. Press Enter. Your entire file is now updated.

@ify


atify


thisify


thisify


Javascript syntax manipulation

De get

Conveniently change this.get('something.somethingElse') to this.somethibg.get('somethingElse') by running De Get command from the palette (Command + Shift + P).

g


setify

Conveniently substitute this.set('key.child1.child2', value) with set(this.key, 'child1.child2', value) by running setify command from the palette (Command + Shift + P).

h


Requirements

An Ember project ๐Ÿค“

Known Issues

Not all possible cases are covered. In case you stample upon such a case, please report it.

Release Notes

0.2.0

Intelligently figure out the proper context of a variable, if the project uses pods structure.

0.1.0

Facilitate adding this or @ to variable names in templates.

0.0.5

Handle an entire block of template code with nested component instantiations.

0.0.1

Initial release of EmberCase


Enjoy!

ember-case's People

Contributors

mehran-naghizadeh avatar

Watchers

 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.