Comments (10)
Thanks for your issue. Hm that is weird, it should compile. Does everything else in the javascript file compile right?
Moreover, are #js-carousel
, .js_slide
and #js-slider-indicators
included in any precompiled css file? Because gulp-rcs
, and any other rcs-core
plugin, will compile all id's and classes based on the css files.
from node-rcs-core.
I think I found the problem. You were correct in suggesting that those id/classes weren't a part of any style sheet, there were just present in the HTML and JS... at first glance when things weren't working, this stood out, hence why I suggested it. The real problem comes down to:
preloadSlide('#js-carousel-slide-1', '/img/front-page/hero1.svg', function () {
carousel.className += ' is-initialized';
});
vs
preloadSlide('#js-carousel-slide-1', '/img/front-page/hero1.svg', function () {
carousel.className += 'tU';
});
In the above you can see that rcs isn't preserving white in the strings in js files. I was thinking of just going ' ' + 'is-initialized';
to work around this bug, bug given the asset generation pipeline, uglify has already run by this stage and would have optimized the above back to ' is-initialized';
.
Any chance you think this might be an easy fix?
from node-rcs-core.
Oh yes, that is indeed a bug. I will try to fix this asap.
Btw, usually it is recommended to run gulp-rcs
or similar before uglifying the code - so I am not yet sure if there would be some other bugs, if so please let me know.
from node-rcs-core.
Will do and thanks for your help! I'll see what I can do to switch tasks around.
from node-rcs-core.
A possible workaround for now would be following:
...
preloadSlide('#js-carousel-slide-1', '/img/front-page/hero1.svg', function () {
var whitespace = ' ';
carousel.className += whitespace + 'is-initialized';
});
...
from node-rcs-core.
Ya I thought about that, have to see what it produces.
from node-rcs-core.
WHOOT! Thanks for the quick response. Will this require a rev to the package gulp-rcs
to get this update or just this one?
from node-rcs-core.
Nope, I will update gulp-rcs
in couple of minutes (I'll notify you). I just had troubles with some other dependencies in Node v<6 😅
from node-rcs-core.
@avanderhoorn you can now install [email protected]
. Happy coding ✌️ - and please let me know, if you have any other issues 👍
from node-rcs-core.
Huge thanks!!! 👍
from node-rcs-core.
Related Issues (20)
- False positive
- More consistent stats
- Remove `options.extend`
- Apply fix from v2.6.3 into master
- Remove `merge` wherever possible
- `_conflict` should get handled differently HOT 4
- [Feature request] Optimize replacement HOT 1
- Add dev mode
- Sourcemaps
- Add new test case
- Is there a safe way to allow certain CSS class names on a case-by-case basis? HOT 4
- Branch: master -> main
- How to include class names containing colon HOT 4
- Class names with square brackets and escaped characters HOT 2
- Problem with noscript tag HOT 5
- Twig templates support HOT 1
- A problem with renaming CSS variables HOT 1
- Multiple class selectors on same element in a PHP file HOT 5
- Regarding Updating Major Espree Version - HOT 4
- Does not prefix classes named after html elements? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-rcs-core.