npx ember-component-jquery ember-jquery path/of/files/ or/some**/*glob.js
# or
yarn global add ember-component-jquery
ember-component-jquery ember-jquery path/of/files/ or/some**/*glob.js
Input (with-import.input.js):
import $ from 'jquery';
import Component from '@ember/component';
export default Component.extend({
didInsertElement() {
Em.$('.test').focus();
Em.$(this.element).focus();
Ember.$('.test').focus();
Ember.$(this.element).focus();
},
});
Output (with-import.output.js):
import $ from 'jquery';
import Component from '@ember/component';
export default Component.extend({
didInsertElement() {
$('.test').focus();
$(this.element).focus();
$('.test').focus();
$(this.element).focus();
},
});
Input (without-import.input.js):
import Component from '@ember/component';
export default Component.extend({
didInsertElement() {
Em.$('.test').focus();
Em.$(this.element).focus();
Ember.$('.test').focus();
Ember.$(this.element).focus();
},
});
Output (without-import.output.js):
import $ from 'jquery';
import Component from '@ember/component';
export default Component.extend({
didInsertElement() {
$('.test').focus();
$(this.element).focus();
$('.test').focus();
$(this.element).focus();
},
});