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 ApplicationInstance from '@ember/application/instance'; | |
| export function initialize(appInstance: ApplicationInstance): void { | |
| const fastboot = appInstance.lookup('service:fastboot'); | |
| const apolloCache = appInstance.lookup('service:apollo').client.cache; | |
| const shoebox = fastboot.get('shoebox'); | |
| if (fastboot.get('isFastBoot')) { | |
| shoebox.put('apollo-cache', { | |
| get cache(): unknown { |
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'); | |
| const env = EmberApp.env(); | |
| const purgecssOptions = { | |
| content: ['./app/index.html', './app/**/*.hbs', './node_modules/**/*.hbs'], | |
| defaultExtractor: (content) => { | |
| return content.match(/[A-Za-z0-9-_:/]+/g) || []; | |
| }, |
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 ApolloService from 'ember-apollo-client/services/apollo'; | |
| import { persistCache } from 'apollo-cache-persist'; | |
| class OverriddenApollo extends ApolloService { | |
| async init() { | |
| await persistCache({ | |
| this.cache(), | |
| storage: window.localStorage, | |
| }); |
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 ApolloService from 'ember-apollo-client/services/apollo'; | |
| import { tracked } from '@glimmer/tracking'; | |
| import { resource } from 'ember-usable'; | |
| import { inject as service } from '@ember/service'; | |
| import { getOwner } from '@ember/application'; | |
| import { | |
| ApolloQueryResult, | |
| NetworkStatus, | |
| OperationVariables, | |
| DocumentNode, |
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
| const Docfy = require('@docfy/core'); | |
| const getConfig = require('@docfy/ember/lib/get-config').default; | |
| const config = getConfig(__dirname); | |
| (async function () { | |
| const docfy = new Docfy(config); | |
| const result = await docfy.run(config.sources); | |
| let totalDemoComponents = 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 { getOwner } from '@ember/application'; | |
| import type RouterService from '@ember/routing/router-service'; | |
| function useService<T = unknown>(ctx: object, name: string): T { | |
| return getOwner(ctx).lookup(`service:${name}`) as T; | |
| } | |
| function ref<T = unknown>(initialValue: T): Ref<T> { | |
| return new Ref<T>(initialValue); | |
| } |
OlderNewer