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

Referencing Grunt Variables? #12

Open
liquidvisual opened this issue Oct 9, 2014 · 2 comments
Open

Referencing Grunt Variables? #12

liquidvisual opened this issue Oct 9, 2014 · 2 comments
Labels

Comments

@liquidvisual
Copy link

I've been searching for a plugin like this for ages. Love it. Thanks for writing it!

Is there a way to reference variables further up in the file when using the rewriter? (I store all my paths at the top)

Eg:

rewriter: function (url) {
    if (url.indexOf('data:') === 0)
        return '<% yeoman.baseurl %>/' + url;
    }
@lucasrudi
Copy link

I have the same question, any chance of accessing to variables?

@JPeer264
Copy link

@liquidvisual @lucasrudi - I think what you are looking for is grunt.config.get('yeoman.baseurl'). Make sure your paths are registered before in grunt.config.init.

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

No branches or pull requests

4 participants