Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minimal app template #2205

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module.exports = {
files: ['tests/**/*'],
rules: {
'node/no-missing-require': 'off',
'import/no-extraneous-dependencies': 'off',
},
},
],
Expand Down
11 changes: 10 additions & 1 deletion packages/compat/src/resolver-transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,23 @@ class TemplateResolver implements ASTPlugin {
}

private get staticComponentsEnabled(): boolean {
if (!this.config?.options) {
return true;
}
return this.config.options.staticComponents || Boolean(this.auditHandler);
}

private get staticHelpersEnabled(): boolean {
if (!this.config?.options) {
return true;
}
return this.config.options.staticHelpers || Boolean(this.auditHandler);
}

private get staticModifiersEnabled(): boolean {
if (!this.config?.options) {
return true;
}
return this.config.options.staticModifiers || Boolean(this.auditHandler);
}

Expand All @@ -349,7 +358,7 @@ class TemplateResolver implements ASTPlugin {
// we're not responsible for filtering out rules for inactive packages here,
// that is done before getting to us. So we should assume these are all in
// force.
for (let rule of this.config.activePackageRules) {
for (let rule of this.config?.activePackageRules ?? []) {
if (rule.components) {
for (let [snippet, rules] of Object.entries(rule.components)) {
let processedRules = preprocessComponentRule(rules);
Expand Down
203 changes: 202 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions tests/app-template-minimal/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false

[*.{diff,md}]
trim_trailing_whitespace = false
15 changes: 15 additions & 0 deletions tests/app-template-minimal/.ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": false
}
26 changes: 26 additions & 0 deletions tests/app-template-minimal/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# compiled output
/dist/

# dependencies
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/connect.lock
/.eslintcache
/coverage/
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/
3 changes: 3 additions & 0 deletions tests/app-template-minimal/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["dist"]
}
Loading
Loading