Skip to content

Commit a3e475f

Browse files
Replace underscore with lodash
1 parent 2c73989 commit a3e475f

File tree

6 files changed

+13
-25
lines changed

6 files changed

+13
-25
lines changed

package-lock.json

+6-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
],
2525
"dependencies": {
2626
"deepmerge": "^4.2.2",
27+
"lodash": "^4.17.21",
2728
"posthtml-attrs-parser": "^0.1.1",
2829
"posthtml-expressions": "^1.9.0",
2930
"posthtml-parser": "^0.11.0",
3031
"posthtml-render": "^3.0.0",
31-
"style-to-object": "^0.3.0",
32-
"underscore": "^1.13.6"
32+
"style-to-object": "^0.3.0"
3333
},
3434
"devDependencies": {
3535
"@commitlint/cli": "^12.0.1",

src/attributes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const {match} = require('posthtml/lib/api');
44
const parseAttrs = require('posthtml-attrs-parser');
55
const styleToObject = require('style-to-object');
6-
const {omit, keys, union, each, has, extend} = require('underscore');
6+
const {omit, keys, union, each, has, extend} = require('lodash');
77

88
/**
99
* Map component attributes that it's not defined as locals to first element of node

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ module.exports = (options = {}) => tree => {
103103
function processTree(options) {
104104
const filledSlots = {};
105105

106-
let processCounter = 0;
106+
// let processCounter = 0;
107107

108108
return function (tree) {
109109
if (options.plugins.length > 0) {
@@ -121,7 +121,7 @@ function processTree(options) {
121121
return currentNode;
122122
}
123123

124-
console.log(`${++processCounter}) Processing component ${componentPath}`);
124+
// console.log(`${++processCounter}) Processing component ${componentPath}`);
125125

126126
// log(currentNode, 'currentNode');
127127

src/locals.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const merge = require('deepmerge');
44
const scriptDataLocals = require('posthtml-expressions/lib/locals');
5-
const {pick, extend, keys, defaults, each} = require('underscore');
5+
const {pick, keys, defaults, each, extend} = require('lodash');
66
const attributeTypes = ['merge', 'computed', 'aware'];
77

88
/**

src/slots.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const {match} = require('posthtml/lib/api');
44
const {render} = require('posthtml-render');
5-
const {each, omit} = require('underscore');
5+
const {each, omit} = require('lodash');
66

77
/**
88
* Set filled slots

0 commit comments

Comments
 (0)