1
1
"use strict" ;
2
2
3
3
const path = require ( "path" ) ;
4
- const assign = require ( "object-assign" ) ;
5
4
const clone = require ( "clone" ) ;
6
5
const css = require ( "css" ) ;
7
6
@@ -120,7 +119,7 @@ Builder.prototype.build = function(options) {
120
119
const mFileMappings = { } ;
121
120
122
121
// Assign default options
123
- options = assign ( {
122
+ options = Object . assign ( {
124
123
lessInput : null ,
125
124
lessInputPath : null ,
126
125
rtl : true ,
@@ -225,7 +224,7 @@ Builder.prototype.build = function(options) {
225
224
const oVariableCollector = new VariableCollectorPlugin ( options . compiler ) ;
226
225
227
226
// render to css
228
- result . css = tree . toCSS ( assign ( { } , options . compiler , {
227
+ result . css = tree . toCSS ( Object . assign ( { } , options . compiler , {
229
228
plugins : [ oImportCollector , oVariableCollector ]
230
229
} ) ) ;
231
230
@@ -246,7 +245,7 @@ Builder.prototype.build = function(options) {
246
245
}
247
246
248
247
if ( oRTL ) {
249
- result . cssRtl = tree . toCSS ( assign ( { } , options . compiler , {
248
+ result . cssRtl = tree . toCSS ( Object . assign ( { } , options . compiler , {
250
249
plugins : [ oRTL ]
251
250
} ) ) ;
252
251
}
@@ -270,13 +269,13 @@ Builder.prototype.build = function(options) {
270
269
// generate the skeleton-css and the less-variables
271
270
const CSSVariablesCollectorPlugin = require ( "./plugin/css-variables-collector" ) ;
272
271
const oCSSVariablesCollector = new CSSVariablesCollectorPlugin ( config ) ;
273
- result . cssSkeleton = tree . toCSS ( assign ( { } , options . compiler , {
272
+ result . cssSkeleton = tree . toCSS ( Object . assign ( { } , options . compiler , {
274
273
plugins : [ oCSSVariablesCollector ]
275
274
} ) ) ;
276
275
result . cssVariablesSource = oCSSVariablesCollector . toLessVariables ( ) ;
277
276
if ( oRTL ) {
278
277
const oCSSVariablesCollectorRTL = new CSSVariablesCollectorPlugin ( config ) ;
279
- result . cssSkeletonRtl = tree . toCSS ( assign ( { } , options . compiler , {
278
+ result . cssSkeletonRtl = tree . toCSS ( Object . assign ( { } , options . compiler , {
280
279
plugins : [ oCSSVariablesCollectorRTL , oRTL ]
281
280
} ) ) ;
282
281
}
@@ -289,7 +288,7 @@ Builder.prototype.build = function(options) {
289
288
reject ( err ) ;
290
289
} else {
291
290
const CSSVariablesPointerPlugin = require ( "./plugin/css-variables-pointer" ) ;
292
- result . cssVariables = tree . toCSS ( assign ( { } , options . compiler , {
291
+ result . cssVariables = tree . toCSS ( Object . assign ( { } , options . compiler , {
293
292
plugins : [ new CSSVariablesPointerPlugin ( ) ]
294
293
} ) ) ;
295
294
resolve ( result ) ;
0 commit comments