Skip to content

Commit 5d34dde

Browse files
committed
progress
1 parent 35684ef commit 5d34dde

File tree

6 files changed

+29
-6
lines changed

6 files changed

+29
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/node_modules/
2+
/my-app/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
<template>
3+
<h1>Welcome to Ember</h1>
4+
5+
{{outlet}}
6+
7+
</template>

conditional-files/no-compat/app/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<% if (warpDrive) { %>import '@warp-drive/ember/install';
2-
import Application from 'ember-strict-application-resolver';
2+
<% } %>import Application from 'ember-strict-application-resolver';
33
import config from '<%= modulePrefix %>/config/environment';<% if (notMinimal) { %>
4-
import { importSync, isDevelopingApp, macroCondition } from '@embroider/macros';< } %>
4+
import { importSync, isDevelopingApp, macroCondition } from '@embroider/macros';<% } %>
55
import setupInspector from '@embroider/legacy-inspector-support/ember-source-4.12';
66

77
<% if (notMinimal) { %>

files/app/templates/application.gts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { pageTitle } from 'ember-page-title';
22
<% if (welcome) {%>import { WelcomePage } from 'ember-welcome-page';<% } %>
33

4+
45
<template>
56
{{pageTitle "<%= namespace %>"}}<% if (welcome) { %>
67

index.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const replacers = {
3131
return ejs.render(raw, locals);
3232
}
3333

34-
return contents;
34+
return ejs.render(contents, locals);
3535
},
3636
'app/config/environment.ts'(locals, contents) {
3737
if (locals.noCompat) {
@@ -44,7 +44,20 @@ const replacers = {
4444
return ejs.render(raw, locals);
4545
}
4646

47-
return contents;
47+
return ejs.render(contents, locals);
48+
},
49+
'app/templates/application.gts'(locals, contents) {
50+
if (locals.minimal) {
51+
let filePath = join(
52+
CONDITIONAL_FILES,
53+
'minimal',
54+
'app/templates/application.gts',
55+
);
56+
let raw = readFileSync(filePath).toString();
57+
return ejs.render(raw, locals);
58+
}
59+
60+
return ejs.render(contents, locals);
4861
},
4962
'package.json'(...args) {
5063
return this.updatePackageJson(...args);
@@ -61,7 +74,7 @@ const replacers = {
6174
let prefix = locals.typescript ? '_ts_' : '_js_';
6275

6376
let filePath = join(
64-
[
77+
...[
6578
CONDITIONAL_FILES,
6679
locals.noCompat && 'no-compat',
6780
prefix + 'babel.config.mjs',

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"lint:eslint": "eslint .",
1919
"lint:prettier": "prettier . --check",
2020
"format": "prettier . --write",
21-
"test": "vitest"
21+
"test": "vitest",
22+
"new:app": "pnpm dlx ember-cli@latest new my-app --blueprint ."
2223
},
2324
"release-plan": {
2425
"semverIncrementAs": {

0 commit comments

Comments
 (0)