препроцессор meteor, добавляющий `j-` prepend к каждому тексту-выравниванию: center - PullRequest
0 голосов
/ 26 июня 2018

Я использую официальный пакет стилуса meteor, у меня возникли проблемы с некоторыми из выведенных css. Я использовал пакет mquandalle:stylus, он перестал работать после обновления meteor, поэтому я переключился на официальный пакет стилуса.Теперь, когда у меня есть text-align:center в .styl файле, он выводит в css как text-align:j-center, что, очевидно, не работает.Я не знаю, что еще включить, поэтому, пожалуйста, дайте мне знать, что еще я могу включить.

Вот пример раздела .styl кода

.hero_d, .hero_d_b
  h1
    font-size 36px
    font-weight 400
    color #3e97b7
    padding 25px 0 15px 0
    text-align center

Это списокиз моих пакетов

# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-base@1.4.0             # Packages every Meteor app needs to have
mobile-experience@1.0.5       # Packages for a great mobile UX
mongo@1.5.0                   # The database Meteor supports right now
blaze-html-templates    # Compile .html files into Meteor Blaze views
session@1.1.7                 # Client-side reactive dictionary for your app
jquery                  # Helpful client-side library
tracker@1.2.0                 # Meteor's client-side reactive programming library

standard-minifiers@1.1.0      # JS/CSS minifiers run for production mode
es5-shim@4.8.0                # ECMAScript 5 compatibility for older browsers.
ecmascript@0.11.1              # Enable ECMAScript2015+ syntax in app code

autopublish@1.0.7             # Publish all data to the clients (for prototyping)
insecure@1.0.7                # Allow all DB writes from clients (for prototyping)
iron:router
sewdn:masked-input
themeteorchef:jquery-validation
email@1.2.3
johannesma:meteor-flexslider
slam310:smooth-scroll
underscore
stylus
mquandalle:jeet
pward123:rupture

Заменен stylus,mqandalle:jeet&pward123:rupture на coagmano:stylus

У меня есть файл imports.styl, который импортирован в мой файл layout.styl, и я получаю следующую ошибку

Cannot read file {}/C:/Users/Anders/AppData/Local/.meteor/packages/coagmano_stylus/1.0.3/plugin.compileStylusBatch.os/npm/node_modules/meteor/compileStylusBatch/node_modules/jeet/jeet.styl for
   /client/application/styles/imports.styl

   client/application/styles/layout.styl: Stylus compiler error: client/application/styles/imports.styl:1:9
   1| @import 'jeet'
   --------------^
   2| @import 'rupture'
   3| rupture.scale = 0 320px 525px 600px 700px 850px 1048px 1300px
   4|

Это imports.styl файл

@import 'jeet'
@import 'rupture'
rupture.scale = 0 320px 525px 600px 700px 850px 1048px 1300px

1 Ответ

0 голосов
/ 27 июня 2018

Я не совсем уверен в причине проблемы, но ее можно решить, удалив текущие пакеты стилусов:

stylus
mquandalle:jeet
pward123:rupture

и заменив их на coagmano:stylus (Отказ от ответственности, ясопровождающий этого форка)

meteor add coagmano:stylus

Этот пакет поставляется с jeet, rupture, nib и другими, связанными и настроенными для автоматической загрузки в глобальную область действия.

Это означает, чточто вам не нужно их импортировать, и на самом деле это приведет к ошибкам из-за того, что это противоречит синтаксису импорта Meteor.

Чтобы удалить эти ошибки, найдите и удалите все операторы импорта для библиотек стилусов, подобные этим:

@import 'jeet'
@import 'rupture'
...