-
This shows the steps needed to get Ember Simple Auth to work with Ember Engines as if they are the same application
-
Things to note
- engine login page needs to
transitionToExternal('login')
- login has to be passed in as an external route to the engine
- session and cookie services both need to be passed into engine
- sessionAuthenticated function needs to be overwritten in the Application Controller of the Engine
- engine login page needs to
-
in /app/app.js add to const engines object { [Engine Name]: dependencies }
This file contains 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
#!/usr/bin/env bash | |
set -euo pipefail | |
# Installation Instructions: | |
# -------------------------- | |
# Prerequisites: | |
# 1. Ensure you have Homebrew installed. If not, install it with: | |
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
# | |
# 2. Install the following image optimization tools and dependencies using Homebrew: |
This file contains 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
$(document).ready(function () { | |
var navbar = $('.navbar'); | |
var navbara = $('.navbar a:not([href="~/"])'); | |
var navbarh1 = $('.navbar h1'); | |
var footer = $('.footer-bottom'); | |
var footerp = $('.footer-bottom p'); | |
var inputGroupInput = $('.input-group input'); | |
var buttonGroupButton = $('.input-group-btn:last-child>.btn'); | |
var button = $('button, a.btn, a.btn-submit, input[type="button"], input[type="submit"]'); | |
var inputText = $('input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="tel"], input[type="url"], input[type="search"], input[type="date"], input[type="month"], input[type="week"], input[type="time"], input[type="datetime"], input[type="datetime-local"], input[type="color"], input[type="range"], input[type="file"], input[type="image"], input[type="reset"], input[type="button"], input[type="submit"], textarea'); |
This file contains 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 Service from '@ember/service'; | |
const has = () => true; | |
const { console, WeakMap, Proxy, Symbol } = window; | |
const get = (target, key) => key === Symbol.unscopables ? undefined : target[key]; | |
export default Service.extend({ |
This file contains 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
#!/usr/bin/node | |
const fs = require('fs'); | |
const path = require('path'); | |
const AWS = require('aws-sdk'); | |
const Promise = require('bluebird'); | |
const imagemin = require('imagemin'); | |
const imageminJpegRecompress = require('imagemin-jpeg-recompress'); | |
const config = { |
This file contains 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
#!/usr/bin/env bash | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Some apps don't have a cask and so still need to be installed by hand. These | |
# include: | |
# | |
# Notes: |
This file contains 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
options: ['oranges', 'apples', 'pears'] | |
}); |
This file contains 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'; | |
module.exports = function(environment) { | |
let ENV = { | |
modulePrefix: 'zero-cost-web-app', | |
environment, | |
rootURL: '/', | |
locationType: 'auto', | |
EmberENV: { | |
FEATURES: { |
This file contains 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 sort from 'fast-sort'; | |
import { JSONAPISerializer } from 'ember-cli-mirage'; | |
const stringToBoolean = (str) => | |
({ 'true': true, 'false': false }[str?.trim().toLowerCase()] || str); | |
export default class Application extends JSONAPISerializer { | |
// Can filter by any value on attributes | |
// Or an ID on a relationship that MUST be in the `includes` | |
filterResourceHash(resourceHash) { |
This file contains 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 { Store } from 'ember-orbit'; | |
export default class DataStore extends Store { | |
findRecords(type, { filter, sort, page, include, ...options } = {}) { | |
include && put(options, 'sources.remote.include', include); | |
return this.query((q) => { | |
let result = q.findRecords(type); | |
page && (result = result.page(page)); |
NewerOlder