-
Notifications
You must be signed in to change notification settings - Fork 108
Add Ember #2438
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
base: main
Are you sure you want to change the base?
Add Ember #2438
Changes from 15 commits
31f505d
39477c0
7950a1f
72b45a9
3d753f6
54c8b18
8d42ade
aa76cd3
b4fe3a5
b0e04cd
5b1f10a
9bc9d60
e5fe391
8f6905d
afcc1cd
d804db9
93dd895
72f4bec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# compiled output | ||
/dist/ | ||
/declarations/ | ||
|
||
# dependencies | ||
/node_modules/ | ||
|
||
# misc | ||
/.env* | ||
/.pnp* | ||
/.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/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# unconventional js | ||
/blueprints/*/files/ | ||
|
||
# compiled output | ||
/dist/ | ||
|
||
# misc | ||
/coverage/ | ||
!.* | ||
.*/ | ||
|
||
# ember-try | ||
/.node_modules.ember-try/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict"; | ||
|
||
module.exports = { | ||
plugins: ["prettier-plugin-ember-template-tag"], | ||
overrides: [ | ||
{ | ||
files: "*.{js,gjs,ts,gts,mjs,mts,cjs,cts}", | ||
options: { | ||
singleQuote: true, | ||
templateSingleQuote: false, | ||
}, | ||
}, | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
extends: "recommended", | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"ignore_dirs": ["dist"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const { buildMacros } = require('@embroider/macros/babel'); | ||
|
||
const macros = buildMacros(); | ||
|
||
module.exports = { | ||
plugins: [ | ||
[ | ||
'babel-plugin-ember-template-compilation', | ||
{ | ||
compilerPath: 'ember-source/dist/ember-template-compiler.js', | ||
enableLegacyModules: ['ember-cli-htmlbars'], | ||
transforms: [...macros.templateMacros], | ||
}, | ||
], | ||
[ | ||
'module:decorator-transforms', | ||
{ | ||
runtime: { | ||
import: require.resolve('decorator-transforms/runtime-esm'), | ||
}, | ||
}, | ||
], | ||
[ | ||
'@babel/plugin-transform-runtime', | ||
{ | ||
absoluteRuntime: __dirname, | ||
useESModules: true, | ||
regenerator: false, | ||
}, | ||
], | ||
...macros.babelMacros, | ||
], | ||
|
||
generatorOpts: { | ||
compact: false, | ||
}, | ||
}; |
NullVoxPopuli marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"schemaVersion":"1.0.0","packages":[{"name":"@embroider/app-blueprint","version":"0.11.0","blueprints":[{"name":"@embroider/app-blueprint","isBaseBlueprint":true,"options":["--package-manager pnpm"]}]}]} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ember } from 'ember-eslint'; | ||
|
||
export default [ | ||
...ember.recommended(import.meta.dirname), | ||
]; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>AppTemplate</title> | ||
<meta name="description" content="" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
</head> | ||
<body> | ||
<script src="/@embroider/core/vendor.js"></script> | ||
<script type="module"> | ||
import Application from "#src/app"; | ||
import environment from "#config"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here and elsewhere, what do these nonstandard import specifiers that start with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just how package.json#imports works. A super helpful feature when you enable type=module. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are standard: https://nodejs.org/api/packages.html#subpath-imports |
||
|
||
Application.create(environment.APP); | ||
</script> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"success": 32, | ||
"failed": 0, | ||
"skipped": 0, | ||
"error": false, | ||
"disconnected": false, | ||
"exitCode": 0, | ||
"score": 100, | ||
"basicSupport": { | ||
"total": 16, | ||
"failed": 0, | ||
"passed": 16 | ||
}, | ||
"advancedSupport": { | ||
"total": 16, | ||
"failed": 0, | ||
"passed": 16 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<h4 id="ember-handling-data">Handling data</h4> | ||
|
||
Because attributes must be strings, Ember requires that, if an attribute is desired, | ||
its value be a string, otherwise data is passed as properties to the element instance. | ||
|
||
<h4 id="ember-handling-events">Handling events</h4> | ||
|
||
Ember can listen to native DOM events dispatched from Custom Elements. | ||
It supports all styles of events (lowercase, camelCase, kebab-case, etc). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"name": "ember-cee-app", | ||
"version": "0.0.0", | ||
"private": true, | ||
NullVoxPopuli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"description": "Small description for ember-cee-app goes here", | ||
"repository": "", | ||
"type": "module", | ||
"library_repo": "emberjs/ember.js", | ||
"license": "MIT", | ||
"author": "NullVoxPopuli", | ||
"scripts": { | ||
"test": "wireit", | ||
"build": "wireit", | ||
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"", | ||
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\"", | ||
"lint:hbs": "ember-template-lint .", | ||
"lint:hbs:fix": "ember-template-lint . --fix", | ||
"lint:js": "eslint . --cache", | ||
"lint:js:fix": "eslint . --fix", | ||
"start": "vite", | ||
"vite:build": "vite build", | ||
"test:ember": "cross-env NODE_ENV=development vite build --mode test && ember test --path dist --config-file ./testem.cjs" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.26.9", | ||
"@babel/plugin-transform-runtime": "^7.26.9", | ||
"@ember/test-helpers": "^5.1.0", | ||
"@embroider/core": "^4.0.0-alpha.6", | ||
"@embroider/macros": "^1.17.0-alpha.5", | ||
"@embroider/router": "^3.0.0-alpha.1", | ||
"@embroider/vite": "^1.0.0-alpha.7", | ||
"@glimmer/component": "^2.0.0", | ||
"@rollup/plugin-babel": "^6.0.4", | ||
"babel-plugin-ember-template-compilation": "^2.3.0", | ||
"concurrently": "^9.1.2", | ||
"cross-env": "^7.0.3", | ||
"decorator-transforms": "^2.3.0", | ||
"ember-cli": "^6.2.2", | ||
"ember-eslint": "^0.2.1", | ||
"ember-modifier": "^4.2.0", | ||
"ember-qunit": "^9.0.1", | ||
"ember-resolver": "^13.1.0", | ||
"ember-source": "^6.2.0", | ||
"ember-template-lint": "^7.0.1", | ||
"eslint": "^9.21.0", | ||
"prettier": "^3.5.3", | ||
"prettier-plugin-ember-template-tag": "^2.0.4", | ||
"qunit": "^2.24.1", | ||
"qunit-dom": "^3.4.0", | ||
"tracked-built-ins": "^4.0.0", | ||
"vite": "^6.0.0", | ||
"webcomponents": "link:../__shared__/webcomponents", | ||
"wireit": "^0.14.11" | ||
}, | ||
"engines": { | ||
"node": ">= 18" | ||
}, | ||
"ember": { | ||
"edition": "octane" | ||
}, | ||
"ember-addon": { | ||
"type": "app", | ||
"version": 2 | ||
}, | ||
"imports": { | ||
"#src/*": "./src/*", | ||
"#config": "./src/config.js", | ||
"#components/*": "./src/components/*" | ||
}, | ||
"exports": { | ||
"./tests/*": "./tests/*", | ||
"./*": "./src/*" | ||
}, | ||
"wireit": { | ||
"test": { | ||
"files": [ | ||
"babel.config.cjs", | ||
"vite.config.js", | ||
"src", | ||
"config", | ||
"tests", | ||
"meta" | ||
], | ||
"output": [ | ||
"results" | ||
], | ||
"command": "cross-env LIBRARY_NAME=ember pnpm test:ember || echo ''" | ||
}, | ||
"build": { | ||
"dependencies": [ | ||
"test" | ||
] | ||
} | ||
}, | ||
"dependencies": { | ||
"qunit-theme-ember": "^1.0.0" | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.