Nimble Prime Musketeers

    ember-concurrency-decorators-codemod

    0.1.0 • Public • Published

    ember-concurrency-decorators-codemod · License CircleCI Status

    As of ember-concurrency 2.0.0, the decorators provided by ember-concurrency-decorators have been moved directly into ember-concurrency, removing the need for this additional package. This codemod refactors away existing ember-concurrency-decorators imports automatically.

    Prerequisites

    • The target Ember app or addon must be using ember-concurrency >=2.0.0 in order for decorator imports to be available.

    Usage

    git clone https://github.com/camerondubas/ember-concurrency-decorators-codemod
    npx jscodeshift -t ember-concurrency-decorators-codemod/refactor-imports.js <path/*glob>.js
    
    Options

    --quotes: Whether to use 'single' or "double" quotes for strings. Default value: single

    Examples

    With ember-concurrency import

    Before:

    import Component from '@glimmer/component';
    import { timeout } from 'ember-concurrency';
    import { dropTask, task } from 'ember-concurrency-decorators';
    ...

    After:

    import Component from '@glimmer/component';
    import { timeout, dropTask, task } from 'ember-concurrency';
    ...

    Withoutember-concurrency import

    Before:

    import Component from '@glimmer/component';
    import { dropTask, task } from 'ember-concurrency-decorators';
    ...

    After:

    import Component from '@glimmer/component';
    import { dropTask, task } from 'ember-concurrency';
    ...

    Testing

    yarn test
    

    Linting

    yarn lint
    

    License

    This project is licensed under the MIT License.

    Install

    npm i ember-concurrency-decorators-codemod

    DownloadsWeekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    10.3 kB

    Total Files

    13

    Last publish

    Collaborators

    • camerondubas