File tree Expand file tree Collapse file tree 6 files changed +10444
-5964
lines changed Expand file tree Collapse file tree 6 files changed +10444
-5964
lines changed Original file line number Diff line number Diff line change 1
1
import Service from '@ember/service' ;
2
2
import algoliasearch from 'algoliasearch' ;
3
3
import config from 'ember-api-docs/config/environment' ;
4
- import { denodeify } from 'rsvp' ;
5
4
6
5
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 ) {
12
7
if ( query ) {
13
8
if ( Array . isArray ( query ) && ! params ) {
14
9
// if multiple indices
15
- this . _client . search ( query , callback ) ;
10
+ return this . _client . search ( query ) ;
16
11
} else if ( ! params ) {
17
12
// if no params
18
- this . accessIndex ( query . indexName ) . search ( query . query , callback ) ;
13
+ return this . accessIndex ( query . indexName ) . search ( query . query ) ;
19
14
} else {
20
15
// if params and callback
21
- this . accessIndex ( query . indexName ) . search ( query . query , params , callback ) ;
16
+ return this . accessIndex ( query . indexName ) . search ( query . query , params ) ;
22
17
}
23
- } else {
24
- callback ( new Error ( `Could not search algolia for query "${ query } "` ) ) ;
25
18
}
26
19
}
27
20
@@ -39,6 +32,5 @@ export default class AlgoliaService extends Service {
39
32
config . algolia . algoliaKey
40
33
) ;
41
34
this . _indices = { } ;
42
- this . search = denodeify ( this . _search . bind ( this ) ) ;
43
35
}
44
36
}
Original file line number Diff line number Diff line change 1
- @use " sass:math" ;
2
-
3
1
fieldset {
4
2
background-color : lighten ($base-border-color , 10% );
5
3
border : $base-border ;
@@ -30,7 +28,7 @@ select {
30
28
31
29
label {
32
30
font-weight : 600 ;
33
- margin-bottom : math . div ($small-spacing , 2 );
31
+ margin-bottom : calc ($small-spacing / 2 );
34
32
35
33
& .required ::after {
36
34
content : " *" ;
@@ -50,8 +48,8 @@ textarea {
50
48
box-sizing : border-box ;
51
49
font-family : $base-font-family ;
52
50
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 );
55
53
transition : border-color ;
56
54
width : 100% ;
57
55
@@ -74,7 +72,7 @@ textarea {
74
72
input [type = " checkbox" ],
75
73
input [type = " radio" ] {
76
74
display : inline ;
77
- margin-right : math . div ($small-spacing , 2 );
75
+ margin-right : calc ($small-spacing / 2 );
78
76
}
79
77
80
78
input [type = " file" ] {
Original file line number Diff line number Diff line change 1
- @use " sass:math" ;
2
-
3
1
// Typography
4
2
$base-font-family : ' Source Sans Pro' , sans-serif ;
5
3
$heading-font-family : $base-font-family ;
@@ -17,7 +15,7 @@ $heading-line-height: 1.2;
17
15
18
16
// Spacing
19
17
$base-spacing : $base-line-height * 1em ;
20
- $small-spacing : math . div ($base-spacing , 2 );
18
+ $small-spacing : calc ($base-spacing / 2 );
21
19
$large-spacing : $base-spacing * 2 ;
22
20
$top-spacing : $base-spacing * 3.333 ; // 80px
23
21
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const Funnel = require('broccoli-funnel');
5
5
const mergeTrees = require ( 'broccoli-merge-trees' ) ;
6
6
const envIsProduction = process . env . EMBER_ENV === 'production' ;
7
7
const premberUrls = require ( './prember-urls' ) ;
8
+ const nodeSass = require ( 'node-sass' ) ;
8
9
9
10
module . exports = function ( defaults ) {
10
11
let app = new EmberApp ( defaults , {
@@ -25,20 +26,14 @@ module.exports = function (defaults) {
25
26
generateAssetMap : true ,
26
27
} ,
27
28
sassOptions : {
29
+ implementation : nodeSass ,
28
30
sourceMapEmbed : ! envIsProduction ,
29
31
includePaths : [
30
32
'app/styles' ,
31
33
'node_modules/bourbon-neat/app/assets/stylesheets' ,
32
34
'node_modules/normalize.css' ,
33
35
] ,
34
36
} ,
35
- autoImport : {
36
- webpack : {
37
- node : {
38
- process : 'mock' ,
39
- } ,
40
- } ,
41
- } ,
42
37
autoprefixer : {
43
38
enabled : true ,
44
39
cascade : true ,
You can’t perform that action at this time.
0 commit comments