Skip to content

Commit 3660650

Browse files
committed
[INTERNAL] Remove object-assign polyfill
Supported in Node.js v4+
1 parent e4a1c86 commit 3660650

File tree

3 files changed

+19
-307
lines changed

3 files changed

+19
-307
lines changed

lib/index.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use strict";
22

33
const path = require("path");
4-
const assign = require("object-assign");
54
const clone = require("clone");
65
const css = require("css");
76

@@ -120,7 +119,7 @@ Builder.prototype.build = function(options) {
120119
const mFileMappings = {};
121120

122121
// Assign default options
123-
options = assign({
122+
options = Object.assign({
124123
lessInput: null,
125124
lessInputPath: null,
126125
rtl: true,
@@ -225,7 +224,7 @@ Builder.prototype.build = function(options) {
225224
const oVariableCollector = new VariableCollectorPlugin(options.compiler);
226225

227226
// render to css
228-
result.css = tree.toCSS(assign({}, options.compiler, {
227+
result.css = tree.toCSS(Object.assign({}, options.compiler, {
229228
plugins: [oImportCollector, oVariableCollector]
230229
}));
231230

@@ -246,7 +245,7 @@ Builder.prototype.build = function(options) {
246245
}
247246

248247
if (oRTL) {
249-
result.cssRtl = tree.toCSS(assign({}, options.compiler, {
248+
result.cssRtl = tree.toCSS(Object.assign({}, options.compiler, {
250249
plugins: [oRTL]
251250
}));
252251
}
@@ -270,13 +269,13 @@ Builder.prototype.build = function(options) {
270269
// generate the skeleton-css and the less-variables
271270
const CSSVariablesCollectorPlugin = require("./plugin/css-variables-collector");
272271
const oCSSVariablesCollector = new CSSVariablesCollectorPlugin(config);
273-
result.cssSkeleton = tree.toCSS(assign({}, options.compiler, {
272+
result.cssSkeleton = tree.toCSS(Object.assign({}, options.compiler, {
274273
plugins: [oCSSVariablesCollector]
275274
}));
276275
result.cssVariablesSource = oCSSVariablesCollector.toLessVariables();
277276
if (oRTL) {
278277
const oCSSVariablesCollectorRTL = new CSSVariablesCollectorPlugin(config);
279-
result.cssSkeletonRtl = tree.toCSS(assign({}, options.compiler, {
278+
result.cssSkeletonRtl = tree.toCSS(Object.assign({}, options.compiler, {
280279
plugins: [oCSSVariablesCollectorRTL, oRTL]
281280
}));
282281
}
@@ -289,7 +288,7 @@ Builder.prototype.build = function(options) {
289288
reject(err);
290289
} else {
291290
const CSSVariablesPointerPlugin = require("./plugin/css-variables-pointer");
292-
result.cssVariables = tree.toCSS(assign({}, options.compiler, {
291+
result.cssVariables = tree.toCSS(Object.assign({}, options.compiler, {
293292
plugins: [new CSSVariablesPointerPlugin()]
294293
}));
295294
resolve(result);

0 commit comments

Comments
 (0)