diff --git a/.eslintignore b/.eslintignore index d619eb5c112..46e1aceb0d9 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,4 @@ blueprints/*/*files/**/*.js -blueprints-js/*/*files/**/*.js blueprints/*/*files/**/*.ts node-tests/fixtures/**/*.js /docs/ diff --git a/.eslintrc.js b/.eslintrc.js index eb665f5eaaf..a552660036e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -150,7 +150,6 @@ module.exports = { 'node-tests/**/*.js', 'tests/node/**/*.js', 'blueprints/**/*.js', - 'blueprints-js/**/*.js', 'bin/**/*.js', 'bin/**/*.mjs', 'tests/docs/*.js', diff --git a/blueprints-js/acceptance-test/qunit-files/tests/acceptance/__name__-test.js b/blueprints-js/acceptance-test/qunit-files/tests/acceptance/__name__-test.js deleted file mode 100644 index 35b4c18f65b..00000000000 --- a/blueprints-js/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { test } from 'qunit'; -import moduleForAcceptance from '<%= testFolderRoot %>/tests/helpers/module-for-acceptance'; - -moduleForAcceptance('<%= friendlyTestName %>'); - -test('visiting /<%= dasherizedModuleName %>', function (assert) { - visit('/<%= dasherizedModuleName %>'); - - andThen(function () { - assert.strictEqual(currentURL(), '/<%= dasherizedModuleName %>'); - }); -}); diff --git a/blueprints-js/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js b/blueprints-js/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js deleted file mode 100644 index 07ae1fa1048..00000000000 --- a/blueprints-js/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +++ /dev/null @@ -1,13 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL } from '@ember/test-helpers'; -import { setupApplicationTest } from '<%= modulePrefix %>/tests/helpers'; - -module('<%= friendlyTestName %>', function (hooks) { - setupApplicationTest(hooks); - - test('visiting /<%= dasherizedModuleName %>', async function (assert) { - await visit('/<%= dasherizedModuleName %>'); - - assert.strictEqual(currentURL(), '/<%= dasherizedModuleName %>'); - }); -}); diff --git a/blueprints-js/component-addon/files/__root__/__path__/__name__.js b/blueprints-js/component-addon/files/__root__/__path__/__name__.js deleted file mode 100644 index 71a8b71c1c6..00000000000 --- a/blueprints-js/component-addon/files/__root__/__path__/__name__.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '<%= modulePath %>'; \ No newline at end of file diff --git a/blueprints-js/component-class-addon/files/__root__/__path__/__name__.js b/blueprints-js/component-class-addon/files/__root__/__path__/__name__.js deleted file mode 100644 index 71a8b71c1c6..00000000000 --- a/blueprints-js/component-class-addon/files/__root__/__path__/__name__.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '<%= modulePath %>'; \ No newline at end of file diff --git a/blueprints-js/component-class/files/__root__/__path__/__name__.js b/blueprints-js/component-class/files/__root__/__path__/__name__.js deleted file mode 100644 index 777e6155290..00000000000 --- a/blueprints-js/component-class/files/__root__/__path__/__name__.js +++ /dev/null @@ -1,3 +0,0 @@ -<%= importComponent %> -<%= importTemplate %> -export default <%= defaultExport %> diff --git a/blueprints-js/component-test/qunit-files/__root__/__testType__/__path__/__test__.js b/blueprints-js/component-test/qunit-files/__root__/__testType__/__path__/__test__.js deleted file mode 100644 index 29c6b4e042b..00000000000 --- a/blueprints-js/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +++ /dev/null @@ -1,31 +0,0 @@ -import { moduleForComponent, test } from 'ember-qunit';<% if (testType === 'integration') { %> -import hbs from 'htmlbars-inline-precompile';<% } %> - -moduleForComponent('<%= componentPathName %>', '<%= friendlyTestDescription %>', { - <% if (testType === 'integration' ) { %>integration: true,<% } else if(testType === 'unit') { %>// Specify the other units that are required for this test - // needs: ['component:foo', 'helper:bar'], - unit: true,<% } %> -}); - -test('it renders', function (assert) {<% if (testType === 'integration' ) { %> - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.on('myAction', function(val) { ... }); - - this.render(hbs`<%= selfCloseComponent(componentName) %>`); - - assert.strictEqual(this.$().text().trim(), ''); - - // Template block usage: - this.render(hbs` - <%= openComponent(componentName) %> - template block text - <%= closeComponent(componentName) %> - `); - - assert.strictEqual(this.$().text().trim(), 'template block text');<% } else if(testType === 'unit') { %> - // Creates the component instance - /*let component =*/ this.subject(); - // Renders the component to the page - this.render(); - assert.strictEqual(this.$().text().trim(), '');<% } %> -}); diff --git a/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js b/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js deleted file mode 100644 index 1a04a560cbd..00000000000 --- a/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +++ /dev/null @@ -1,36 +0,0 @@ -<% if (testType === 'integration') { %>import { module, test } from 'qunit'; -import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers'; -import { render } from '@ember/test-helpers'; -<%= hbsImportStatement %> - -module('<%= friendlyTestDescription %>', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.set('myAction', function(val) { ... }); - - await render(hbs`<%= selfCloseComponent(componentName) %>`); - - assert.dom().hasText(''); - - // Template block usage: - await render(hbs` - <%= openComponent(componentName) %> - template block text - <%= closeComponent(componentName) %> - `); - - assert.dom().hasText('template block text'); - }); -});<% } else if (testType === 'unit') { %>import { module, test } from 'qunit'; -import { setupTest } from '<%= modulePrefix %>/tests/helpers'; - -module('<%= friendlyTestDescription %>', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let component = this.owner.factoryFor('component:<%= componentPathName %>').create(); - assert.ok(component); - }); -});<% } %> diff --git a/blueprints-js/component/files/__root__/__path__/__name__.js b/blueprints-js/component/files/__root__/__path__/__name__.js deleted file mode 100644 index 777e6155290..00000000000 --- a/blueprints-js/component/files/__root__/__path__/__name__.js +++ /dev/null @@ -1,3 +0,0 @@ -<%= importComponent %> -<%= importTemplate %> -export default <%= defaultExport %> diff --git a/blueprints-js/component/files/__root__/__templatepath__/__templatename__.hbs b/blueprints-js/component/files/__root__/__templatepath__/__templatename__.hbs deleted file mode 100644 index fb5c4b157d1..00000000000 --- a/blueprints-js/component/files/__root__/__templatepath__/__templatename__.hbs +++ /dev/null @@ -1 +0,0 @@ -{{yield}} \ No newline at end of file diff --git a/blueprints-js/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js b/blueprints-js/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js deleted file mode 100644 index 8d274ae5f3b..00000000000 --- a/blueprints-js/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js +++ /dev/null @@ -1,12 +0,0 @@ -import { moduleFor, test } from 'ember-qunit'; - -moduleFor('controller:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', { - // Specify the other units that are required for this test. - // needs: ['controller:foo'] -}); - -// TODO: Replace this with your real tests. -test('it exists', function (assert) { - let controller = this.subject(); - assert.ok(controller); -}); diff --git a/blueprints-js/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js b/blueprints-js/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js deleted file mode 100644 index 211e4cf497d..00000000000 --- a/blueprints-js/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from '<%= modulePrefix %>/tests/helpers'; - -module('<%= friendlyTestDescription %>', function (hooks) { - setupTest(hooks); - - // TODO: Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup('controller:<%= controllerPathName %>'); - assert.ok(controller); - }); -}); diff --git a/blueprints-js/controller/files/__root__/__path__/__name__.js b/blueprints-js/controller/files/__root__/__path__/__name__.js deleted file mode 100644 index dcfbd50a6dc..00000000000 --- a/blueprints-js/controller/files/__root__/__path__/__name__.js +++ /dev/null @@ -1,3 +0,0 @@ -import Controller from '@ember/controller'; - -export default class <%= classifiedModuleName %>Controller extends Controller {} diff --git a/blueprints-js/helper-addon/files/__root__/__path__/__name__.js b/blueprints-js/helper-addon/files/__root__/__path__/__name__.js deleted file mode 100644 index 83aac86a6a1..00000000000 --- a/blueprints-js/helper-addon/files/__root__/__path__/__name__.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '<%= modulePath %>'; diff --git a/blueprints-js/helper-test/qunit-files/__root__/__testType__/helpers/__name__-test.js b/blueprints-js/helper-test/qunit-files/__root__/__testType__/helpers/__name__-test.js deleted file mode 100644 index 45b8e177f2c..00000000000 --- a/blueprints-js/helper-test/qunit-files/__root__/__testType__/helpers/__name__-test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { moduleForComponent, test } from 'ember-qunit'; -import hbs from 'htmlbars-inline-precompile'; - -moduleForComponent('<%= dasherizedModuleName %>', 'helper:<%= dasherizedModuleName %>', { - integration: true, -}); - -// TODO: Replace this with your real tests. -test('it renders', function (assert) { - this.set('inputValue', '1234'); - - this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`); - - assert.strictEqual(this.$().text().trim(), '1234'); -}); diff --git a/blueprints-js/helper-test/qunit-rfc-232-files/__root__/__testType__/helpers/__name__-test.js b/blueprints-js/helper-test/qunit-rfc-232-files/__root__/__testType__/helpers/__name__-test.js deleted file mode 100644 index 782222ddad6..00000000000 --- a/blueprints-js/helper-test/qunit-rfc-232-files/__root__/__testType__/helpers/__name__-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers'; -import { render } from '@ember/test-helpers'; -<%= hbsImportStatement %> - -module('<%= friendlyTestName %>', function (hooks) { - setupRenderingTest(hooks); - - // TODO: Replace this with your real tests. - test('it renders', async function (assert) { - this.set('inputValue', '1234'); - - await render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`); - - assert.dom().hasText('1234'); - }); -}); diff --git a/blueprints-js/helper/files/__root__/helpers/__name__.js b/blueprints-js/helper/files/__root__/helpers/__name__.js deleted file mode 100644 index 786682850a6..00000000000 --- a/blueprints-js/helper/files/__root__/helpers/__name__.js +++ /dev/null @@ -1,5 +0,0 @@ -import { helper } from '@ember/component/helper'; - -export default helper(function <%= camelizedModuleName %>(positional /*, named*/) { - return positional; -}); diff --git a/blueprints-js/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js b/blueprints-js/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js deleted file mode 100644 index 4a3131618ea..00000000000 --- a/blueprints-js/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +++ /dev/null @@ -1,25 +0,0 @@ -import Application from '@ember/application'; -import { run } from '@ember/runloop'; - -import { initialize } from '<%= modulePrefix %>/initializers/<%= dasherizedModuleName %>'; -import { module, test } from 'qunit'; -<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';\n<% } %> -module('<%= friendlyTestName %>', { - beforeEach() { - run(() => { - this.application = Application.create(); - this.application.deferReadiness(); - }); - }, - afterEach() { - <% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %> - }, -}); - -// TODO: Replace this with your real tests. -test('it works', function (assert) { - initialize(this.application); - - // you would normally confirm the results of the initializer here - assert.ok(true); -}); diff --git a/blueprints-js/initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js b/blueprints-js/initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js deleted file mode 100644 index ba8829873f8..00000000000 --- a/blueprints-js/initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +++ /dev/null @@ -1,37 +0,0 @@ -import Application from '@ember/application'; - -import config from '<%= modulePrefix %>/config/environment'; -import { initialize } from '<%= modulePrefix %>/initializers/<%= dasherizedModuleName %>'; -import { module, test } from 'qunit'; -import Resolver from 'ember-resolver'; -<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %> - -module('<%= friendlyTestName %>', function (hooks) { - hooks.beforeEach(function () { - this.TestApplication = class TestApplication extends Application { - modulePrefix = config.modulePrefix; - podModulePrefix = config.podModulePrefix; - Resolver = Resolver; - }; - - this.TestApplication.initializer({ - name: 'initializer under test', - initialize, - }); - - this.application = this.TestApplication.create({ - autoboot: false, - }); - }); - - hooks.afterEach(function () { - <% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %> - }); - - // TODO: Replace this with your real tests. - test('it works', async function (assert) { - await this.application.boot(); - - assert.ok(true); - }); -}); diff --git a/blueprints-js/initializer/files/__root__/initializers/__name__.js b/blueprints-js/initializer/files/__root__/initializers/__name__.js deleted file mode 100644 index 065fae64a51..00000000000 --- a/blueprints-js/initializer/files/__root__/initializers/__name__.js +++ /dev/null @@ -1,5 +0,0 @@ -export function initialize(application) {} - -export default { - initialize, -}; diff --git a/blueprints-js/instance-initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js b/blueprints-js/instance-initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js deleted file mode 100644 index 9f056812709..00000000000 --- a/blueprints-js/instance-initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +++ /dev/null @@ -1,26 +0,0 @@ -import Application from '@ember/application'; -import { run } from '@ember/runloop'; -import { initialize } from '<%= modulePrefix %>/instance-initializers/<%= dasherizedModuleName %>'; -import { module, test } from 'qunit';<% if (destroyAppExists) { %> -import destroyApp from '../../helpers/destroy-app';<% } %> - -module('<%= friendlyTestName %>', { - beforeEach() { - run(() => { - this.application = Application.create(); - this.appInstance = this.application.buildInstance(); - }); - }, - afterEach() { - run(this.appInstance, 'destroy'); - <% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %> - }, -}); - -// TODO: Replace this with your real tests. -test('it works', function (assert) { - initialize(this.appInstance); - - // you would normally confirm the results of the initializer here - assert.ok(true); -}); diff --git a/blueprints-js/instance-initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js b/blueprints-js/instance-initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js deleted file mode 100644 index dcb4f3f305c..00000000000 --- a/blueprints-js/instance-initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +++ /dev/null @@ -1,39 +0,0 @@ -import Application from '@ember/application'; - -import config from '<%= modulePrefix %>/config/environment'; -import { initialize } from '<%= modulePrefix %>/instance-initializers/<%= dasherizedModuleName %>'; -import { module, test } from 'qunit'; -import Resolver from 'ember-resolver'; -<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %> - -module('<%= friendlyTestName %>', function (hooks) { - hooks.beforeEach(function () { - this.TestApplication = class TestApplication extends Application { - modulePrefix = config.modulePrefix; - podModulePrefix = config.podModulePrefix; - Resolver = Resolver; - }; - - this.TestApplication.instanceInitializer({ - name: 'initializer under test', - initialize, - }); - - this.application = this.TestApplication.create({ - autoboot: false, - }); - - this.instance = this.application.buildInstance(); - }); - hooks.afterEach(function () { - <% if (destroyAppExists) { %>destroyApp(this.instance);<% } else { %>run(this.instance, 'destroy');<% } %> - <% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %> - }); - - // TODO: Replace this with your real tests. - test('it works', async function (assert) { - await this.instance.boot(); - - assert.ok(true); - }); -}); diff --git a/blueprints-js/instance-initializer/files/__root__/instance-initializers/__name__.js b/blueprints-js/instance-initializer/files/__root__/instance-initializers/__name__.js deleted file mode 100644 index e0281ca4e7e..00000000000 --- a/blueprints-js/instance-initializer/files/__root__/instance-initializers/__name__.js +++ /dev/null @@ -1,5 +0,0 @@ -export function initialize(owner) {} - -export default { - initialize, -}; diff --git a/blueprints-js/mixin-test/qunit-files/__root__/__testType__/__name__-test.js b/blueprints-js/mixin-test/qunit-files/__root__/__testType__/__name__-test.js deleted file mode 100644 index 00579ff7c02..00000000000 --- a/blueprints-js/mixin-test/qunit-files/__root__/__testType__/__name__-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import EmberObject from '@ember/object'; -import <%= classifiedModuleName %>Mixin from '<%= projectName %>/mixins/<%= dasherizedModuleName %>'; -import { module, test } from 'qunit'; - -module('<%= friendlyTestName %>'); - -// TODO: Replace this with your real tests. -test('it works', function (assert) { - let <%= classifiedModuleName %>Object = EmberObject.extend(<%= classifiedModuleName %>Mixin); - let subject = <%= classifiedModuleName %>Object.create(); - assert.ok(subject); -}); diff --git a/blueprints-js/mixin-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js b/blueprints-js/mixin-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js deleted file mode 100644 index 034a718d852..00000000000 --- a/blueprints-js/mixin-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import EmberObject from '@ember/object'; -import <%= classifiedModuleName %>Mixin from '<%= projectName %>/mixins/<%= dasherizedModuleName %>'; -import { module, test } from 'qunit'; - -module('<%= friendlyTestName %>', function () { - // TODO: Replace this with your real tests. - test('it works', function (assert) { - let <%= classifiedModuleName %>Object = EmberObject.extend(<%= classifiedModuleName %>Mixin); - let subject = <%= classifiedModuleName %>Object.create(); - assert.ok(subject); - }); -}); diff --git a/blueprints-js/mixin/files/__root__/mixins/__name__.js b/blueprints-js/mixin/files/__root__/mixins/__name__.js deleted file mode 100644 index 9aa7bf677d8..00000000000 --- a/blueprints-js/mixin/files/__root__/mixins/__name__.js +++ /dev/null @@ -1,3 +0,0 @@ -import Mixin from '@ember/object/mixin'; - -export default Mixin.create({}); diff --git a/blueprints-js/route-addon/files/__root__/__path__/__name__.js b/blueprints-js/route-addon/files/__root__/__path__/__name__.js deleted file mode 100644 index d921567455f..00000000000 --- a/blueprints-js/route-addon/files/__root__/__path__/__name__.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '<%= routeModulePath %>'; diff --git a/blueprints-js/route-addon/files/__root__/__templatepath__/__templatename__.js b/blueprints-js/route-addon/files/__root__/__templatepath__/__templatename__.js deleted file mode 100644 index 2701b135456..00000000000 --- a/blueprints-js/route-addon/files/__root__/__templatepath__/__templatename__.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '<%= templateModulePath %>'; diff --git a/blueprints-js/route-test/qunit-files/__root__/__testType__/__path__/__test__.js b/blueprints-js/route-test/qunit-files/__root__/__testType__/__path__/__test__.js deleted file mode 100644 index 44232623e38..00000000000 --- a/blueprints-js/route-test/qunit-files/__root__/__testType__/__path__/__test__.js +++ /dev/null @@ -1,11 +0,0 @@ -import { moduleFor, test } from 'ember-qunit'; - -moduleFor('route:<%= moduleName %>', '<%= friendlyTestDescription %>', { - // Specify the other units that are required for this test. - // needs: ['controller:foo'] -}); - -test('it exists', function (assert) { - let route = this.subject(); - assert.ok(route); -}); diff --git a/blueprints-js/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js b/blueprints-js/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js deleted file mode 100644 index 942fd41cc9c..00000000000 --- a/blueprints-js/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from '<%= modulePrefix %>/tests/helpers'; - -module('<%= friendlyTestDescription %>', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup('route:<%= moduleName %>'); - assert.ok(route); - }); -}); diff --git a/blueprints-js/route/files/__root__/__path__/__name__.js b/blueprints-js/route/files/__root__/__path__/__name__.js deleted file mode 100644 index aeb39c6b91b..00000000000 --- a/blueprints-js/route/files/__root__/__path__/__name__.js +++ /dev/null @@ -1,9 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class <%= classifiedModuleName %>Route extends Route {<% if (hasDynamicSegment) {%> - model(params) { - // This route was generated with a dynamic segment. Implement data loading - // based on that dynamic segment here in the model hook. - return params; - } -<%}%>} diff --git a/blueprints-js/route/files/__root__/__templatepath__/__templatename__.hbs b/blueprints-js/route/files/__root__/__templatepath__/__templatename__.hbs deleted file mode 100644 index 9857cee0c36..00000000000 --- a/blueprints-js/route/files/__root__/__templatepath__/__templatename__.hbs +++ /dev/null @@ -1,2 +0,0 @@ -<% if (addTitle) {%>{{page-title "<%= routeName %>"}} -<%}%>{{outlet}} \ No newline at end of file diff --git a/blueprints-js/service-test/qunit-files/__root__/__testType__/__path__/__test__.js b/blueprints-js/service-test/qunit-files/__root__/__testType__/__path__/__test__.js deleted file mode 100644 index 1f42bc8820f..00000000000 --- a/blueprints-js/service-test/qunit-files/__root__/__testType__/__path__/__test__.js +++ /dev/null @@ -1,12 +0,0 @@ -import { moduleFor, test } from 'ember-qunit'; - -moduleFor('service:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', { - // Specify the other units that are required for this test. - // needs: ['service:foo'] -}); - -// TODO: Replace this with your real tests. -test('it exists', function (assert) { - let service = this.subject(); - assert.ok(service); -}); diff --git a/blueprints-js/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js b/blueprints-js/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js deleted file mode 100644 index 14ec42e38ad..00000000000 --- a/blueprints-js/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from '<%= modulePrefix %>/tests/helpers'; - -module('<%= friendlyTestDescription %>', function (hooks) { - setupTest(hooks); - - // TODO: Replace this with your real tests. - test('it exists', function (assert) { - let service = this.owner.lookup('service:<%= dasherizedModuleName %>'); - assert.ok(service); - }); -}); diff --git a/blueprints-js/service/files/__root__/__path__/__name__.js b/blueprints-js/service/files/__root__/__path__/__name__.js deleted file mode 100644 index 6f7a5e9baa4..00000000000 --- a/blueprints-js/service/files/__root__/__path__/__name__.js +++ /dev/null @@ -1,3 +0,0 @@ -import Service from '@ember/service'; - -export default class <%= classifiedModuleName %>Service extends Service {} diff --git a/blueprints-js/template/files/__root__/__path__/__name__.hbs b/blueprints-js/template/files/__root__/__path__/__name__.hbs deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/blueprints-js/util-test/qunit-files/__root__/__testType__/__name__-test.js b/blueprints-js/util-test/qunit-files/__root__/__testType__/__name__-test.js deleted file mode 100644 index 2a10306510e..00000000000 --- a/blueprints-js/util-test/qunit-files/__root__/__testType__/__name__-test.js +++ /dev/null @@ -1,10 +0,0 @@ -import <%= camelizedModuleName %> from '<%= modulePrefix %>/utils/<%= dasherizedModuleName %>'; -import { module, test } from 'qunit'; - -module('<%= friendlyTestName %>'); - -// TODO: Replace this with your real tests. -test('it works', function (assert) { - let result = <%= camelizedModuleName %>(); - assert.ok(result); -}); diff --git a/blueprints-js/util-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js b/blueprints-js/util-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js deleted file mode 100644 index 0278e54bdfb..00000000000 --- a/blueprints-js/util-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +++ /dev/null @@ -1,10 +0,0 @@ -import <%= camelizedModuleName %> from '<%= modulePrefix %>/utils/<%= dasherizedModuleName %>'; -import { module, test } from 'qunit'; - -module('<%= friendlyTestName %>', function () { - // TODO: Replace this with your real tests. - test('it works', function (assert) { - let result = <%= camelizedModuleName %>(); - assert.ok(result); - }); -}); diff --git a/blueprints-js/util/files/__root__/utils/__name__.js b/blueprints-js/util/files/__root__/utils/__name__.js deleted file mode 100644 index ab636c1792a..00000000000 --- a/blueprints-js/util/files/__root__/utils/__name__.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function <%= camelizedModuleName %>() { - return true; -} diff --git a/blueprints/-addon-import.js b/blueprints/-addon-import.js index fa40870e6f4..27cf4f7f6fa 100644 --- a/blueprints/-addon-import.js +++ b/blueprints/-addon-import.js @@ -4,18 +4,9 @@ const stringUtil = require('ember-cli-string-utils'); const path = require('path'); const inflector = require('inflection'); -const maybePolyfillTypeScriptBlueprints = require('./-maybe-polyfill-typescript-blueprints'); - module.exports = { description: 'Generates an import wrapper.', - shouldTransformTypeScript: true, - - init() { - this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); - }, - fileMapTokens: function () { return { __name__: function (options) { diff --git a/blueprints/-maybe-polyfill-typescript-blueprints.js b/blueprints/-maybe-polyfill-typescript-blueprints.js deleted file mode 100644 index 93508ebb8c6..00000000000 --- a/blueprints/-maybe-polyfill-typescript-blueprints.js +++ /dev/null @@ -1,19 +0,0 @@ -const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); -const EMBER_TYPESCRIPT_BLUEPRINTS = true; - -function canEmitTypeScript() { - return 'EMBER_TYPESCRIPT_BLUEPRINTS' in process.env - ? process.env.EMBER_TYPESCRIPT_BLUEPRINTS === 'true' - : EMBER_TYPESCRIPT_BLUEPRINTS; -} - -module.exports = function (context) { - let canUseTypeScript = canEmitTypeScript(); - if (canUseTypeScript) { - typescriptBlueprintPolyfill(context); - } else { - // Use the plain old JS templates from before - context.path = context.path.replace('blueprints', 'blueprints-js'); - } - return canUseTypeScript; -}; diff --git a/blueprints/acceptance-test/index.js b/blueprints/acceptance-test/index.js index 0f70417307e..8e162278770 100644 --- a/blueprints/acceptance-test/index.js +++ b/blueprints/acceptance-test/index.js @@ -5,7 +5,7 @@ const path = require('path'); const pathUtil = require('ember-cli-path-utils'); const stringUtils = require('ember-cli-string-utils'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); const { modulePrefixForProject } = require('../-utils'); const useTestFrameworkDetector = require('../test-framework-detector'); @@ -16,7 +16,7 @@ module.exports = useTestFrameworkDetector({ init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, locals: function (options) { diff --git a/blueprints/component-addon/index.js b/blueprints/component-addon/index.js index 1550b25c886..36d34589cb3 100644 --- a/blueprints/component-addon/index.js +++ b/blueprints/component-addon/index.js @@ -5,18 +5,9 @@ const stringUtil = require('ember-cli-string-utils'); const getPathOption = require('ember-cli-get-component-path-option'); const normalizeEntityName = require('ember-cli-normalize-entity-name'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); - module.exports = { description: 'Generates a component.', - shouldTransformTypeScript: true, - - init() { - this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); - }, - fileMapTokens: function () { return { __path__: function (options) { diff --git a/blueprints/component-class-addon/index.js b/blueprints/component-class-addon/index.js index 16df092bdb0..1ec2bbb5288 100644 --- a/blueprints/component-class-addon/index.js +++ b/blueprints/component-class-addon/index.js @@ -5,18 +5,9 @@ const stringUtil = require('ember-cli-string-utils'); const getPathOption = require('ember-cli-get-component-path-option'); const normalizeEntityName = require('ember-cli-normalize-entity-name'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); - module.exports = { description: 'Generates a component class.', - shouldTransformTypeScript: true, - - init() { - this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); - }, - fileMapTokens: function () { return { __path__: function (options) { diff --git a/blueprints/component-class/index.js b/blueprints/component-class/index.js index d1245ec70e3..08690b9cef9 100644 --- a/blueprints/component-class/index.js +++ b/blueprints/component-class/index.js @@ -7,7 +7,7 @@ const normalizeEntityName = require('ember-cli-normalize-entity-name'); const { has } = require('@ember/edition-utils'); const { generateComponentSignature } = require('../-utils'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); const OCTANE = has('octane'); @@ -47,17 +47,10 @@ module.exports = { }, ], - /** - Flag to let us correctly handle the case where we are running against a - version of Ember CLI which does not support TS-based emit, and where we - therefore *must* not emit a `defaultExport` local which includes a type - parameter in the exported function call or class definition. - */ - _isUsingTS: false, - init() { this._super && this._super.init.apply(this, arguments); - this._isUsingTS = maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); + let isOctane = has('octane'); this.availableOptions.forEach((option) => { @@ -132,21 +125,13 @@ module.exports = { break; case '@glimmer/component': importComponent = `import Component from '@glimmer/component';`; - if (this._isUsingTS) { - componentSignature = generateComponentSignature(classifiedModuleName); - defaultExport = `class ${classifiedModuleName} extends Component<${classifiedModuleName}Signature> {}`; - } else { - defaultExport = `class ${classifiedModuleName} extends Component {}`; - } + componentSignature = generateComponentSignature(classifiedModuleName); + defaultExport = `class ${classifiedModuleName} extends Component<${classifiedModuleName}Signature> {}`; break; case '@ember/component/template-only': importComponent = `import templateOnly from '@ember/component/template-only';`; - if (this._isUsingTS) { - componentSignature = generateComponentSignature(classifiedModuleName); - defaultExport = `templateOnly<${classifiedModuleName}Signature>();`; - } else { - defaultExport = `templateOnly();`; - } + componentSignature = generateComponentSignature(classifiedModuleName); + defaultExport = `templateOnly<${classifiedModuleName}Signature>();`; break; } diff --git a/blueprints/component-test/index.js b/blueprints/component-test/index.js index 1e89db6e6b0..87341a99bd3 100644 --- a/blueprints/component-test/index.js +++ b/blueprints/component-test/index.js @@ -6,7 +6,7 @@ const isPackageMissing = require('ember-cli-is-package-missing'); const getPathOption = require('ember-cli-get-component-path-option'); const semver = require('semver'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); const { modulePrefixForProject } = require('../-utils'); const useTestFrameworkDetector = require('../test-framework-detector'); @@ -22,7 +22,7 @@ module.exports = useTestFrameworkDetector({ init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, availableOptions: [ diff --git a/blueprints/component/index.js b/blueprints/component/index.js index 66bd7d76cbd..65aecf5e90f 100644 --- a/blueprints/component/index.js +++ b/blueprints/component/index.js @@ -8,7 +8,7 @@ const normalizeEntityName = require('ember-cli-normalize-entity-name'); const { has } = require('@ember/edition-utils'); const { generateComponentSignature } = require('../-utils'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); const OCTANE = has('octane'); @@ -51,17 +51,10 @@ module.exports = { }, ], - /** - Flag to let us correctly handle the case where we are running against a - version of Ember CLI which does not support TS-based emit, and where we - therefore *must* not emit a `defaultExport` local which includes a type - parameter in the exported function call or class definition. - */ - _isUsingTS: false, - init() { this._super && this._super.init.apply(this, arguments); - this._isUsingTS = maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); + let isOctane = has('octane'); this.availableOptions.forEach((option) => { @@ -210,21 +203,13 @@ module.exports = { break; case '@glimmer/component': importComponent = `import Component from '@glimmer/component';`; - if (this._isUsingTS) { - componentSignature = generateComponentSignature(classifiedModuleName); - defaultExport = `class ${classifiedModuleName} extends Component<${classifiedModuleName}Signature> {}`; - } else { - defaultExport = `class ${classifiedModuleName} extends Component {}`; - } + componentSignature = generateComponentSignature(classifiedModuleName); + defaultExport = `class ${classifiedModuleName} extends Component<${classifiedModuleName}Signature> {}`; break; case '@ember/component/template-only': importComponent = `import templateOnly from '@ember/component/template-only';`; - if (this._isUsingTS) { - componentSignature = generateComponentSignature(classifiedModuleName); - defaultExport = `templateOnly<${classifiedModuleName}Signature>();`; - } else { - defaultExport = `templateOnly();`; - } + componentSignature = generateComponentSignature(classifiedModuleName); + defaultExport = `templateOnly<${classifiedModuleName}Signature>();`; break; } diff --git a/blueprints/controller-test/index.js b/blueprints/controller-test/index.js index 3d2b1f29f9f..7a7bddb27c9 100644 --- a/blueprints/controller-test/index.js +++ b/blueprints/controller-test/index.js @@ -5,7 +5,7 @@ const stringUtil = require('ember-cli-string-utils'); const useTestFrameworkDetector = require('../test-framework-detector'); const path = require('path'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); const { modulePrefixForProject } = require('../-utils'); module.exports = useTestFrameworkDetector({ @@ -15,7 +15,7 @@ module.exports = useTestFrameworkDetector({ init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, locals: function (options) { diff --git a/blueprints/controller/index.js b/blueprints/controller/index.js index 5a3280004ad..87802832a14 100644 --- a/blueprints/controller/index.js +++ b/blueprints/controller/index.js @@ -1,6 +1,6 @@ 'use strict'; -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); module.exports = { description: 'Generates a controller.', @@ -9,7 +9,7 @@ module.exports = { init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, normalizeEntityName: function (entityName) { diff --git a/blueprints/helper-test/index.js b/blueprints/helper-test/index.js index 8456913d99a..5a4f0c7a306 100644 --- a/blueprints/helper-test/index.js +++ b/blueprints/helper-test/index.js @@ -3,7 +3,7 @@ const isPackageMissing = require('ember-cli-is-package-missing'); const semver = require('semver'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); const { modulePrefixForProject } = require('../-utils'); const useTestFrameworkDetector = require('../test-framework-detector'); @@ -15,7 +15,7 @@ module.exports = useTestFrameworkDetector({ init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, fileMapTokens: function () { diff --git a/blueprints/helper/index.js b/blueprints/helper/index.js index 5965e7767cf..30735acc01d 100644 --- a/blueprints/helper/index.js +++ b/blueprints/helper/index.js @@ -2,7 +2,7 @@ const normalizeEntityName = require('ember-cli-normalize-entity-name'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); module.exports = { description: 'Generates a helper function.', @@ -11,7 +11,7 @@ module.exports = { init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, normalizeEntityName: function (entityName) { diff --git a/blueprints-js/initializer-addon/files/__root__/__path__/__name__.js b/blueprints/initializer-addon/files/__root__/__path__/__name__.js similarity index 100% rename from blueprints-js/initializer-addon/files/__root__/__path__/__name__.js rename to blueprints/initializer-addon/files/__root__/__path__/__name__.js diff --git a/blueprints/initializer-addon/files/__root__/__path__/__name__.ts b/blueprints/initializer-addon/files/__root__/__path__/__name__.ts deleted file mode 100644 index 79e541af69d..00000000000 --- a/blueprints/initializer-addon/files/__root__/__path__/__name__.ts +++ /dev/null @@ -1 +0,0 @@ -export { default, initialize } from '<%= modulePath %>'; diff --git a/blueprints/initializer-test/index.js b/blueprints/initializer-test/index.js index fd0ae11bd87..f17fd865020 100644 --- a/blueprints/initializer-test/index.js +++ b/blueprints/initializer-test/index.js @@ -3,7 +3,7 @@ const fs = require('fs'); const path = require('path'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); const { modulePrefixForProject } = require('../-utils'); const useTestFrameworkDetector = require('../test-framework-detector'); @@ -14,7 +14,7 @@ module.exports = useTestFrameworkDetector({ init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, fileMapTokens: function () { diff --git a/blueprints/initializer/index.js b/blueprints/initializer/index.js index 932cd98bd04..502d43444a8 100644 --- a/blueprints/initializer/index.js +++ b/blueprints/initializer/index.js @@ -1,6 +1,6 @@ 'use strict'; -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); module.exports = { description: 'Generates an initializer.', @@ -9,6 +9,6 @@ module.exports = { init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, }; diff --git a/blueprints-js/instance-initializer-addon/files/__root__/__path__/__name__.js b/blueprints/instance-initializer-addon/files/__root__/__path__/__name__.js similarity index 100% rename from blueprints-js/instance-initializer-addon/files/__root__/__path__/__name__.js rename to blueprints/instance-initializer-addon/files/__root__/__path__/__name__.js diff --git a/blueprints/instance-initializer-addon/files/__root__/__path__/__name__.ts b/blueprints/instance-initializer-addon/files/__root__/__path__/__name__.ts deleted file mode 100644 index 79e541af69d..00000000000 --- a/blueprints/instance-initializer-addon/files/__root__/__path__/__name__.ts +++ /dev/null @@ -1 +0,0 @@ -export { default, initialize } from '<%= modulePath %>'; diff --git a/blueprints/instance-initializer-test/index.js b/blueprints/instance-initializer-test/index.js index 53f87ae56ef..9fade3a2196 100644 --- a/blueprints/instance-initializer-test/index.js +++ b/blueprints/instance-initializer-test/index.js @@ -3,7 +3,7 @@ const fs = require('fs'); const path = require('path'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); const { modulePrefixForProject } = require('../-utils'); const useTestFrameworkDetector = require('../test-framework-detector'); @@ -14,7 +14,7 @@ module.exports = useTestFrameworkDetector({ init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, fileMapTokens: function () { diff --git a/blueprints/instance-initializer/index.js b/blueprints/instance-initializer/index.js index c8d4dacdd1c..5536937f610 100644 --- a/blueprints/instance-initializer/index.js +++ b/blueprints/instance-initializer/index.js @@ -1,6 +1,6 @@ 'use strict'; -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); module.exports = { shouldTransformTypeScript: true, @@ -9,6 +9,6 @@ module.exports = { init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, }; diff --git a/blueprints/route-addon/index.js b/blueprints/route-addon/index.js index 171cdeea2a9..f88a316f49a 100644 --- a/blueprints/route-addon/index.js +++ b/blueprints/route-addon/index.js @@ -4,18 +4,9 @@ const path = require('path'); const stringUtil = require('ember-cli-string-utils'); const inflector = require('inflection'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); - module.exports = { description: 'Generates import wrappers for a route and its template.', - shouldTransformTypeScript: true, - - init() { - this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); - }, - fileMapTokens: function () { return { __templatepath__: function (options) { diff --git a/blueprints/route-test/index.js b/blueprints/route-test/index.js index e546a8b13c3..afb0981bdc9 100644 --- a/blueprints/route-test/index.js +++ b/blueprints/route-test/index.js @@ -4,7 +4,7 @@ const path = require('path'); const stringUtil = require('ember-cli-string-utils'); const useTestFrameworkDetector = require('../test-framework-detector'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); const { modulePrefixForProject } = require('../-utils'); module.exports = useTestFrameworkDetector({ @@ -14,7 +14,7 @@ module.exports = useTestFrameworkDetector({ init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, availableOptions: [ diff --git a/blueprints/route/index.js b/blueprints/route/index.js index 6385b295762..dcf1e9c3a14 100644 --- a/blueprints/route/index.js +++ b/blueprints/route/index.js @@ -7,7 +7,7 @@ const stringUtil = require('ember-cli-string-utils'); const EmberRouterGenerator = require('ember-router-generator'); const SilentError = require('silent-error'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); module.exports = { description: 'Generates a route and a template, and registers the route with the router.', @@ -33,7 +33,7 @@ module.exports = { init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, fileMapTokens: function () { diff --git a/blueprints/service-test/index.js b/blueprints/service-test/index.js index 0dd10e1f9b0..765a622310c 100644 --- a/blueprints/service-test/index.js +++ b/blueprints/service-test/index.js @@ -1,6 +1,6 @@ 'use strict'; -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); const { modulePrefixForProject } = require('../-utils'); const useTestFrameworkDetector = require('../test-framework-detector'); @@ -11,7 +11,7 @@ module.exports = useTestFrameworkDetector({ init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, fileMapTokens() { diff --git a/blueprints/service/index.js b/blueprints/service/index.js index a5c8a75d545..056c2ae797e 100644 --- a/blueprints/service/index.js +++ b/blueprints/service/index.js @@ -1,6 +1,6 @@ 'use strict'; -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); module.exports = { description: 'Generates a service.', @@ -9,7 +9,7 @@ module.exports = { init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, normalizeEntityName: function (entityName) { diff --git a/blueprints/util-test/index.js b/blueprints/util-test/index.js index ebc7e416402..7cc016954c9 100644 --- a/blueprints/util-test/index.js +++ b/blueprints/util-test/index.js @@ -2,7 +2,7 @@ const path = require('path'); -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); const { modulePrefixForProject } = require('../-utils'); const useTestFrameworkDetector = require('../test-framework-detector'); @@ -13,7 +13,7 @@ module.exports = useTestFrameworkDetector({ init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, fileMapTokens() { diff --git a/blueprints/util/index.js b/blueprints/util/index.js index 69cb5d58df5..0e327fdcfbf 100644 --- a/blueprints/util/index.js +++ b/blueprints/util/index.js @@ -1,6 +1,6 @@ 'use strict'; -const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints'); +const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); module.exports = { description: 'Generates a simple utility module/function.', @@ -9,7 +9,7 @@ module.exports = { init() { this._super && this._super.init.apply(this, arguments); - maybePolyfillTypeScriptBlueprints(this); + typescriptBlueprintPolyfill(this); }, normalizeEntityName: function (entityName) { diff --git a/package.json b/package.json index 70f2059b691..0159a1a9e58 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "files": [ "build-metadata.json", "blueprints", - "blueprints-js", "dist/packages", "dist/dependencies", "dist/ember-template-compiler.js", @@ -54,9 +53,7 @@ "lint:eslint:fix": "npm-run-all \"lint:eslint --fix\"", "lint:fix": "npm-run-all lint:*:fix", "test": "node bin/run-tests.js", - "test:blueprints:js": "EMBER_TYPESCRIPT_BLUEPRINTS=false pnpm test:blueprints:ts", - "test:blueprints:ts": "mocha node-tests/blueprints/**/*-test.js", - "test:blueprints": "pnpm test:blueprints:js && pnpm test:blueprints:ts", + "test:blueprints": "mocha node-tests/blueprints/**/*-test.js", "test:node": "qunit tests/node/**/*-test.js", "test:browserstack": "node bin/run-browserstack-tests.js", "test:wip": "vite build --mode development --minify false && testem ci",