Code Monkey home page Code Monkey logo

meteor-scss's Introduction

Sass for Meteor

This is a Sass build plugin for Meteor. It compiles Sass files with node-sass.

Note that due to a limitation in libsass, there is no support for imports with indented syntax (sass). Indented syntax does work on the top-level. A version based on dart-sass is in the works which should remove this limitation.

Meteor 1.7 introduced a change in how node_modules are handled, if you want to import sass from a node_module you need to symlink the package in your imports directory (more information below)

Installation

Install using Meteor's package management system:

> meteor add fourseven:scss

If you want to use it for your package, add it in your package control file's onUse block:

Package.onUse(function (api) {
  ...
  api.use('fourseven:scss');
  ...
});

Compatibility

Meteor VersionRecommended fourseven:scss version
1.0 - 1.13.2.0
1.2 - 1.3.13.4.2
1.3.2+3.8.0_1
1.4.03.8.1
1.4.1+4.5.4
1.6+4.12.0

Since meteor 1.4.1+ (fourseven:scss 3.9.0+), we do not have prebuild binaries anymore. You are required to set up the required toolchain yourselves.

Usage

Without any additional configuration after installation, this package automatically finds all .scss and .sass files in your project, compiles them with node-sass, and includes the resulting CSS in the application bundle that Meteor sends to the client. The files can be anywhere in your project.

File types

There are two different types of files recognized by this package:

  • Sass sources (all *.scss and *.sass files that are not imports)
  • Sass imports/partials, which are:
    • files that are prefixed with an underscore _
    • marked as isImport: true in the package's package.js file: api.addFiles('x.scss', 'client', {isImport: true})
    • Starting from Meteor 1.3, all files in a directory named imports/

The source files are compiled automatically (eagerly loaded). The imports are not loaded by themselves; you need to import them from one of the source files to use them.

The imports are intended to keep shared mixins and variables for your project, or to allow your package to provide several components which your package's users can opt into one by one.

Each compiled source file produces a separate CSS file. (The standard-minifiers package merges them into one file afterwards.)

Importing

You can use the regular @import syntax to import any Sass files: sources or imports.

Besides the usual way of importing files based on the relative path in the same package (or app), you can also import files from other packages or apps with the following syntax.

Importing styles from a different package:

@import "{my-package:pretty-buttons}/buttons/_styles.scss";

.my-button {
  // use the styles imported from a package
  @extend .pretty-button;
}

Importing styles from the target app:

@import "{}/client/styles/imports/colors.scss";

.my-nav {
  // use a color from the app style pallete
  background-color: @primary-branding-color;
}

This can also conveniently be used to import styles from npm modules for example:

@import "{}/node_modules/module-name/stylesheet";

Note that Meteor 1.7 introduced a change so that files in node_modules aren't automatically compiled any more. This requires you to add a symlink inside the imports directory to the pacakge in order for compilation to work. E.g.

meteor npm install the-package
cd imports
ln -s ../node_modules/the-package .

See the meteor changelog for more information.

Global include path

Sometimes a 3rd party module uses import paths that assume that the compiler is configured with specific includePaths option (e.g. Ionic, Bootstrap, etc.):

@import "ionicons-icons"; // This file is actually placed in another npm module!

Create a configuration file named "scss-config.json" at the root of your Meteor project to specify include paths that the compiler should use as an extra possibility to resolve import paths:

{
  "includePaths": [
    "{}/node_modules/ionicons/dist/scss/"
  ]
}

Sourcemaps

These are on by default.

Autoprefixer

As of Meteor 1.2 autoprefixer should preferably be installed as a separate plugin. You can do so by running:

meteor remove standard-minifiers
meteor add seba:[email protected]

In a Meteor 1.3+ project, do the same by running:

meteor remove standard-minifier-css
meteor add seba:minifiers-autoprefixer

LibSass vs Ruby Sass

Please note that this project uses LibSass. LibSass is a C++ implementation of the Ruby Sass compiler. It has most of the features of the Ruby version, but not all of them. Things are improving, so please be patient. Before you ask, I have no intention of making a version of this package that links to the Ruby version instead.

For a quick rundown on what libsass does and doesn't (currently) do, check here.

meteor-scss's People

Contributors

amclin avatar andrefgneves avatar brunolemos avatar chuangbo avatar devgrok avatar ebroder avatar fourseven avatar funkylover avatar gabrielpoca avatar ghybs avatar ianserlin avatar jankapunkt avatar jpunt avatar koenlav avatar lourd avatar naycon avatar reywood avatar rohanray avatar s7dhansh avatar sachag avatar sbking avatar scottmcpherson avatar sdarnell avatar sebakerckhof avatar sebastian-ruiz avatar storytellercz avatar timche avatar wimatihomer avatar wizonesolutions avatar znerol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meteor-scss's Issues

how to run ?

after mrt add scss

Could not locate package.js within path .meteorite/packages/scss/fourseven/meteor-scss/185f3b2787fb85e653f7b7bf603d1493ed14943d

No compatible builds found

Happened to remove this package just now, and when I tried re-adding it, Meteor complained that it couldn't find any compatible builds. I'm running 64-bit Linux.

$ meteor add fourseven:scss
 => Errors while adding packages:

While checking for fourseven:[email protected]:
error: No compatible build found

Error while building version 0.9.5 with Heroku buildpack

Hey there,

I tried to upgrade one of my apps to Meteor 0.9.3.1 and the latest meteor-scss version 0.9.5 – unfortunately it gives me the following error while bundling on Heroku:

Errors prevented bundling:
While loading plugin `meteor-scss` from package `fourseven:scss`:
module.js:356:32: /lib/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/node-meteor-zNQL/.meteor/packages/fourseven:scss/.0.9.5.1n50mjm++os.linux.x86_64+web.browser+web.cordova/plugin.meteor-scss.os.linux.x86_64/npm/meteor-scss/node_modules/node-sass/build/Release/obj.target/binding.node)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at requireBinding (/tmp/node-meteor-zNQL/.meteor/packages/fourseven:scss/.0.9.5.1n50mjm++os.linux.x86_64+web.browser+web.cordova/plugin.meteor-scss.os.linux.x86_64/npm/meteor-scss/node_modules/node-sass/sass.js:17:14)
  at Object.<anonymous> (/tmp/node-meteor-zNQL/.meteor/packages/fourseven:scss/.0.9.5.1n50mjm++os.linux.x86_64+web.browser+web.cordova/plugin.meteor-scss.os.linux.x86_64/npm/meteor-scss/node_modules/node-sass/sass.js:24:15)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object._.extend.Npm.require (/tmp/node-meteor-zNQL/.meteor/packages/meteor-tool/.1.0.33.k69mx++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/bundler.js:1093:22)
  at Package (<runJavaScript-48>:12:16)
  at <runJavaScript-48>:83:4
  at <runJavaScript-48>:90:3

I am using this build pack: buildpack-meteor-0.9

You have any ideas how to solve this problem?

Changes in imported files should trigger re-compilation of dependent files

Currently it works to import files like _imported_file.scss or imported_file.scssimport and use variables etc. defined in them. The problem is, when you change anything within the imported files the dependent files are not re-compiled automatically.

This pretty much kills the biggest advantage of importing files, because I want to declare stuff like global mixins / colors / fonts etc. that are used throughout many other packages of my app. If I change a color within my _colors.scss all dependent files should be re-compiled and updated with the next hot-code-push on the client.

Installing 2.0.0-beta

Do you know of a simple way to add this at version 2.0.0-beta?

When I run meteor add fourseven:scss, it installs version 1.0.0, which appears to use an older version of node-sass than I'd like. However, when I download and include the meter-scss package locally, meteor add meteor-scss installs version 2.0.0-beta, which works for my purposes.

We finally have Susy playing well with LibSass, so once this is running I can get Susy fully integrated into Atmosphere for us. :)

Invalid top-level expression when inserting one-line comments

Hello,

The following code works:

@import compass/css3/images

.login
  background-color: #c4c6c8
  +filter-gradient(#c4c6c8, #fcfcfc, vertical)
  +background-image(linear-gradient(to bottom, #c4c6c8 0%,#fcfcfc 100%))

The following code triggers the error below:

@import compass/css3/images

# Account > Login

.login
  background-color: #c4c6c8
  +filter-gradient(#c4c6c8, #fcfcfc, vertical)
  +background-image(linear-gradient(to bottom, #c4c6c8 0%,#fcfcfc 100%))

Meteor Terminal:

   client/stylesheets/app.sass: Scss compiler error: undefined
   /Users/mac/Documents/websites/customers/joshowens/tti/client/stylesheets/account:4: invalid top-level expression

How can we write one-line comments?

Source Maps?

Thanks for writing this module. It seems to just work - nice job! Question: the generated css seems to have source map data, but source maps don't seem to be working. I'm using Chrome Canary with source maps turned on (and with success on coffeescript), but I don't really know what I'm doing – just wondering if it's already working for you and I should keep trying, or if this is a possibility in the future. This is not super urgent, and I won't be offended if you just want to close the issue - just wondering.

@import "compass/css3";

That's my first line in using this package and I get Scss compiler error: /path/to/main.scss:1: error: file to import not found or unreadable: "compass/css3.

Any ideas?

Macos 10.9

Update to node-sass to 1.1.4?

Hey @fourseven ,

Do you have any plans to publish a release to meteor for node sass 1.1.4 support? I'm creating a package that uses foundation for apps and node sass 1.1.4 is required for the sass in that package.

As a temporary fix I've cloned you scss package and released it with 1.1.4: https://github.com/RainHaven/meteor-sass

But I'm only running OS X and so I can't publish the package for linux support because Meteors publish-for-arch requires publishing from the targeted operating system.

Does fourseven:scss include support for Linux?

Update meteor-scss to use node-sass 0.9.2

There's an underlying bug in libsass which has been fixed
sass/libsass#312

Consider the following SCSS test:

@for $i from 1 through 4 {
    .topclass[data-value="#{$i}"] {
        .child1 {
            width:  #{$i/4*100%};
        }

        .child2 {
            &[data-value="#{$i}"] {
                display: block;
            }
        }
    }
}

If I process using the binary provided by node-sass 0.9.2, I get this result:

.topclass[data-value="1"] .child1 {
  width: 25%; }
.topclass[data-value="1"] .child2[data-value="1"] {
  display: block; }

.topclass[data-value="2"] .child1 {
  width: 50%; }
.topclass[data-value="2"] .child2[data-value="2"] {
  display: block; }

.topclass[data-value="3"] .child1 {
  width: 75%; }
.topclass[data-value="3"] .child2[data-value="3"] {
  display: block; }

.topclass[data-value="4"] .child1 {
  width: 100%; }
.topclass[data-value="4"] .child2[data-value="4"] {
  display: block; }

However, if I use the node-sass binary that gets included by meteor-scss (node-sass v0.8.6), the variables aren't processed and I get this result:

.topclass[data-value="#{$i}"] .child1 {
  width: 25%; }
.topclass[data-value="#{$i}"] .child2[data-value="#{$i}"] {
  display: block; }

.topclass[data-value="#{$i}"] .child1 {
  width: 50%; }
.topclass[data-value="#{$i}"] .child2[data-value="#{$i}"] {
  display: block; }

.topclass[data-value="#{$i}"] .child1 {
  width: 75%; }
.topclass[data-value="#{$i}"] .child2[data-value="#{$i}"] {
  display: block; }

.topclass[data-value="#{$i}"] .child1 {
  width: 100%; }
.topclass[data-value="#{$i}"] .child2[data-value="#{$i}"] {
  display: block; }

And the meteor app dies because of the CSS error.

Can't compile locally using Windows preview

Official Meteor support for Windows is right around the corner and I'm testing the preview they've published. I've encountered an error when adding fourseven:scss as a local package - I get the following error:

While loading plugin `scss` from package `scss`:

C:\Git\MeteorDataTool\meteor\packages\scss\.npm\plugin\scss\node_modules\node-sass\lib\index.js:21:11:
`libsass` bindings not found. Try reinstalling `node-sass`?
at getBinding
(C:\Git\MeteorDataTool\meteor\packages\scss\.npm\plugin\scss\node_modules\node-sass\lib\index.js:21:11)
at Object.<anonymous>
(C:\Git\MeteorDataTool\meteor\packages\scss\.npm\plugin\scss\node_modules\node-sass\lib\index.js:211:23)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object._.extend.Npm.require
(C:\Users\Fredrik\AppData\Local\.meteor\packages\meteor-tool\1.1.0-winr.0\mt-os.windows.x86_32\tools\bundler.js:1331:22)
at Package (packages/scss/plugin/compile-scss.js:2:1)
at <runJavaScript-80>:119:4
at <runJavaScript-80>:126:3

The relevant line probably being libsass bindings not found. Try reinstalling node-sass?

While this is an error thrown by node-sass and not fourseven:scss, it seems to be an issue specifically when node-sass is installed by Meteor, since I can install it elsewhere on my system using just npm and it works fine.

I'd be happy to help fix this, but I was wondering if you (or anyone) has an idea of what could cause this problem?

Cannot load the plugin in meteor on a Centos 6

seeing the following error
While Loading plugin fourseven:scss from package fourseven:scss:
module.js:356:32: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/.meteor/packages/fourseven:scss/.1.0.0.ey0yds++os.linux.x86_64+web.browser+web.cordova/plugin.fourseven:scss.os.linux.x86_64/npm/fourseven:scss/node_modules/node-sass/bin/linux-x64-v8-3.14/binding.node)

Autoprefixer not prefixing

Autoprefixer does not seem to be working in Meteor 1.0. I've added the scss.json as specified to my root directory, but the css does get any prefixed added.

Add Compass support

Is it possible to make this work with Compass? Currently getting:

/Users/kevin/meteor/apps/scheduler/sass/screen.scss: Sass compiler error: :1: error: error reading file "compass"

SCSS package no longer working w/ Heroku buildpack

Started running into this error with my previously-stable buildpack on Heroku. Possibly related to recent version bumps?

Errors prevented bundling:
       While loading plugin `meteor-scss` from package `scss`:
       module.js:356:32: /lib/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/build_a57406e7-d4ad-4437-8694-53957bd5099c/.meteorite/packages/scss/fourseven/meteor-scss/b6fcca86cdd4c41ada0abd5d6e3a7f77c919d826/.npm/plugin/meteor-scss/node_modules/node-sass/bin/linux-x64-v8-3.14/binding.node)
         at Module.load (module.js:356:32)
         at Function.Module._load (module.js:312:12)
         at Module.require (module.js:364:17)
         at require (module.js:380:17)
         at requireBinding (/tmp/build_a57406e7-d4ad-4437-8694-53957bd5099c/.meteorite/packages/scss/fourseven/meteor-scss/b6fcca86cdd4c41ada0abd5d6e3a7f77c919d826/.npm/plugin/meteor-scss/node_modules/node-sass/sass.js:17:14)
         at Object.<anonymous> (/tmp/build_a57406e7-d4ad-4437-8694-53957bd5099c/.meteorite/packages/scss/fourseven/meteor-scss/b6fcca86cdd4c41ada0abd5d6e3a7f77c919d826/.npm/plugin/meteor-scss/node_modules/node-sass/sass.js:24:15)
         at Module._compile (module.js:456:26)
         at Object.Module._extensions..js (module.js:474:10)
         at Module.load (module.js:356:32)
         at Function.Module._load (module.js:312:12)
         at Module.require (module.js:364:17)
         at require (module.js:380:17)
         at Object._.extend.Npm.require (/tmp/node-meteor-auPt/.meteor/tools/5bf1690853/tools/bundler.js:1072:22)
         at Package (packages/meteor-scss/plugin/compile-scss.js:2)
         at <runJavaScript-42>:87:4
         at <runJavaScript-42>:94:3

Did some digging, but really not sure what to make of it. Any thoughts? Thanks.

Pluggin Chrome Devtools Into Project

Does this package support using Chrome Devtools 'Workspace's to plug into your filesystem so you can save the changes to your disk in the browser?

My compiled stylesheet with this package only contains a minified css file.

on startup: error reading file "scss_tests.scss"

=> Errors prevented startup:

While building package 'meteor-scss':
scss_test.scss: Scss compiler error: error reading file "scss_test.scss"

=> Your application has errors. Waiting for file change.

I had to comment out line 17 of this package.js to get it work

// api.add_files(['scss_tests.scss', 'scss_tests.js'], 'client');

The permissions seems to be right. maybe you have an idea what's going wrong.

Package not working in project.

I installed the package in a meteor project and for some reason whenever I try and boot the app it fails. Should it be in a certain folder or named a certain thing?

Pending 0.9.6 release

Made a note here, I've released 0.9.6 for OS X but neither of the linux builds are finishing. Will get to this ASAP.

Allow packages that rely on fourseven:scss to add an include path

This is an idea to make it easier for users to include partials provided by other packages such as reywood:bootstrap3-sass or matthew:foundation5-sass. Currently, the user has to include something along the lines of @import '.meteor/local/build/programs/server/assets/packages/reywood:bootstrap3-sass/bootstrap'; in their scss file to use these packages. One problem with this is that some systems apparently have an underscore instead of a colon in the path.

Here's a half baked idea I came up with to maybe solve this problem. In a package that relies on fourseven:scss, one would include a JS file on the server (i.e. api.addFiles([ "include-path.js" ], "server")). In that file, they would have something like Scss.addIncludePath("path/to/reywood:bootstrap3-sass"), and meteor-scss could push that value onto the includePaths array option. Then users could just add @import 'bootstrap'; to their scss file. I haven't quite figured out how to get the real path to the package in a consistent way, but figured this would be food for thought.

Children broken on extended class

Hi,

I have this SCSS code:

.list-inline {
    list-style: none;
    li { display: inline-block; }
}

.header { 
    @extend .clearfix; 
    ul { @extend .list-inline; }
}

And it compiles into this, which is absolutely not what it should behave:

.list-inline,
.header ul {
    list-style: none;
}

/* the selector below is broken, it should have been ".list-inline li, .header ul li" */
.list-inline li,
.list-inline .header ul,
.header .list-inline ul {
    display: inline-block;
}

Thanks

Include Debug Info?

Can can I specify that Scss will be complied with debugging info included for FireBug source code mapping?

scss file not detected or processed

I must be an idiot or something, but no matter what I try, my SCSS file is not being compiled or included. Edits to the file are not registering changes for meteor to rebuild.

Are there dependencies that must be installed seperately?

Can't deploy Meteor 0.9.1.1 project to Heroku that uses fourseven:scss package

I am working on a project that deployed fine to Heroku when using Meteor 0.8.7 and the Meteorite version of this SCSS package. I updated Meteor to 0.9.0.1 and ever since I haven't been able to deploy to Heroku, but only if I include this package. Running the site locally works fine - it's only the Heroku deploy that breaks.

I've been able to replicate the issue by simply taking the leaderboard example, adding fourseven:scss, changing leaderboard.css and renaming it to leaderboard.scss, and deploying that to Heroku using this buildpack: https://github.com/djhi/heroku-buildpack-meteorite.git

This is the error message that I am getting:

Refreshing package metadata. This may take a moment.
   downloading fourseven:scss at version 0.9.5 ...  done

 /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:173
                      throw(ex);
                            ^
 Error: Couldn't parse stack frame: '    at requireBinding (/tmp/node-meteor-30QT/.meteor/packages/fourseven:scss/.0.9.5.1rnvlg0++os.linux.x86_64+web.browser+web.cordova/plugin.meteor-scss.os.linux.x86_64/npm/meteor-scss/node_modules/node-sass/sass.js:17:14)'
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/parse-stack.js:76:13
     at Array.forEach (native)
     at Function._.each._.forEach (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
     at Object.exports.parse (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/parse-stack.js:24:5)
     at Object.exception (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/buildmessage.js:346:28)
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/bundler.js:1107:22
     at Array.forEach (native)
     at Function._.each._.forEach (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
     at _.extend.load (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/bundler.js:1058:7)
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/unipackage.js:445:16
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/buildmessage.js:228:16
     at _.extend.withValue (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/fiber-helpers.js:112:14)
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/buildmessage.js:225:32
     at _.extend.withValue (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/fiber-helpers.js:112:14)
     at Object.enterJob (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/buildmessage.js:223:21)
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/unipackage.js:437:20
     at Function._.each._.forEach (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:87:22)
     at _.extend._ensurePluginsInitialized (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/unipackage.js:425:7)
     at _.extend.getSourceHandlers (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/unipackage.js:380:10)
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/compiler.js:362:21
     at Array.forEach (native)
     at Function._.each._.forEach (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
     at compileUnibuild (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/compiler.js:361:5)
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/compiler.js:879:27
     at Array.forEach (native)
     at Function._.each._.forEach (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
     at Object.compiler.compile (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/compiler.js:878:5)
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/bundler.js:1756:26
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/buildmessage.js:186:11
     at _.extend.withValue (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/fiber-helpers.js:112:14)
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/buildmessage.js:183:27
     at _.extend.withValue (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/fiber-helpers.js:112:14)
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/buildmessage.js:181:16
     at _.extend.withValue (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/fiber-helpers.js:112:14)
     at Object.capture (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/buildmessage.js:172:21)
     at Object.exports.bundle (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/bundler.js:1678:31)
     at main.registerCommand.name [as func] (/tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/commands.js:513:30)
     at /tmp/node-meteor-30QT/.meteor/packages/meteor-tool/.1.0.26.1owm6lu++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/main.js:1212:23
tar: /app/tmp/cache/bundle.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Exiting with failure status due to previous errors

 !     Push rejected, failed to compile Meteor app app

sourceComments set to map doesn't seem to generate sourcemaps

I'm trying to get sourcemaps with the css output and for some reason I don't seem to be able to get the package to produce sourcemaps.

I've set my scss.json file to:

{
    "sourceComments": "map"
}

but can't seem to find any sourcemaps generated. Any help much appreciated :)

Project breaks on start with scss installed (on Mac)

This happens with a fresh projected just created with mrt create after which I installed the scss package. Everything went fine except that now when I run mrt in the project's folder I get this (I also installed the npm package node-sass globally):

npm ERR! missing: jsdom@, required by [email protected]
npm ERR! missing: htmlparser@, required by [email protected]
npm ERR! missing: async@, required by [email protected]
npm ERR! not ok code 0

=> Errors prevented startup:

While building plugin `meteor-scss` in package `scss`:
error: couldn't read npm version lock information

While loading plugin `meteor-scss` from package `scss`:
module.js:338:15: Cannot find module 'node-sass'
  at Function.Module._resolveFilename (module.js:338:15)
  at Function.Module._load (module.js:280:25)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object._.extend.Npm.require (/Users/Nick/.meteor/tools/a80b2d5689/tools/bundler.js:976:22)
  at Package (packages/meteor-scss/plugin/compile-scss.js:2)
  at <runJavaScript-3>:59:4
  at <runJavaScript-3>:66:3


=> Your application has errors. Waiting for file change.

Maps do not work

Create a file with the following:

$my_map: (
    a: 1,
    b: 2
);

The error reported is:

While building the application:
test.scss: Scss compiler error: undefined
/path/to/test.scss:2: error: error reading values after a

Compiling SASS throughs random errors (that aren't actually errors)

Since I had to add fourseven:scss as a dependency my SASS files, my project won't build. It throughs random errors like this one:

=> Errors prevented startup:

While building the application:
client/styles/site.sass: Scss compiler error: undefined
/[...]/client/styles/nav:128: error: invalid property name

But both my native compiler (through Ubuntu/WebStorm) and SassMeister compile my files without any error.

Does not work with Blaze

This package, for some reason, breaks a Blaze project completely.

Steps to reproduce:

meteor create blaze
cd blaze
 meteor update --release=blaze-rc1-1
mrt add jquery
mrt add scss
mrt

Runs good for now. But now install foundation

mrt add foundation5-sass

This is the browser log:

[Error] TypeError: 'undefined' is not an object (evaluating '$jq.event')
    (anonyme Funktion) (ui.js, line 506)
    (anonyme Funktion) (ui.js, line 593)
[Error] TypeError: 'undefined' is not an object (evaluating 'Package.ui.Handlebars')
    (anonyme Funktion) (iron-router.js, line 2206)
    (anonyme Funktion) (iron-router.js, line 2213)
[Error] TypeError: 'undefined' is not an object (evaluating 'Package.ui.UI')
    (anonyme Funktion) (templating.js, line 22)
[Error] TypeError: 'undefined' is not an object (evaluating 'Package.templating.Template')
    (anonyme Funktion) (blaze-layout.js, line 22)
[Error] ReferenceError: Can't find variable: Handlebars
    (anonyme Funktion) (foundation5-sass.js, line 6338)
    (anonyme Funktion) (foundation5-sass.js, line 6346)
[Error] TypeError: 'undefined' is not an object (evaluating 'Package.ui.UI')
    (anonyme Funktion) (spacebars.js, line 23)
[Error] TypeError: 'undefined' is not an object (evaluating 'Package['blaze-layout'].Layout')
    global code (global-imports.js, line 3)
[Error] ReferenceError: Can't find variable: UI
    (anonyme Funktion) (template.blaze.js, line 2)
[Error] ReferenceError: Can't find variable: Meteor
    (anonyme Funktion) (blaze.js, line 1)

file to import not found or unreadable

Hello! I note in the README you mention using Bourbon and Neat via meteor-bower and I'm attempting to do just that (I'm using "mquandalle/meteor-bower").

The issue I've got is that after a meteor reset or in a fresh test environment on Travis-CI, I'm running into what appears to be a race condition with dependency installation. On the first run, I get file to import not found or unreadable: "bourbon" errors which do not occur on subsequent runs of meteor.

Digging through the Meteor docs I don't see a clear way to specify build steps which depend on one another. Any insights as to how to solve this?

any way to set includePaths?

I'm using this package to compile a .scss file that @imports other .scss files that are contained in another package. It works great, but I do have to @import with an explicit (absolute or relative) pathname to the import files. For example:

 @import "packages/my-package/scss/foo.scss" 

Is there a way to set the scss compiler's includePaths option so I can do the following instead?

 @import "foo.scss" 

Thanks in advance for any info. Great package!

better installation instructions?

Hey just a question really
I'm trying to get this to work on my meteor app but it doesnt do anything.

I've installed the packages and created a scss.json file under client/lib

What goes inside this scss.json file? The Readme is a bit brief but as I am new to meteor i'm kinda struggling to get this working.

At the moment I just want it to work so all the scss files in my meteor app are compiled to css.
I have got bootstrap LESS package (I hope that is not causing a conflict?)

No compatible build found

The build on atmosphere seems to be missing / broken. When I try to update (or do a clean install) I'm seeing:

$ meteor update
This project is already at Meteor 1.0.2.1, the latest release.
=> Errors while upgrading packages:           

While checking for fourseven:[email protected]:
error: No compatible build found

I don't know if this is an atmosphere issue or a meteor-scss issue — I'm fairly new to the world of MeteorJS packages.

Meteor 0.8.3 broke node-sass install?

Always seem to have this problem when meteor release an update with this package. Any ideas?

meteor-scss: updating npm dependencies -- node-sass, lodash...
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data

module.js:340
    throw err;
          ^
Error: Cannot find module '/root/.meteorite/packages/scss/fourseven/meteor-scss/185f3b2787fb85e653f7b7bf603d1493ed14943d/.npm/plugin/meteor-scss-new-1mkz2a7/node_modules/node-sass/build.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
npm ERR! [email protected] install: `node build.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

error: package `meteor-scss` is built for incompatible architecture

I just updated a MeteorJS project to 0.9.0 and migrated to the new package system. Meteor List shows I am using the new fourseven:scss package 0.9.4, but when I try to run my Meteor project, I get the following error:

"error: package meteor-scss is built for incompatible architecture"

error

Does this work with Smart Packages?

I have .SCSS files in my main project client compiling, but I don't know how to configure this to compile the files in a custom package.

I have tried configuring the scss.json file and including the path to the scss folder in my package, but it still doesn't compile.

Any suggestions?

libc++ library load issue

I'm getting the following error (this is an excerpt, full error here:

While loading plugin `fourseven:scss` from package `fourseven:scss`:
module.js:356:32:
dlopen(/Users/methuselah/.meteor/packages/fourseven_scss/.1.0.0.wp4tvk++os.linux.x86_64+os.osx.x86_64+web.browser+web.cordova/plugin.fourseven:scss.os.osx.x86_64/npm/fourseven:scss/node_modules/node-sass/bin/darwin-x64-v8-3.14/binding.node,
1): Library not loaded: /usr/lib/libc++.1.dylib
Referenced from:
/Users/methuselah/.meteor/packages/fourseven_scss/.1.0.0.wp4tvk++os.linux.x86_64+os.osx.x86_64+web.browser+web.cordova/plugin.fourseven:scss.os.osx.x86_64/npm/fourseven:scss/node_modules/node-sass/bin/darwin-x64-v8-3.14/binding.node

It's proving tricky to install libc++ and its dependencies. Is there anything else you can suggest to get fourseven:scss running?

Thanks

Library not loaded error message in Snow Leopard OSX 10.6.8

Very new to Meteor so pardon my newbie issue. I just created a new meteor test app and added only fourseven:scss and I get this error message in Terminal when I try to start up the app:

While loading plugin `fourseven:scss` from package `fourseven:scss`:
   module.js:356:32:
   dlopen(/Users/alice/.meteor/packages/fourseven_scss/.1.0.0.umakgb++os.osx.x86_64+web.browser+web.cordova/plugin.fourseven:scss.os.osx.x86_64/npm/fourseven:scss/node_modules/node-sass/bin/darwin-x64-v8-3.14/binding.node,
   1): Library not loaded: /usr/lib/libc++.1.dylib
   Referenced from:
   /Users/alice/.meteor/packages/fourseven_scss/.1.0.0.umakgb++os.osx.x86_64+web.browser+web.cordova/plugin.fourseven:scss.os.osx.x86_64/npm/fourseven:scss/node_modules/node-sass/bin/darwin-x64-v8-3.14/binding.node
   Reason: image not found
   at Module.load (module.js:356:32)
   at Function.Module._load (module.js:312:12)
   at Module.require (module.js:364:17)
   at require (module.js:380:17)
   at requireBinding
   (/Users/alice/.meteor/packages/fourseven_scss/.1.0.0.umakgb++os.osx.x86_64+web.browser+web.cordova/plugin.fourseven:scss.os.osx.x86_64/npm/fourseven:scss/node_modules/node-sass/sass.js:18:14)
   at Object.<anonymous>
   (/Users/alice/.meteor/packages/fourseven_scss/.1.0.0.umakgb++os.osx.x86_64+web.browser+web.cordova/plugin.fourseven:scss.os.osx.x86_64/npm/fourseven:scss/node_modules/node-sass/sass.js:25:15)
   at Module._compile (module.js:456:26)
   at Object.Module._extensions..js (module.js:474:10)
   at Module.load (module.js:356:32)
   at Function.Module._load (module.js:312:12)
   at Module.require (module.js:364:17)
   at require (module.js:380:17)
   at Object._.extend.Npm.require
   (/Users/alice/.meteor/packages/meteor-tool/.1.0.38.1sx6a09++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:1327:22)
   at Package (packages/fourseven:scss/plugin/compile-scss.js:2:1)
   at <runJavaScript-51>:102:4
   at <runJavaScript-51>:109:3

Any ideas? Should this package work on OSX 10.6.8? As a test, I tried a different scss package (bbfc:scss) and that worked just fine for me. Any help would be greatly appreciated.

meteor 0.9.1.1 can't install package

meteor --version
Meteor 0.9.1.1

Ubuntu 14.04 LTS x32

$ meteor add fourseven:scss
Refreshing package metadata. This may take a moment.
Refreshing package metadata. This may take a moment.
No compatible build found for fourseven:[email protected]
Package fourseven:scss has no compatible build for version 0.9.5

"Flash of unstyled content" problems when using the package

Hi!

We're using this package, and it works very well, except that we've experienced FOUC ("Flash Of Unstyled Content") recently. We're using Iron Router, and when switching routes, the markup is briefly rendered unstyled.

I don't know whether this is a Meteor issue, an issue with the compile system, or with this plugin. At least it would be nice with some directions or thoughts regarding this.

We're not doing anything special – just having a semi-large SCSS foundation used with an Iron Router powered Meteor app on 1.0.2.1. Earlier we compiled the SCSS outside of meteor and had a hardcoded link element in the head tag in index.html.

Is Meteor actually inserting the link element for the resulting SCSS in the head async on page load?

Extend class with pseudo elements not working

I have a class that looks like this:

.cf {
&:before,
&:after {
display: table;
content: "";
line-height: 0;
}
&:after {
clear: both;
}
}

If I try to extend that class with @extend .cf; none of the pseudo before and after styles get compiled. If I add something to the .cf class that isn't in the before or after pseudo class it get compiled just fine.

If I compile the scss in CodeKit manually it works fine. Just not in Meteor when using meteor-scss. Thoughts? Am I not using it properly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.