Skip to content

Commit

Permalink
Merge pull request #86 from embroider-build/less-amd
Browse files Browse the repository at this point in the history
use the new load initializers and resolver
  • Loading branch information
NullVoxPopuli authored Sep 26, 2024
2 parents 1743eb5 + 0220887 commit d976075
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
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',
'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

0 comments on commit d976075

Please sign in to comment.