sass google fonts
1.0.0
รวม Google Fonts เข้ากับโครงการของคุณ
npm install sass-google-fontsก่อนอื่นคุณต้องนำเข้าโครงการ
// Import the project
@import " node_modules/sass-google-fonts/src/GoogleFonts.scss " ;นำเข้า Google Font ของคุณไปยังโครงการของคุณโดยป้อนชื่อตัวอักษรของแบบอักษร
// 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