Closed debanjanbasu closed 7 years ago
Can you provide a sample where it does not work? Is there also any error?
Strap 5l-5l
Strap 5l-5l
Strap xl
Strap 1s-2l
|
This is the sample HTML file. All the conditional HTML code is causing the following code to be ignored. There is no error while compiling though. It is just not rewriting the classes and the ids in the HTML.
Well yeah, I figured that there is a small bug in my regex. Actually it should just trigger everything between " "
and ' '
. As it is now it will also start at words like doesn't
or it's
. A quick fix for you might be to encode all '
as '
and "
as "
in your plain text or comments.
I will give you an update as soon as I solved this problem.
Please try it again with v0.0.3
v0.0.3 seems to not compile the CSS at all. This is my grunt config :
rcs: {
options: {},
css: {
options: {
replaceCss: true
},
files: [{
expand: true,
cwd: 'dev/',
src: 'csso/*.css',
dest: 'rcs/',
}]
},
all: {
files: [{
expand: true,
cwd: 'dev/',
src: ['*.html'],
dest: 'rcs/',
}]
}
}
Hm weird. I made now a project with your config where all CSS files in ./dev/csso
and all HTML files in ./dev
got compiled.
Please also make sure that rcs:css
is loaded before rcs:all
. Try following for me:
rcs
foldergrunt rcs:css rcs:all
What is the output now?
It worked 👍 The trick is to ensure that the input CSS is not uglified (in one line). If the sass-->css is compact, it won't work. It has to be 'compressed'. I.e. CSS selector in it's own line.
I am glad that it worked.
Oh that is a good hint. I will put this into the readme. Thanks!
The RCS is breaking while there are certain code blocks inside the html, such as comments to target IE specific code.