Giter Site home page Giter Site logo

Comments (10)

JPeer264 avatar JPeer264 commented on June 19, 2024

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.

avanderhoorn avatar avanderhoorn commented on June 19, 2024

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.

JPeer264 avatar JPeer264 commented on June 19, 2024

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.

avanderhoorn avatar avanderhoorn commented on June 19, 2024

Will do and thanks for your help! I'll see what I can do to switch tasks around.

from node-rcs-core.

JPeer264 avatar JPeer264 commented on June 19, 2024

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.

avanderhoorn avatar avanderhoorn commented on June 19, 2024

Ya I thought about that, have to see what it produces.

from node-rcs-core.

avanderhoorn avatar avanderhoorn commented on June 19, 2024

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.

JPeer264 avatar JPeer264 commented on June 19, 2024

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.

JPeer264 avatar JPeer264 commented on June 19, 2024

@avanderhoorn you can now install [email protected]. Happy coding ✌️ - and please let me know, if you have any other issues 👍

from node-rcs-core.

avanderhoorn avatar avanderhoorn commented on June 19, 2024

Huge thanks!!! 👍

from node-rcs-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.