简体   繁体   English

如何使用NPM获取Fontawesome Pro CSS文件

[英]How do you use NPM to get fontawesome pro css files

I hope someone can help me here. 我希望有人可以在这里帮助我。 We recently purchased a font awesome pro license and would like to use it on many sub-domains , but can't add each one under the services tab on the font awesome site to allow the CDN access. 我们最近购买了一个字体超棒的专业版许可证,并希望在许多子域中使用它,但无法在字体超棒站点上的“服务”选项卡下添加每个字体,以允许CDN访问。 So we decided to have the files in our project using NPM . 因此,我们决定使用NPM将文件包含在我们的项目中。 But so far it seems like it only downloads the JS version of font awesome, which makes sense if the project was built as a javascript application, but it's not. 但是到目前为止,它似乎只下载了真棒的JS版本的字体,如果该项目是作为javascript应用程序构建的,这是有意义的,但事实并非如此。 We currently use css version, and were wondering if NPM has a font awesome pro css version we can reference. 我们当前使用的是CSS版本,并且想知道NPM是否具有可以参考的超棒Pro CSS版本。

$ npm i --save @fortawesome/fontawesome-pro-solid
$ npm i --save @fortawesome/fontawesome-pro-regular
$ npm i --save @fortawesome/fontawesome-pro-brands

Have you tried above... 你有没有尝试过...

you need to add npm config set "@fortawesome:registry" https://npm.fontawesome.com/TOKEN 您需要添加npm config set "@fortawesome:registry" https://npm.fontawesome.com/TOKEN

After some research I found the answer on their site. 经过研究,我在他们的网站上找到了答案。 This command downloads the pro css files. 此命令下载过程文件。

$ npm install --save @fortawesome/fontawesome-pro-webfonts

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM