Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use the new load initializers and resolver #86

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions files-override/js/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,10 @@ import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

let d = window.define;

for (const [name, module] of Object.entries(compatModules)) {
d(name, function () {
return module;
});
}

export default class App extends Application {
modulePrefix = config.modulePrefix;
podModulePrefix = config.podModulePrefix;
Resolver = Resolver;
Resolver = Resolver.withModules(compatModules);
}

loadInitializers(App, config.modulePrefix);
loadInitializers(App, config.modulePrefix, compatModules);
16 changes: 6 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ module.exports = {
...Object.keys(manifest.devDependencies || {}),
];

let ensureLatestDeps = [
'eslint',
'eslint-plugin-ember',
'eslint-plugin-n',
'@babel/eslint-parser',
];

// this.addPackagesToProject doesn't respect the packageManager that the blueprint specified 🙈 so we're skipping a level here
let installTask = this.taskFor('npm-install');
let uninstallTask = this.taskFor('npm-uninstall');
Expand All @@ -68,8 +61,6 @@ module.exports = {
'ember-cli-dependency-checker',
'ember-cli-sri',
'ember-cli-terser',

...ensureLatestDeps,
// Linting
'@babel/plugin-proposal-decorators',
].filter((depToRemove) => existingDeps.includes(depToRemove)),
Expand All @@ -89,7 +80,12 @@ module.exports = {
'@rollup/plugin-babel',
'decorator-transforms',

...ensureLatestDeps,
'eslint@latest',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should improve package-manager-management time 🎉

'eslint-plugin-ember@latest',
'eslint-plugin-n@latest',
'@babel/eslint-parser@latest',
'ember-resolver@latest',
'ember-load-initializers@latest',
// Needed for eslint
'globals',
'babel-plugin-ember-template-compilation',
Expand Down
Loading