sass google fonts
1.0.0
包括您項目的Google字體
npm install sass-google-fonts首先,您需要導入該項目。
// Import the project
@import " node_modules/sass-google-fonts/src/GoogleFonts.scss " ;通過輸入字體的字體名稱將您的Google字體導入項目。
// Include a google font
@include google-font ( ' Tintos ' );
html , body {
font-family : ' Tintos ' ;
}您還可以指定要包含的重量和語言,如下所示。
// If you want to specify sizes of the font
@include google-font ( ' Tintos ' , ' 400,400i,700 ' );
// Include languages of fonts
@include google-font ( ' Tintos ' , ' 400,400i,700 ' , ' greek,latin-ext,vietnamese ' ); # Install dependencies
npm install
# Run tests one time
npm run test
# Run test driven development
npm run tdd如果添加或更改功能,請記住在test/中添加測試。
在發佈到NPM之前,請確保所有測試都成功
# Set the version
npm version {type} # major/minor/patch
# Publish to npm
npm publish
# Publish to github
git push && git push --tags