Open Anisotropic opened 10 years ago
@Anisotropic any more details? Like error message printed? Try options.exts like bellow it may wokrs.
dist: {
options: {
exts: ['hbs']
},
src: ['src/**/*.hbs']
}
If it still doesn't work, please let me know :)
Yes, it's still doesn't work.
Using this syntax not working:
inline: {
all:{
options:{
cssmin: true,
exts: ['hbs']
},
src: ['app/handlebars/standart.hbs'],
dest: ['.tmp/']
}
},
And this syntax not working:
inline: {
all:{
options:{
cssmin: true
},
src: ['app/handlebars/standart.hbs'],
dest: ['.tmp/'],
ext: '.hbs'
}
},
it copying hbs file without inlining. .hbs begin with this: `
@Anisotropic
there should be a __inline
tag to tell grunt-inline that this stylesheet needs to be inlined , as the documentation says. Follow the example bellow, just try again :)
<link href="css/style.css?__inline=true" rel="stylesheet" />
yes, my mistake. When i add this __inline
tag, example from my past message are working. But this one:
inline: {
all:{
files: [{
expand: true,
cwd: 'app/handlebars/',
src: ['*.hbs'],
dest: '.tmp/handlebars/',
ext: '.hbs'
}],
options:{
cssmin: true,
exts: ['hbs']
},
}
},
Working as i'm no expect. It inlining all hbs files in /app/handlebars/, but i want it inlined in /.tmp/handlebars/
@Anisotropic I had the same problem with .ejs views. You solution works for me with .ejs.
Did you manage to inlined in the 'dest' folder ? Any solutions?
@maxime-crunding I`ve solved this by using another inline plugin and divide this one action to some independent actions: 1 - copy .hbs to .tmp, 2 - copy & minifying .css to .tmp, 3 - inlining .css to .hbs, 4 - compiling & uglifying .hbs
Hello. i've tried to use this plugin for inlining CSS for handlebars templates, but it don't work. Handlebars templates - are HTML parts without
. Maybe this cause the trouble?