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 11import Service from '@ember/service' ;
22import algoliasearch from 'algoliasearch' ;
33import config from 'ember-api-docs/config/environment' ;
4- import { denodeify } from 'rsvp' ;
54
65export 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}
Original file line number Diff line number Diff line change 1- @use " sass:math" ;
2-
31fieldset {
42 background-color : lighten ($base-border-color , 10% );
53 border : $base-border ;
@@ -30,7 +28,7 @@ select {
3028
3129label {
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 {
7472input [type = " checkbox" ],
7573input [type = " radio" ] {
7674 display : inline ;
77- margin-right : math . div ($small-spacing , 2 );
75+ margin-right : calc ($small-spacing / 2 );
7876}
7977
8078input [type = " file" ] {
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const Funnel = require('broccoli-funnel');
55const mergeTrees = require ( 'broccoli-merge-trees' ) ;
66const envIsProduction = process . env . EMBER_ENV === 'production' ;
77const premberUrls = require ( './prember-urls' ) ;
8+ const nodeSass = require ( 'node-sass' ) ;
89
910module . 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 ,
You can’t perform that action at this time.
0 commit comments