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 custom importers #1941

Closed
wants to merge 5 commits into from
Closed

Support custom importers #1941

wants to merge 5 commits into from

Conversation

Slava
Copy link

@Slava Slava commented Jun 24, 2015

Add hooks for an option called importer - an object that implements find and readFile operations in a custom way to enable new import syntax defined by the plugin.

This is useful for better cross-package imports in frameworks and package systems, such as Meteor.

I am open to making improvements to the PR, adding docs, etc, if somebody gives me a sign off as "this is a good feature we want to merge to Stylus" by one of the maintainers.

@Panya
Copy link
Member

Panya commented Jun 25, 2015

It's good intention. But I think implementation could be improved. E.g. we could extract current logic of importFile to the default importer (lib/importer.js). Also I would like to see tests/docs.

@Slava
Copy link
Author

Slava commented Jun 25, 2015

Excuse me, I didn't find a file called /lib/importer.js, would you please clarify?

@Panya
Copy link
Member

Panya commented Jun 25, 2015

I mean it would be nice to extract this logic to a file that should be placed at lib/importer.js.

@Slava
Copy link
Author

Slava commented Jun 25, 2015

Gotcha, I will work on this later this week with tests and docs. Thanks, comrade.

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

Successfully merging this pull request may close these issues.

None yet

4 participants