- new ember app &
yarn install
ember install ember-cli-eslint@4
// ember-cli-build.js
let app = new EmberApp(defaults, {
eslint: {
testGenerator: 'qunit',
group: true,
rulesDir: 'eslint-rules',
extensions: ['js'],
// The global revision clock. Every time state changes, the clock increments. | |
let $REVISION = 0; | |
// The current dependency tracker. Whenever we compute a cache, we create a Set | |
// to track any dependencies that are used while computing. If no cache is | |
// computing, then the tracker is null. | |
let CURRENT_TRACKER = null; | |
// Storage represents a root value in the system - the actual state of our app. | |
class Storage { |
import { Yieldable } from 'ember-concurrency'; | |
import fetch from 'fetch'; // i.e. ember-fetch. could also use native fetch too. | |
class FetchYieldable extends Yieldable { | |
constructor(url, opts = {}) { | |
super(...arguments); | |
this.url = url; | |
this.opts = opts; | |
} |
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); | |
const { Webpack } = require('@embroider/webpack'); | |
module.exports = function (defaults) { | |
let app = new EmberAddon(defaults, {}); | |
return require('@embroider/compat').compatBuild(app, Webpack, { | |
packagerOptions: { | |
webpackConfig: require('./webpack.config'), | |
}, |
import { TrackedWeakMap } from 'tracked-built-ins'; | |
function localCopy(target, key) { | |
let values = new TrackedWeakMap(); | |
let lastValues = new WeakMap(); | |
return { | |
get() { | |
let incoming = this.args[key]; | |
let lastValue = lastValues.get(this); |
// app/adapters/application.js | |
import DS from 'ember-data'; | |
import { inject as service } from '@ember-decorators/service'; | |
const { RESTAdapter } = DS; | |
export default class ApplicationAdapter extends RESTAdapter { | |
@service fastboot; | |
@service shoebox; |
/* | |
'plugin:prettier/recommended' does the following: | |
extends: ['prettier'], | |
plugins: ['prettier'], | |
rules: { | |
'prettier/prettier': 'error' | |
} | |
*/ | |
module.exports = { |
yarn install
ember install ember-cli-eslint@4
// ember-cli-build.js
let app = new EmberApp(defaults, {
eslint: {
testGenerator: 'qunit',
group: true,
rulesDir: 'eslint-rules',
extensions: ['js'],
Fastboot is currently transitioning to version 1.0 which introduces some breaking changes. The most pressing issue is that the approach previously suggested for handling dependencies in addons has changed.
This post has a bit of background of how Ember CLI and addons work followed by some details on how to migrate addons to the new Fastboot v1.0 structure.
TODO: basic package.json
, bower.json
, ember install
and ember-cli-build.js
/app.import
.touchZone::after | |
content ' ' | |
display block | |
width 100% | |
height 100% | |
z-index 100 | |
top 0 | |
position absolute |