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

Support for option.alias for define file load path. #133

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Akimyou
Copy link

@Akimyou Akimyou commented Mar 7, 2018

Usage

// a<!--@include @static.txt-->c
preprocess.preprocess(input, {}, { alias: { '@': 'test/fixtures/include/' } })
preprocess.preprocess(input, {}, { alias: { '@': path.join(__dirname, 'fixtures/include/') } }).should.equal("a!bazqux!c");

Node

Alias value must be a dir path.

Test

Coverage summary before 704d2898

Statements : 96.8% ( 242/250 )
Branches : 86.15% ( 112/130 )
Functions : 100% ( 33/33 )
Lines : 97.57% ( 241/247 )

Coverage summary after

Statements : 96.93% ( 253/261 )
Branches : 86.23% ( 119/138 )
Functions : 100% ( 33/33 )
Lines : 97.67% ( 252/258 )

@coveralls
Copy link

coveralls commented Mar 7, 2018

Coverage Status

Coverage increased (+0.1%) to 97.674% when pulling 6de9b00 on Akimyou:feature/include_alias into 704d289 on jsoverson:master.

@Akimyou
Copy link
Author

Akimyou commented Mar 7, 2018

The same problem !

#127

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

Successfully merging this pull request may close these issues.

2 participants