Skip to content
Open
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
14 changes: 12 additions & 2 deletions lib/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ function getConfigPath(cwd) {
return possibleConfigPath;
}

let cjsPath = path.join('config', 'ember-try.cjs');

if (fs.existsSync(cjsPath)) {
debug(`using config from config/ember-try.cjs`);

return cjs;
}

debug('using config from config/ember-try.js');

return path.join('config', 'ember-try.js');
Expand Down Expand Up @@ -53,7 +61,7 @@ async function getBaseConfig(options) {
return await mergeAutoConfigAndConfigFileData(autoConfig, data);
} else {
throw new Error(
'No ember-try configuration found. Please see the README for configuration options',
'No ember-try configuration found. Please see the README for configuration options'
);
}
}
Expand All @@ -69,7 +77,9 @@ async function config(options) {

if (typeof configData[oldOption] === 'boolean') {
warn(
`${prefix('ember-try DEPRECATION')} The \`${oldOption}\` config option is deprecated. Please use \`packageManager: '${name}'\` instead.`,
`${prefix(
'ember-try DEPRECATION'
)} The \`${oldOption}\` config option is deprecated. Please use \`packageManager: '${name}'\` instead.`
);

delete configData[oldOption];
Expand Down