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

Export AST #430

Closed
OliverJAsh opened this issue Jul 2, 2014 · 7 comments
Closed

Export AST #430

OliverJAsh opened this issue Jul 2, 2014 · 7 comments

Comments

@OliverJAsh
Copy link

I need to get the Sass AST so I can query it for things like imported files.

References: sass/node-sass#248

@nsams
Copy link
Contributor

nsams commented Jul 2, 2014

sourcemaps contains all imported files, you can probably use that.

@OliverJAsh
Copy link
Author

That's a bit of a hack, but you're right that I probably good. An AST would still be helpful for other operations.

@mrjoelkemp
Copy link

+1 for a proper AST. Would help with dependency tree operations plus lowers the barrier to entry for other linters besides scss-lint.

@Munter
Copy link

Munter commented Sep 27, 2014

+1 from me. I'd really like access to the AST for being able to map a proper dependency graph

@OliverJAsh
Copy link
Author

I wonder if this is doable by reading the source map (just landed in #481).

@Munter
Copy link

Munter commented Oct 2, 2014

I solved my immediate problems by accepting that sass is a black box. Luckily libsass has a stats object you can pass in, which it fills with the files that were included in the build. No proper dependency tree, ast node reference or anything, but it solved my problem of setting up file watchers automatically on any file that might be of interest

@OliverJAsh
Copy link
Author

Aha, so it does. Nice find: https://github.com/sass/node-sass#stats

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

5 participants