Skip to content

Commit 690ae97

Browse files
committed
progress
1 parent a1c6eb3 commit 690ae97

File tree

6 files changed

+38
-18
lines changed

6 files changed

+38
-18
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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { pageTitle } from 'ember-page-title';
2+
<% if (welcome) {%>import { WelcomePage } from 'ember-welcome-page';<% } %>
3+
4+
<template>
5+
{{pageTitle "<%= namespace %>"}}<% if (welcome) { %>
6+
7+
{{outlet}}
8+
9+
{{! The following component displays Ember's default welcome message. }}
10+
<WelcomePage />
11+
{{! Feel free to remove this! }}<% } else { %>
12+
<h2 id="title">Welcome to Ember</h2>
13+
14+
{{outlet}}<% } %>
15+
</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) { %>
Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
1-
import { pageTitle } from 'ember-page-title';
2-
<% if (welcome) {%>import { WelcomePage } from 'ember-welcome-page';<% } %>
3-
41
<template>
5-
{{pageTitle "<%= namespace %>"}}<% if (welcome) { %>
6-
2+
<h1>Welcome to Ember.js</h1>
3+
74
{{outlet}}
8-
9-
{{! The following component displays Ember's default welcome message. }}
10-
<WelcomePage />
11-
{{! Feel free to remove this! }}<% } else { %>
12-
<h2 id="title">Welcome to Ember</h2>
13-
14-
{{outlet}}<% } %>
155
</template>

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)