流星手写笔预处理器添加 `js-` 到每个 text-align:center

meteor stylus preprocessor adding `j-` prepend to every text-laign:center

我正在使用官方的 meteor stylus 包,我在处理一些输出时遇到了问题 css 我以前使用的是 mquandalle:stylus 包,它在升级 meteor 后停止工作,所以我换了到官方手写笔包。现在,只要我在 .styl 文件中有一个 text-align:center,它就会在 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

我不太确定问题的原因,但可以通过删除当前的手写笔包来解决:

stylus
mquandalle:jeet
pward123:rupture

并用 coagmano:stylus 替换它们(免责声明,我是该分支的维护者)

meteor add coagmano:stylus

该软件包捆绑了 jeetrupturenib 和其他软件包,并设置为自动加载到全局范围内。

这意味着您不需要导入它们,实际上这样做会抛出错误,因为它与 Meteor 的导入语法有冲突。

要删除这些错误,请查找并删除任何用于手写笔库的导入语句,例如:

@import 'jeet'
@import 'rupture'