This is fancy application or library description.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| const EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
| module.exports = function (defaults) { | |
| let app = new EmberApp(defaults, {}); | |
| // we need to add emebr-template-compiler into runtime | |
| app.import('node_modules/ember-source/dist/ember-template-compiler.js'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let EmberCore; | |
| try { | |
| EmberCore = requireModule('ember')['default']; | |
| } catch { | |
| EmberCore = window.Ember; | |
| } | |
| const keys = ['application','engine']; | |
| //const isEmberApp = (el) => el._debugContainerKey && keys.includes(el._debugContainerKey.split(':')[0]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SecondComponent from 'foo/bar'; | |
| function MyComponent(args) { return { a: 1, b: 2, c: args.e } } | |
| function hasHelperManagerFor() { | |
| return true; | |
| } | |
| function hasComponentManagerFor() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Component from '@glimmer/component'; | |
| import { tracked } from '@glimmer/tracking'; | |
| class ReactivePart { | |
| constructor(placeholder) { | |
| this.value = placeholder.replace('{{', '').replace('}}',''); | |
| this.placeholder = placeholder; | |
| } | |
| get isEditable() { | |
| return this.placeholder.startsWith('{{'); |
[
[ 'open-element', 'div ' ],
[ 'open-mustache', 'foo-bar' ],
[ 'close-mustache', ' ' ],
[ 'self-close-element', '' ],
[ 'in-element', '' ],
[ 'open-element', 'a' ],
[ 'in-element', '' ],
[ 'open-mustache', 'boo' ],
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Component from '@glimmer/component'; | |
| export default class extends Component { | |
| get items() { | |
| return this.args.foo.length; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Component from "@glimmer/component"; | |
| import { helper } from "@ember/component/helper"; | |
| import { setComponentTemplate } from "@ember/component"; | |
| import { hbs as tpl } from "ember-cli-htmlbars"; | |
| function asHelper(a, b, c) { | |
| return { | |
| value: helper(function (positional) { | |
| return c.value.call(a, ...positional); | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Controller from '@ember/controller'; | |
| import { action } from '@ember/object'; | |
| import { tracked } from '@glimmer/tracking'; | |
| import { schedule } from '@ember/runloop'; | |
| export default class ApplicationController extends Controller { | |
| queryParams = ['inputValue']; | |
| @tracked _inputValue = ''; | |