mirror of
https://github.com/status-im/consul.git
synced 2025-01-12 06:44:41 +00:00
9da8ad8f3d
Upgrade all patch and minor upgradeable packages, also uses `only` in ember-cli-build to reduce the included helpers from certain helper packages. Make some major version upgrades for some dev tools - husky - lint-staged - ember-cli-yadda - ember-cli-sass (also moved from node-sass to dart-sass) Minor tweak: spotted css file (instead of scss file), rename The move to `dart-sass`: dart-sass has been the primary implementation of sass for ~6 months and will receive updates earlier than libsass (ruby-sass itself is now deprecated) Other benefits include not having to recompile (via `npm rebuild` or similar) when switching platforms and an 'almost' javascript based solution. This update also alters some media queries that, whilst wouldn't compile anymore with either an updated libsass or dart-sass, where probably a little over complicated anyway, I've therefore made them similar to other breakpoints that made sense.
71 lines
1.8 KiB
JavaScript
71 lines
1.8 KiB
JavaScript
'use strict';
|
|
|
|
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
|
module.exports = function(defaults) {
|
|
const env = EmberApp.env();
|
|
const prodlike = ['production', 'staging'];
|
|
const isProd = env === 'production';
|
|
const isProdLike = prodlike.indexOf(env) > -1;
|
|
const sourcemaps = !isProd;
|
|
let app = new EmberApp(
|
|
Object.assign(
|
|
{},
|
|
defaults,
|
|
{
|
|
productionEnvironments: prodlike
|
|
}
|
|
), {
|
|
'ember-cli-babel': {
|
|
includePolyfill: true
|
|
},
|
|
'ember-cli-string-helpers': {
|
|
only: ['capitalize', 'lowercase']
|
|
},
|
|
'ember-cli-math-helpers': {
|
|
only: ['div']
|
|
},
|
|
'babel': {
|
|
plugins: [
|
|
'transform-object-rest-spread'
|
|
]
|
|
},
|
|
'codemirror': {
|
|
modes: ['javascript','ruby'],
|
|
keyMaps: ['sublime']
|
|
},
|
|
'ember-cli-uglify': {
|
|
uglify: {
|
|
compress: {
|
|
keep_fargs: false,
|
|
},
|
|
},
|
|
},
|
|
'sassOptions': {
|
|
implementation: require('dart-sass'),
|
|
sourceMapEmbed: sourcemaps,
|
|
},
|
|
'autoprefixer': {
|
|
sourcemap: sourcemaps,
|
|
grid: true,
|
|
browsers: [
|
|
"defaults",
|
|
"ie 11"
|
|
]
|
|
},
|
|
});
|
|
// Use `app.import` to add additional libraries to the generated
|
|
// output files.
|
|
//
|
|
// If you need to use different assets in different
|
|
// environments, specify an object as the first parameter. That
|
|
// object's keys should be the environment name and the values
|
|
// should be the asset to use in that environment.
|
|
//
|
|
// If the library that you are including contains AMD or ES6
|
|
// modules that you would like to import into your application
|
|
// please specify an object with the list of modules as keys
|
|
// along with the exports of each module as its value.
|
|
let tree = app.toTree();
|
|
return tree;
|
|
};
|