Closed richex-cn closed 11 months ago
可以考虑通过全局安装实现 CLI 支持,比起建一个目录然后安装依赖再分包要方便一些。
例如:
$ npm i -g @konghayao/cn-font-split $ cn-font-split ./SourceHanSerifCN-Bold.ttf # 默认输出到字体文件同名目录 SourceHanSerifCN-Bold/ $ cn-font-split -o ./dist ./SourceHanSerifCN-Bold.ttf # 指定输出目录 $ cn-font-split --chunk-size 70k ./SourceHanSerifCN-Bold.ttf $ cn-font-split --no-reporter ./SourceHanSerifCN-Bold.ttf $ cn-font-split --no-html-reporter ./SourceHanSerifCN-Bold.ttf $ cn-font-split --no-json-reporter ./SourceHanSerifCN-Bold.ttf $ cn-font-split --chunk-name '[hash:8][ext]' ./SourceHanSerifCN-Bold.ttf
忽略,没注意到已经支持了……
可以考虑通过全局安装实现 CLI 支持,比起建一个目录然后安装依赖再分包要方便一些。
例如: