sass google fonts
1.0.0
Fügen Sie Ihren Projekten Google -Schriftarten hinzu
npm install sass-google-fontsZuerst müssen Sie das Projekt importieren.
// Import the project
@import " node_modules/sass-google-fonts/src/GoogleFonts.scss " ;Importieren Sie Ihre Google -Schriftart in Ihr Projekt, indem Sie den Schriftnamen der Schriftart eingeben.
// Include a google font
@include google-font ( ' Tintos ' );
html , body {
font-family : ' Tintos ' ;
}Sie können auch das Gewicht und die Sprache angeben, die Sie wie folgt einfügen möchten.
// 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 Wenn Sie die Funktionalität hinzufügen oder ändern, denken Sie daran, Tests im test/ hinzuzufügen.
Stellen Sie sicher, dass alle Tests erfolgreich sind, bevor Sie zu NPM veröffentlicht werden
# Set the version
npm version {type} # major/minor/patch
# Publish to npm
npm publish
# Publish to github
git push && git push --tags