Skip to content

Commit

Permalink
🔥 clean
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Mar 1, 2020
1 parent eb9e31e commit 270eab9
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,11 @@ const renderLess = (theme, modifyVars, { min = true, disableExtendsDark = false
}
return (
less
.render(
`
html{
${fs.readFileSync(proLess, 'utf-8')}
}
`,
{
modifyVars: getModifyVars(theme, modifyVars, disableExtendsDark),
javascriptEnabled: true,
filename: path.resolve(proLess),
},
)
.render(fs.readFileSync(proLess, 'utf-8'), {
modifyVars: getModifyVars(theme, modifyVars, disableExtendsDark),
javascriptEnabled: true,
filename: path.resolve(proLess),
})
// 如果需要压缩,再打开压缩功能默认打开
.then(out => (min ? uglifycss.processString(out.css) : out.css))
.catch(e => {
Expand Down

0 comments on commit 270eab9

Please sign in to comment.