-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #913 from thoov/marco-babel-cache-busting
- Loading branch information
Showing
14 changed files
with
180 additions
and
29 deletions.
There are no files selected for viewing
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
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
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
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
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
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
import Controller from '@ember/controller'; | ||
import { getOwnConfig, isTesting, isDevelopingApp } from '@embroider/macros'; | ||
import { getOwnConfig, isTesting, isDevelopingApp, macroCondition, dependencySatisfies } from '@embroider/macros'; | ||
|
||
export default class Application extends Controller { | ||
constructor() { | ||
super(...arguments); | ||
this.mode = getOwnConfig()['mode']; | ||
this.isTesting = isTesting(); | ||
this.isDeveloping = isDevelopingApp(); | ||
|
||
if (macroCondition(dependencySatisfies('lodash', '^4'))) { | ||
this.lodashVersion = 'four'; | ||
} else { | ||
this.lodashVersion = 'three'; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<div data-test-mode>{{this.mode}}</div> | ||
<div data-test-count>{{macroGetOwnConfig "count"}}</div> | ||
<div>isDeveloping: <span data-test-developing>{{this.isDeveloping}}</span></div> | ||
<div>isTesting: <span data-test-testing>{{this.isTesting}}</span></div> | ||
<div>isTesting: <span data-test-testing>{{this.isTesting}}</span></div> | ||
<div data-test-version>{{this.lodashVersion}}</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
'use strict'; | ||
|
||
module.exports = function (environment) { | ||
let ENV = { | ||
modulePrefix: 'app-template', | ||
environment, | ||
rootURL: '/', | ||
locationType: 'auto', | ||
EmberENV: { | ||
FEATURES: { | ||
// Here you can enable experimental features on an ember canary build | ||
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true | ||
}, | ||
EXTEND_PROTOTYPES: { | ||
// Prevent Ember Data from overriding Date.parse. | ||
Date: false, | ||
}, | ||
}, | ||
|
||
APP: { | ||
// Here you can pass flags/options to your application instance | ||
// when it is created | ||
}, | ||
LODASH_VERSION: process.env.LODASH_VERSION || 'four', | ||
}; | ||
|
||
if (environment === 'development') { | ||
// ENV.APP.LOG_RESOLVER = true; | ||
// ENV.APP.LOG_ACTIVE_GENERATION = true; | ||
// ENV.APP.LOG_TRANSITIONS = true; | ||
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true; | ||
// ENV.APP.LOG_VIEW_LOOKUPS = true; | ||
} | ||
|
||
if (environment === 'test') { | ||
// Testem prefers this... | ||
ENV.locationType = 'none'; | ||
|
||
// keep test console output quieter | ||
ENV.APP.LOG_ACTIVE_GENERATION = false; | ||
ENV.APP.LOG_VIEW_LOOKUPS = false; | ||
|
||
ENV.APP.rootElement = '#ember-testing'; | ||
ENV.APP.autoboot = false; | ||
} | ||
|
||
if (environment === 'production') { | ||
// here you can enable a production-specific feature | ||
} | ||
|
||
return ENV; | ||
}; |
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
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
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
Oops, something went wrong.