Skip to content

Commit 9db5ce2

Browse files
committed
update node-sass and ember-auto-import
1 parent 556c0ea commit 9db5ce2

File tree

6 files changed

+10444
-5964
lines changed

6 files changed

+10444
-5964
lines changed

app/services/algolia.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
import Service from '@ember/service';
22
import algoliasearch from 'algoliasearch';
33
import config from 'ember-api-docs/config/environment';
4-
import { denodeify } from 'rsvp';
54

65
export default class AlgoliaService extends Service {
7-
_search(query, params, callback) {
8-
if (!callback) {
9-
callback = params;
10-
params = undefined;
11-
}
6+
async search(query, params) {
127
if (query) {
138
if (Array.isArray(query) && !params) {
149
// if multiple indices
15-
this._client.search(query, callback);
10+
return this._client.search(query);
1611
} else if (!params) {
1712
// if no params
18-
this.accessIndex(query.indexName).search(query.query, callback);
13+
return this.accessIndex(query.indexName).search(query.query);
1914
} else {
2015
// if params and callback
21-
this.accessIndex(query.indexName).search(query.query, params, callback);
16+
return this.accessIndex(query.indexName).search(query.query, params);
2217
}
23-
} else {
24-
callback(new Error(`Could not search algolia for query "${query}"`));
2518
}
2619
}
2720

@@ -39,6 +32,5 @@ export default class AlgoliaService extends Service {
3932
config.algolia.algoliaKey
4033
);
4134
this._indices = {};
42-
this.search = denodeify(this._search.bind(this));
4335
}
4436
}

app/styles/base/_forms.scss

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@use "sass:math";
2-
31
fieldset {
42
background-color: lighten($base-border-color, 10%);
53
border: $base-border;
@@ -30,7 +28,7 @@ select {
3028

3129
label {
3230
font-weight: 600;
33-
margin-bottom: math.div($small-spacing, 2);
31+
margin-bottom: calc($small-spacing / 2);
3432

3533
&.required::after {
3634
content: "*";
@@ -50,8 +48,8 @@ textarea {
5048
box-sizing: border-box;
5149
font-family: $base-font-family;
5250
font-size: $base-font-size;
53-
margin-bottom: math.div($base-spacing, 2);
54-
padding: math.div($base-spacing, 3);
51+
margin-bottom: calc($base-spacing / 2);
52+
padding: calc($base-spacing / 3);
5553
transition: border-color;
5654
width: 100%;
5755

@@ -74,7 +72,7 @@ textarea {
7472
input[type="checkbox"],
7573
input[type="radio"] {
7674
display: inline;
77-
margin-right: math.div($small-spacing, 2);
75+
margin-right: calc($small-spacing / 2);
7876
}
7977

8078
input[type="file"] {

app/styles/base/_variables.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@use "sass:math";
2-
31
// Typography
42
$base-font-family: 'Source Sans Pro', sans-serif;
53
$heading-font-family: $base-font-family;
@@ -17,7 +15,7 @@ $heading-line-height: 1.2;
1715

1816
// Spacing
1917
$base-spacing: $base-line-height * 1em;
20-
$small-spacing: math.div($base-spacing, 2);
18+
$small-spacing: calc($base-spacing / 2);
2119
$large-spacing: $base-spacing * 2;
2220
$top-spacing: $base-spacing * 3.333; // 80px
2321

ember-cli-build.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const Funnel = require('broccoli-funnel');
55
const mergeTrees = require('broccoli-merge-trees');
66
const envIsProduction = process.env.EMBER_ENV === 'production';
77
const premberUrls = require('./prember-urls');
8+
const nodeSass = require('node-sass');
89

910
module.exports = function (defaults) {
1011
let app = new EmberApp(defaults, {
@@ -25,20 +26,14 @@ module.exports = function (defaults) {
2526
generateAssetMap: true,
2627
},
2728
sassOptions: {
29+
implementation: nodeSass,
2830
sourceMapEmbed: !envIsProduction,
2931
includePaths: [
3032
'app/styles',
3133
'node_modules/bourbon-neat/app/assets/stylesheets',
3234
'node_modules/normalize.css',
3335
],
3436
},
35-
autoImport: {
36-
webpack: {
37-
node: {
38-
process: 'mock',
39-
},
40-
},
41-
},
4237
autoprefixer: {
4338
enabled: true,
4439
cascade: true,

0 commit comments

Comments
 (0)