Skip to content

Commit

Permalink
We need to figure out the @babel/core problem
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jul 16, 2022
1 parent 5e701ad commit 2092db9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 8 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ module.exports = {

let tasks = [
this.updateTestAppPackageJson(path.join(testAppPath, 'package.json')),
this.overrideTestAppFiles(
testAppInfo.location,
path.join(options.target, 'test-app-overrides')
),
this.overrideTestAppFiles(testAppPath, path.join(options.target, 'test-app-overrides')),
fs.unlink(path.join(testAppPath, '.travis.yml')),
];

Expand All @@ -68,7 +65,9 @@ module.exports = {
);

if (options.pnpm) {
content = `packages:\n` + ` - '${addonInfo.location}'\n` + ` - '${testAppInfo.location}'\n`;
let content =
`packages:\n` + ` - '${addonInfo.location}'\n` + ` - '${testAppInfo.location}'\n`;

await fs.writeFile(path.join(options.target, 'pnpm-workspace.yaml'), content);
}

Expand All @@ -92,7 +91,7 @@ module.exports = {
},

async overrideTestAppFiles(testAppPath, overridesPath) {
// we cannot us fs.move, as it will replace the directory, removing the other files of the app blueprint
// we cannot us fs.move, as it will replace the directory, removing the other files of the app blueprin
// but fs.copy works as we need it. Just have to remove the overrides directory afterwards.
await fs.copy(overridesPath, testAppPath, {
overwrite: true,
Expand Down Expand Up @@ -134,6 +133,7 @@ module.exports = {
[
options.welcome && '"--welcome"',
options.yarn && '"--yarn"',
options.pnpm && '"--pnpm"',
options.ciProvider && `"--ci-provider=${options.ciProvider}"`,
]
.filter(Boolean)
Expand All @@ -149,6 +149,8 @@ module.exports = {
// emberCLIVersion: require('../../package').version,
year: date.getFullYear(),
yarn: options.yarn,
pnpm: options.pnpm,
npm: options.npm,
welcome: options.welcome,
blueprint: 'addon',
blueprintOptions,
Expand Down
2 changes: 2 additions & 0 deletions tests/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ describe('ember addon <the addon> -b <this blueprint>', () => {
beforeAll(async () => {
tmpDir = await createTmp();

console.debug(`Using ${tmpDir}`);

let { name } = await createAddon({
args: [`--${packageManager}=true`],
options: { cwd: tmpDir },
Expand Down

0 comments on commit 2092db9

Please sign in to comment.