-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add from option #4
Conversation
@TrySound you can transfer any file to posthtml with gulp or other engines. Look at https://www.npmjs.com/package/gulp-posthtml |
@awinogradov Yeah. I know. It's not about any wrappers. This will add |
@awinogradov It's just meta data not actions. |
@TrySound yes, I understand. But nobody uses posthtml-parser separately. It's API shouldn't to be here. You should transfer string to the parser. I think it's the right idea because tomorrow somebody will want to get a string by HTTP. Why not?) This is variant of getting content and it should be on the high level. |
@TrySound can you write example of usage for this prop? |
👍 |
and what to do with text nodes? |
We just will pass posthtml options in parser in next release. |
It won't affect nothing at all. We are deciding another problem here. |
However resolving should be in |
@TrySound if you want this meta you should have target or problem? How you plan use this meta? |
@awinogradov In include something like if (src) {
var resolvedId = path.resolve(node.file || options.root, src);
content = parser(fs.readFileSync(resolvedId, options.encoding));
} |
Ok) Now it works fine. Write in your HTML |
What? Seriously? By hand? |
This will let make include, imports or something other more flexible.
The same is used in postcss (
node.source.input.file
)