我使用的是官方的 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

这是我的包裹 list
# 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.

[email protected]             # Packages every Meteor app needs to have
[email protected]       # Packages for a great mobile UX
[email protected]                   # The database Meteor supports right now
blaze-html-templates    # Compile .html files into Meteor Blaze views
[email protected]                 # Client-side reactive dictionary for your app
jquery                  # Helpful client-side library
[email protected]                 # Meteor's client-side reactive programming library

[email protected]      # JS/CSS minifiers run for production mode
[email protected]                # ECMAScript 5 compatibility for older browsers.
[email protected]              # Enable ECMAScript2015+ syntax in app code

[email protected]             # Publish all data to the clients (for prototyping)
[email protected]                # Allow all DB writes from clients (for prototyping)
iron:router
sewdn:masked-input
themeteorchef:jquery-validation
[email protected]
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替换它们(免责声明,我是该fork的维护者)
meteor add coagmano:stylus

该软件包附带了jeetrupturenib和其他 bundle 在一起的软件包,并设置为自动加载到全局范围中。

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

要删除这些错误,请查找并删除手写笔库的所有import语句,如下所示:
@import 'jeet'
@import 'rupture'

08-08 05:52