Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

add: generate different css files with fontGear #6

Merged
merged 3 commits into from Oct 29, 2018

Conversation

angus96
Copy link
Collaborator

@angus96 angus96 commented Oct 29, 2018

add: generate different css files with fontGear

more custom settings:

  • fontGear: array, default [-1, 0, 1, 2, 3, 4], the gears of font you want to use
  • enableFontSetting: boolean, default false, whether to enable the fontSetting
  • addFontSizeToSelector: function, determines the logic when func adds fontSize to each declaration
  • outputCSSFile: function, determins how the plugin outputs the css file

@coveralls
Copy link

coveralls commented Oct 29, 2018

Coverage Status

Coverage increased (+1.1%) to 96.629% when pulling 5ff0538 on angus96:master into 9bb2748 on crossjs:master.

index.js Outdated
var outputCSSFile = options.outputCSSFile || function (gear, clonedRoot) {
gear !== undefined && fs.writeFileSync(path.join(__dirname, 'test/fontGear/fontGear_' + gear +'.css'), clonedRoot, {
encoding: 'utf8'
})
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此处整个 function 的实现应该交给外部去定义,本组件只收配置,然后把 clone/walk 后的数据传给外面传入的 function

@crossjs crossjs merged commit bb16609 into crossjs:master Oct 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants