Utils to speed up page load by using critical css & deferred scripts initialization
activeOn(function() {
console.log("should activate large client oriented JS here");
});
waitFor("jQuery", function() {
$("body").css("background", "orange");
});
waitFor("jQuery", function() { return $.fn && $.fn.select2 }, function() {
$("select").select2();
});
miniRequire("main-bundle", "/assets/application.js");
var src = "https://cdnjs.cloudflare.com/ajax/libs/tooltipster/4.2.8/js/tooltipster.bundle.min.js"
miniRequire("main-bundle", src, function() {
$('.tooltip').tooltipster();
});
miniPreload("/assets/font.woff2");
miniPreload("/assets/extra.css", function(ctx) {
ctx.node.rel = "stylesheet";
});
- ruby 2.3+
- rails 3.x+ with sprockets 2.x+
- Add support for rails 3.2 (ruby 2.3.8 + rails 3.2 + sprockets 2.2)
- Add multiple dependencies/rubies versions tests
- Add tests
- Add more JS-plugins
- Add tests to cover JS-code
- Refactor JS-code
- Add some docs/examples
- Add fast-image gem for images size detection
- Add more tests
bundle exec rake matrix:install
bundle exec rake matrix:spec
npm test
or
npm test:karma
npm test:all
bundle exec rails server
and visit root page of server
- ruby 2.3.8 + rails 3.2 + sprockets
- ruby 2.3.8 + rails 4.2 + sprockets 3.x
- ruby 2.3.8 + rails 5.0 + sprockets 3.x
- ruby 2.3.8 + rails 5.2 + sprockets 3.x
- ruby 2.5.8 + rails 4.2 + sprockets 3.x/4.x
- ruby 2.5.8 + rails 5.0 + sprockets 3.x/4.x
- ruby 2.5.8 + rails 6.0 + sprockets 3.x/4.x