File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 11/*jshint node:true*/
2- ' use strict' ;
2+ " use strict" ;
33
4- var path = require ( ' path' ) ;
4+ var path = require ( " path" ) ;
55
66/*
77 *! Miscellaneous methods
88 */
99
10- module . exports = function ( proto ) {
10+ module . exports = function ( proto ) {
1111 /**
1212 * Use preset
1313 *
@@ -17,22 +17,23 @@ module.exports = function(proto) {
1717 *
1818 * @param {String|Function } preset preset name or preset function
1919 */
20- proto . usingPreset =
21- proto . preset = function ( preset ) {
22- if ( typeof preset === 'function' ) {
20+ proto . usingPreset = proto . preset = function ( preset ) {
21+ if ( typeof preset === "function" ) {
2322 preset ( this ) ;
2423 } else {
2524 try {
2625 var modulePath = path . join ( this . options . presets , preset ) ;
27- var module = require ( modulePath ) ;
26+ var module = require ( ` ${ modulePath } ` ) ;
2827
29- if ( typeof module . load === ' function' ) {
28+ if ( typeof module . load === " function" ) {
3029 module . load ( this ) ;
3130 } else {
32- throw new Error ( ' preset ' + modulePath + ' has no load() function' ) ;
31+ throw new Error ( " preset " + modulePath + " has no load() function" ) ;
3332 }
3433 } catch ( err ) {
35- throw new Error ( 'preset ' + modulePath + ' could not be loaded: ' + err . message ) ;
34+ throw new Error (
35+ "preset " + modulePath + " could not be loaded: " + err . message
36+ ) ;
3637 }
3738 }
3839
You can’t perform that action at this time.
0 commit comments