-
Notifications
You must be signed in to change notification settings - Fork 11
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
is template system working properly? #29
Comments
Hi @miguelmoraleda, I see. It looks like this is a problem that only occurs when svg-sprite is used as a dependency. Could you please try to follow these steps:
var renderConfig = {
template : path.resolve(path.join('tmpl', 'css', 'sprite.' + extension)),
dest : path.join(this.config.dest, 'sprite.' + extension)
};
if (_.isObject(this.config.render[extension])) {
if ('template' in this.config.render[extension]) {
renderConfig.template = path.resolve(this.config.render[extension].template);
Does this work for you then? Thanks for your help and sorry for the inconveniences. Cheers, |
Sorry, once more — please use this for replacing the lines 38 - 45: var renderConfig = {
template : path.resolve(path.dirname(path.dirname(path.dirname(__dirname))), path.join('tmpl', 'css', 'sprite.' + extension)),
dest : path.join(this.config.dest, 'sprite.' + extension)
};
if (_.isObject(this.config.render[extension])) {
if ('template' in this.config.render[extension]) {
renderConfig.template = path.resolve(this.config.render[extension].template); |
hey @jkphl, It doesn't works. It is still looking from the same path. (node_modules/....) I will try to help you to find why is that and let you know ASAP. Cheers |
Hey @jkphl , So sorry. It is working... My config was wrong. |
Oh great! So I will release that lines along with the next release! Thanks for your help! :) |
Well, I still have an issue. Maybe it is because my configuration is wrong. I would like to double check with you. Now I have this config.
But it is creating a sprite.example file in a no desired folder. This file contains the "templated" function.
And the .less file is in the right position but it is not "templated". Any idea? |
Could you please send me your |
Sure, I will create a test project for you. But anyways. I think it is a problem with my configuration in the Gruntfile. Also maybe I couldn't explain it in a good way. What I'm trying to achieve is to create the .less file with a given template. If I have this as base for the creation of the .less file. What's the way to set the template?
By the way. Thank you very much for your help in your free days 👍 |
No worries! However, which free days are you talking about? :D You should be able to specify a template like this: css: {
bust: false,
dest: '',
render : {
less : {
template: 'path/to/template.less'
dest: 'path/to/sprite.less'
}
}
} Please be aware that the Waiting for your test project ... |
Great! Thank you. It is working perfectly. Not sure if you will need my test project |
Cool! So if it does work for you now, then I don't need a test project as there's no problem to solve anymore! ;) Cheers, Joschi |
Hey @jkphl, I will appreciate if you could release a new version containing the changes to css.js. I'm working with more developers in the project and apply the hotfix is a little bit painful for the rest of the team. If you think it is not enough to make a new release, just let me know, so I can find another solution. Thanks in advance. Best regards, |
Hey @miguelmoraleda, sure! Here you are! ;) Cheers, |
Thank you!! |
Hi @jkphl,
Sorry, it is me again.
I'm trying to use the template configurations, but it is not working for me. I'm not sure if I'm using it in the right way. Could you give me an example?
Looks like there is a problem with the path reference. With my example... it is trying to search from the myproject/node_modules/grunt-svg-sprite/node_modules/svg-sprite/
My code:
I hope you can help me to figure out what I'm doing wrong.
Thanks in advance.
Best regards,
Miguel
The text was updated successfully, but these errors were encountered: