Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path #5

Open
BlackBarray opened this issue Dec 19, 2018 · 8 comments
Open

path #5

BlackBarray opened this issue Dec 19, 2018 · 8 comments

Comments

@BlackBarray
Copy link

BlackBarray commented Dec 19, 2018

Moudle 'path' dose not exist in the Haste moudle map

@jaywcjlove
Copy link
Owner

@BlackBarray ?

const path = require('path');

@BlackBarray
Copy link
Author

@BlackBarray ?

const path = require('path');

const svgtofont = require("svgtofont");
const path = require('path');
svgtofont({
src: path.resolve(process.cwd(), "svgImg"), // svg path
dist: path.resolve(process.cwd(), "fontTff"), // output path
fontName: "newfont", // font name
css: true, // Create CSS files.
}).then(() => {
console.log('done!');
});
我就是这样写的,然后一直报错

@BlackBarray
Copy link
Author

BlackBarray commented Dec 19, 2018

@BlackBarray ?

const path = require('path');
const svgtofont = require("svgtofont");
const path = require('path');
svgtofont({
src: path.resolve(process.cwd(), "svgImg"), // svg path
dist: path.resolve(process.cwd(), "fontTff"), // output path
fontName: "newfont", // font name
css: true, // Create CSS files.
}).then(() => {
console.log('done!');
});

是写在app.js入口就可以了吧?但是我这样写一直报错

@jaywcjlove
Copy link
Owner

@BlackBarray
报什么错误,可以贴出来?

在 test 目录下有个简单的示例,下载下来跑一下?

你是 Windows 平台还是 MacOS?

@BlackBarray
Copy link
Author

@BlackBarray
报什么错误,可以贴出来?

在 test 目录下有个简单的示例,下载下来跑一下?

你是 Windows 平台还是 MacOS?

我用的是mac系统,我想问一下这对于ReactNavite使用吗?我创建的是RN工程,我今天运行了你的test文件,使用rn命令无法运行

@jaywcjlove
Copy link
Owner

这个工具只是生成字体文件,rn命令无法运行,应该不是这个工具的问题,

如果你 git 管理,你运行生成字体的时候看一下,哪些文件发生变化。

你要重新 install ?

我在 ReactNavite 项目中过,使用字体要在 xcode 中导入字体的,不然运行会报错的

@BlackBarray

@webkonglong
Copy link

我能正常生成字体文件,但是我拿不到映射表,就是我拿不到演示html文件

@jaywcjlove
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants