/
githubmirror
/
meteor
Обзор
Документация
Войти
/
githubmirror
/
meteor
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
devel
tools/tests/apps/custom-minifier/code.js
26 строк
760 B
denihs
- make sure to load dependencies before running tests with browserstack
11 июл 2024, 19:58
Не верифицирован
11 июл 2024, 19:58
b6f9f5f
Код
Авторство
О чём код?
if (Meteor.isClient) { require('./imports/imported.css'); Meteor.startup(function () { ['production_css', 'development_css', 'minified_lazy'].forEach(cls => { var color = getComputedStyle(document.querySelectorAll('.' + cls)[0]).color; Meteor.callAsync('print', cls + ': ' + color); }); // this log is expected to be transformed by minifier Meteor.callAsync('print', 'Message (client): foo'); }); } else { Meteor.startup(function () { // since we don't run minifiers for server targets, this is going // to be printed as "foo" and not as "production_js" or // "development_js" console.log('Message: foo'); }); Meteor.methods({ print: function (message) { console.log(message); } }); }