Giter Club home page Giter Club logo

sassc's Introduction

SassC

Unix CI Windows CI

by Aaron Leung (@akhleung), Hampton Catlin (@hcatlin), Marcel Greter (@mgreter) and Michael Mifsud (@xzyfer)

http://github.com/sass/sassc

Warning: LibSass and SassC are deprecated. While it will continue to receive maintenance releases indefinitely, there are no plans to add additional features or compatibility with any new CSS or Sass features. Projects that still use it should move onto Dart Sass.

About SassC

SassC is a wrapper around libsass (http://github.com/sass/libsass) used to generate a useful command-line application that can be installed and packaged for several operating systems.

SassC currently statically links the libsass library, but might one day using dynamic linking if libsass supports that in the future.

About Sass

Sass is a CSS pre-processor language to add on exciting, new, awesome features to CSS. Sass was the first language of its kind and by far the most mature and up to date codebase.

Sass was originally conceived of by the co-creator of this library, Hampton Catlin (@hcatlin). Most of the language has been the result of years of work by Natalie Weizenbaum (@nex3) and Chris Eppstein (@chriseppstein).

For more information about Sass itself, please visit https://sass-lang.com

Initial development of SassC by Aaron Leung and Hampton Catlin was supported by Moovweb.

Documentation

Licensing

Our MIT license is designed to be as simple, and liberal as possible.

sassc's People

Contributors

am11 avatar asottile avatar ausi avatar bitc avatar craigbarnes avatar docteurklein avatar fnd avatar glebm avatar hamptonmakes avatar intact avatar jbussdieker avatar kaelig avatar kornelski avatar luizfb avatar mgreter avatar nex3 avatar nschonni avatar parhs avatar qulogic avatar rototor avatar russell-stripe avatar saper avatar simi avatar smmccabe avatar stijnvn avatar taritsyn avatar tcyrus avatar vadymkyiv avatar wonja avatar xzyfer 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sassc's Issues

New API usage breaks sourcemap generation

With commit 52f6857 the source map generation does no longer work.

I call my self compiled sassc like this:

sassc.mac --style nested --sourcemap  frontpage.scss  sassc_result.css

sassc returns the error code 2 for "internal unknown error". In sassc.c:113 output gets called with all (but the last) parameter set to null.

With commit bbbac5d everything works as expected. So i will use this revision for now.

Segfault on if statement

While the underlying issue is probably a libsass issues, I've managed to get a segfault using sassc with the following scss:

.example {
  $color: blue;
  color: if(length($color) == 2, nth($color, 2), red);
}
$ sassc < main.scss
zsh: segmentation fault  sassc < main.scss

On mac osx 10.9.2, installed via homebrew. sassc: stable 1.0.1.

No submodule mapping found in .gitmodules for path 'tests/compass'

Awesome project, I love where this is going! I just cloned and compiled it (works great). Just wanted to let you know that I got the following message while init'ing the submodule:

$ git submodule init
No submodule mapping found in .gitmodules for path 'tests/compass'

support building sassc with shared libsass library

As far as I can tell libsass can be build as a shared module by now. However I don't see a matching make target in sassc's Makefile to use such a shared libsass.

Even if static linking is still the default it would be nice to have a shared build target available.

New API breaks @import with load paths

@mgreter I started getting the following error

/Users/michael/Projects/Sass/test/css/swiftly/_settings.scss:6: file to import not found or unreadable: asimov-core/core
Current dir: /Users/michael/Projects/Sass/test/css/swiftly/

The first 7 lines of css/swiftly/_settings.scss are

$asimov-image-path: "/tasks/assets/img/";
$asimov-font-path: "/tasks/assets/";
$asimov-icon-path: "/tasks/assets/";

// Asimov.
@import "asimov-core/core";
@import "asimov-core/settings";

The command I'm running is

time /Users/michael/Projects/Sass/libsass/sassc/bin/sassc css/swiftly/_settings.scss -I components -I css settings.css

The asimov-core/core file exists in the components direct given in the load path

$  ls -l components/asimov-core/core.scss
-rw-r--r--  1 michael  staff  15182 21 Oct 14:20 components/asimov-core/core.scss

I did some digging and found the issue was introduced in 52f6857.

I hope is enough information.

Weird SASS_LIBSASS_PATH issue.

I'm running Ubuntu 14.10 (pretty new to it), and I'm trying to build SassC. When I try to run sudo make, it tells me that SASS_LIBSASS_PATH isn't defined. After doing an echo, the variable's value seems to be the correct path, directing straight into the root folder of libsass.

sam@sam-AY747AA-ABA-p6310y:/usr/local/lib/sassc$ echo $SASS_LIBSASS_PATH
/usr/local/lib/libsass/
sam@sam-AY747AA-ABA-p6310y:/usr/local/lib/sassc$ sudo make
Makefile:131: *** SASS_LIBSASS_PATH must be defined.  Stop.

If I could get some help for this, that would be great.

Automatic builds for Linux and other platforms

Just wanted to know if you plan to make automatic builds of this for Linux and also for other platforms.

It seems that majority of people don't know how to use this and because of that new forks are created in different languages.

Can we maybe somehow help with this? Creating PPA for Ubuntu, RPM for RedHat and also compile it as a binary?

Invalid output and errors when extending attribute selectors

(Originally filed as sass/libsass#342)

SassC doesn't extend attribute selectors correctly; for example, given the input:

%abstract {
    &[data-foo="bar"] {
        margin: 0;
    }
}

.test {
    @extend %abstract;
}

...SassC outputs the incorrect:

[data-foo="bar"].test {
  margin: 0; }

and then exits with an error status (2) and the error Unknown internal error..

Tested with 73f6425 compiled against sass/libsass@0d5a942; sass/node-sass@2cd5792 gives the output correctly without an error, so the problem seems to lie with SassC rather than libsass...

dlopen variant

Here is the source file of a test that we used for dynamically loading libsass.
This is self-contained, though our deployment has split the class declaration into it's own files.

//File "dlsass.cpp"; Compile this with g++ dlsass.cpp  -o dlsass
//Should work on unix / macos x
#include <dlfcn.h>
#include <iostream>
#include <stdio.h>
#include <string>

extern "C" {
    #define SASS_STYLE_NESTED     0
    struct sass_options {
        int output_style;
        char* include_paths;
        char* image_path;
    };
    struct sass_context {
        const char* source_string;
        char* output_string;
        struct sass_options options;
        int error_status;
        char* error_message;
    };
    struct sass_context* sass_new_context(void);
    void sass_free_context (struct sass_context* ctx);
    int sass_compile (struct sass_context* ctx);
    typedef struct sass_context sass; //note this typedef!
}

class Sass {
    private:
        static void * sass_lib_handle;
        static bool loadattempted;  //used to show if the service is up or down.
        static bool loaded; //used to show if the service is up or down.    
        static sass* ctx;       
        static void reporterror(int);       
        static sass* (*sass_new_context)(void);
        static int (*sass_compile)(sass*);
        static int (*sass_free_context)(sass*);

        static const char* dlerr() {
            const char *err = dlerror();
            if (err != NULL) {
                std::string msg = err;
                std::cerr << "Sass::startup() dlsym reported '" << err << "'.";
            }
            return err;
        }

    public:
        static bool available() {
            if (!loadattempted) startup();
            return loaded;
        }
        static bool startup() {
            const char *err = NULL;
            if ( ! loadattempted ) {
                loadattempted = true;
                loaded = false;
        #ifdef __MACH__
                std::string sasslib = "libsass.dylib";
        #else
                std::string sasslib = "libsass.so";
        #endif
                sass_lib_handle = dlopen(sasslib.c_str(),RTLD_GLOBAL | RTLD_NOW);
                err = dlerr();
                if (err == NULL && sass_lib_handle != NULL ) {
                    sass_new_context = (sass* (*)(void)) dlsym(sass_lib_handle,"sass_new_context"); err = dlerr();
                    if (err == NULL) {
                        sass_compile = (int (*)(sass*)) dlsym(sass_lib_handle,"sass_compile"); err = dlerr();
                    }
                    if (err == NULL) {
                        sass_free_context = (int (*)(sass*)) dlsym(sass_lib_handle,"sass_free_context"); err = dlerr();
                    }
                    if ( err == NULL) {
                        if ( sass_new_context != NULL && sass_compile != NULL && sass_free_context!=NULL) {
                            loaded = true;
                            ctx = sass_new_context();
                            if (ctx != NULL) {
                                char empty[] = "";
                                ctx->options.include_paths = empty;
                                ctx->options.image_path = empty;
                                ctx->options.output_style = SASS_STYLE_NESTED; //only nested appears to be supported atm.
                            }
                        } else {
                            std::cerr << "Sass::startup() The sass library was not loaded.";
                        }
                    }
                }
            }
            return loaded;
        }
        static bool shutdown() {    
            if ( sass_lib_handle != NULL ) {
                if ( ctx!= NULL) {
                    sass_free_context(ctx); ctx= NULL;
                }
                dlclose(sass_lib_handle);
            }
            return true;
        }
        static bool expand(const std::string &source,std::string &result,std::string &errs) {
            bool retval=true;
            ctx->source_string=source.c_str();
            sass_compile(ctx);
            if (ctx->error_status) {
                retval = false;
                if (ctx->error_message) {
                    errs = ctx->error_message;
                } else {
                    errs = "An unknown error occured during a scss sass expansion.";
                }
                ctx->error_status = 0;
                ctx->error_message = NULL;
            }
            else if (ctx->output_string) {
                result = ctx->output_string;
            }
            return retval;
        }
};

sass* Sass::ctx = NULL;
bool Sass::loadattempted = false;
bool Sass::loaded = false;
void* Sass::sass_lib_handle = NULL;
sass* (*Sass::sass_new_context)(void)= NULL;
int (*Sass::sass_compile)(sass*)= NULL;
int (*Sass::sass_free_context)(sass*)= NULL;

int main(int argc, char** argv) {
    int ret = 0;
    std::string sass_in = "$rside: 80%;\n.foo {  margin-right: $rside / 2; }";  
    std::string sass_result,errs;
    if (Sass::available()) {
        if (!Sass::expand(sass_in,sass_result,errs)) {
            std::cerr << "Sass Error during expansion: " << errs;
        }
    } else {
        std::cerr << "Sass not available";
    }
    std::cout << sass_result;
    Sass::shutdown();
    return ret;
}

Glob as input and folder as output supported?

Currently I’m using gulp-sass a bit like (simplified for readability):

gulp.src('./public/sass/**/*.scss')
  .pipe(sass())
  .pipe(gulp.dest('./public/css'));

However I want to get rid of some of my build process’ dependencies and use a shell script or Makefile instead.

I can’t figure out how to use a glob for input and a folder for output though. Is this even possible? What about --watch which is supported by Ruby Sass?

If not, I can (as a Linux beginner, help is much appreciated) probably figure something out with find --exec or similar, but before going there I wanted to make sure first.

Question: Best tool to use with sassc for browser reloads ?

Hello

Do we have to use node packages such as gulp or grunt to get the livereload workflow to work with sassc or is there another method.

I want to avoid installed node on my system and just stick with libsass + sassc + some browser reload tool

Using getopt_long for command line parsing

Is anyone opposed to using getopt_long instead of POSIX getopt? It's less portable in theory but would allow sassc to properly emulate all the Ruby Sass long options (some of which have no short equivalent). It also seems like a good idea to accept and ignore the --scss option, instead of throwing an error, since it's already implicit.

Does OS X have getopt_long?

Source map paths behave badly on Win32

Some example bad outputs in the source map for Windows:
../C:\foo\bar\baz.scss
../../../../../C:\foo\bar\baz.scss
../C:\foo\bar/qux.scss
C:\foo\bar/qux/quux.scss

When source_map_file and input_path are in the same directory, it does not output relative paths in the source map and instead uses mixed slashes as shown above.

Workaround: replace backslashes with forward slashes in both input_path and source_map_file.

I'd be OK with it using forward slashes as ultimately this will be served from a URL and forward slashes are appropriate for URLs, but it doesn't make the URL relative and that's an issue.

Compiling on Linux(Ubuntu 12.10)

gcc -Wall -O2  -O2  sassc.c  -lstdc++ -lm -o sassc
/tmp/cc13fuSO.o: In function `compile_stdin':
sassc.c:(.text+0x221): undefined reference to `sass_new_context'
sassc.c:(.text+0x253): undefined reference to `sass_compile'
sassc.c:(.text+0x271): undefined reference to `sass_free_context'
/tmp/cc13fuSO.o: In function `compile_file':
sassc.c:(.text+0x31a): undefined reference to `sass_new_file_context'
sassc.c:(.text+0x343): undefined reference to `sass_compile_file'
sassc.c:(.text+0x360): undefined reference to `sass_free_file_context'
collect2: error: ld returned 1 exit status
make: *** [sassc] Error 1

output_style arg does not work

I try to set ctx->options.output_style to a value 1 - 3, but the output css are all blank str. I can only set the value to SASS_STYLE_NESTED, it works. I dont known why. Is this a bug?

some code:

sass_context* ctx = sass_new_context();

sassc crashes

When this code is present sassc will crash:

headerdiv {

background: -moz-linear-gradient(top, $headerGradientStart 0%,  $headerGradientEnd 166px, #ffffff 166px); 

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, $headerGradientStart), color-stop(166px, $headerGradientEnd), color-stop(166x,#ffffff), color-stop(175px,#ffffff)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, $headerGradientStart 0%, $headerGradientEnd 166px, #ffffff 166px); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, $headerGradientStart 0%, $headerGradientEnd 166px, #ffffff 166px); /* Opera 11.10+ */

background: -ms-linear-gradient(top, $headerGradientStart 0%, $headerGradientEnd 166px, #ffffff 166px);
background: linear-gradient(top, $headerGradientStart 0%, $headerGradientEnd 166px, #ffffff 166px);

/* IE 6-9 gradients */
-pie-background: linear-gradient(top, $headerGradientStart 0%, $headerGradientEnd 166px, #ffffff 166px);

behavior: url(/styles-general/PIE.htc);

}

after removing following 2 lines it will work properly:

background: -ms-linear-gradient(top, $headerGradientStart 0%, $headerGradientEnd 166px, #ffffff 166px);
background: linear-gradient(top, $headerGradientStart 0%, $headerGradientEnd 166px, #ffffff 166px);

What compiles Sassc?

I click on the 'Makefile' file and it creates a binary. What compiler is doing the compilation and why is it installed on my Mac?

Command line --version/-v flag

Currently, sassc does not have the ability to output sassc/libsass versions. This should probably mimic the functionality of the ruby executable.

sassc version does not match libsass?

libsass tests are failing, but I also noticed the version difference
Most recent libsass version is 3.2.0-beta.2-6-g5f01
Most recent version of sassc is 3.1.0-13-g4e9a
$ ./version.sh
3.1.0-13-g4e9a

Am I missing something or the release has not been done? Also, sass gem version is 3.4.13.

@debug variable in @at-root context gives error

I was trying out some @at-root functionality in sassc 3.2.0-beta.2. Came across the following error:

error message:

sassc debug.scss 
Error: non-terminal statement or declaration must end with ';'
        on line 7 of debug.scss
>>         @debug-map {
   ---------------^

sass code:

$map: (
    'key': 'value',
);

@mixin debug-map($map) {
    @at-root {
        @debug-map {
            __toString__: inspect($map);
            __length__: length($map);
            __keys__: map-keys($map);
            __properties__ {
                @each $key, $value in $map {
                    #{$key}: inspect($value);
                }
            }
        }
    }
}

.debug {
  @include debug-map($map);
}

tested on:

sassc -v
sassc: 3.2.0-beta.2
libsass: 3.2.0-beta.2-21-g3681
sass2scss: 1.0.3

Compiler failing when using # in a media query

At least I think it's the # causing it.

I was just testing out using SassC on a project which we are currently compiling with regular sass. SassC throws an error while trying to parse the contents of an @ import of CSS Wizardry Grids. The error is:

<path to project folder>/static/scss/lib/csswizardry-grids.scss:179: error: invalid media query

Line 179 - 181 of csswizardry-grids.scss reads:

@media only screen and #{$declaration}{
    @content;
}

Is this an issue with SassC or something else?

Multiple include paths

Can support for multiple include paths be added? I need this because we currently compile assets in /tmp via Assetic library in php. I can use only one include path at the moment and I need to use 2 of them.

One for general scss files and second one for original directory where asset was, before it got moved to /tmp to be compiled.

Proposed functionality:

sassc -I /path1 -I /path2 style.scss

Missing link to libm

Linking fails:

/usr/bin/ld: libsass/libsass.a(functions.o): undefined reference to symbol 'floor@@GLIBC_2.2.5'
/usr/bin/ld: note: 'floor@@GLIBC_2.2.5' is defined in DSO /lib/libm.so.6 so try adding it to the linker command line
/lib/libm.so.6: could not read symbols: Invalid operation

Following this helpful suggestion fixes the problem. Just add -lm to the gcc line in the Makefile.

CLI options: debug info & sourcemap

If I remember well, the previous flag -g was for the Debug-Info. Is this feature is still available in Sassc? Because it's now mapped to the sourcemap option.

I'm thinking that it should be better for users (and on the Sass porting in general) to keep a closer CLI from the Ruby-Sass version. So the new Sourcemap option should be available via the --sourcemap flag.

In the past there was some confusions between debug-info, sourcemap and source-comments (which are all different things). A more clear CLI and documentation (via the -h) should help users (and Libsass/Sassc contributors) to be less confused. So the new -g should be definitely another letter (because it correspond to debug-info in Ruby-Sass).

Make it more accessible to Windows users.

I was unable to compile this using any version of MSVC. Finally got it to build using MingW. Took several hours to figure out. Please don't leave Windows users stranded with Ruby!

It would be great to have:

  • Compilation instructions for Windows
  • Some precompiled binaries available
  • Better support for MSVC (if feasible)

compiling on windows

Hey Hampton!

I am hoping to get set up to provide Windows binaries for the node-sass project (for eventual use with the JS build tool gruntjs). There is some discussion about it @ sass/node-sass#10.

I develop on Mac, but I spun up a Windows VM today to give this a shot. I could well be doing something wrong, but here is what I turned up using Visual C++ Express 2010 on an x86 install of Windows 7:

------ Build started: Project: Sassc, Configuration: Debug Win32 ------
  sassc.c
c:\users\tyler\documents\github\sassc\sassc.c(11): error C2143: syntax error : missing ';' before 'type'
c:\users\tyler\documents\github\sassc\sassc.c(12): error C2065: 'ctx' : undeclared identifier
c:\users\tyler\documents\github\sassc\sassc.c(12): error C2223: left of '->options' must point to struct/union
c:\users\tyler\documents\github\sassc\sassc.c(13): error C2065: 'ctx' : undeclared identifier
c:\users\tyler\documents\github\sassc\sassc.c(13): error C2223: left of '->options' must point to struct/union
c:\users\tyler\documents\github\sassc\sassc.c(14): error C2065: 'ctx' : undeclared identifier
c:\users\tyler\documents\github\sassc\sassc.c(14): error C2223: left of '->input_path' must point to struct/union
c:\users\tyler\documents\github\sassc\sassc.c(16): error C2065: 'ctx' : undeclared identifier
c:\users\tyler\documents\github\sassc\sassc.c(16): warning C4047: 'function' : 'sass_file_context *' differs in levels of indirection from 'int'
c:\users\tyler\documents\github\sassc\sassc.c(16): warning C4024: 'sass_compile_file' : different types for formal and actual parameter 1
c:\users\tyler\documents\github\sassc\sassc.c(18): error C2065: 'ctx' : undeclared identifier
c:\users\tyler\documents\github\sassc\sassc.c(18): error C2223: left of '->error_status' must point to struct/union
c:\users\tyler\documents\github\sassc\sassc.c(19): error C2065: 'ctx' : undeclared identifier
c:\users\tyler\documents\github\sassc\sassc.c(19): error C2223: left of '->error_message' must point to struct/union
c:\users\tyler\documents\github\sassc\sassc.c(19): error C2065: 'ctx' : undeclared identifier
c:\users\tyler\documents\github\sassc\sassc.c(19): error C2223: left of '->error_message' must point to struct/union
c:\users\tyler\documents\github\sassc\sassc.c(22): error C2065: 'ctx' : undeclared identifier
c:\users\tyler\documents\github\sassc\sassc.c(22): error C2223: left of '->output_string' must point to struct/union
c:\users\tyler\documents\github\sassc\sassc.c(23): error C2065: 'ctx' : undeclared identifier
c:\users\tyler\documents\github\sassc\sassc.c(23): error C2223: left of '->output_string' must point to struct/union
c:\users\tyler\documents\github\sassc\sassc.c(29): error C2065: 'ctx' : undeclared identifier
c:\users\tyler\documents\github\sassc\sassc.c(29): warning C4047: 'function' : 'sass_file_context *' differs in levels of indirection from 'int'
c:\users\tyler\documents\github\sassc\sassc.c(29): warning C4024: 'sass_free_file_context' : different types for formal and actual parameter 1
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Do you have any advice on how to proceed? Also, thank you so much for all the work on sass, I'm stoked to start using it in JS projects.

Don’t output properties when the value is `null`

The ruby implementation omits properties when their value is null. This behavior can lead to less cluttered code e.g. in mixins.

Example:

@mixin border($top: null, $right: null, $bottom: null, $left: null) {
  border-top: $top;
  border-right: $right;
  border-bottom: $bottom;
  border-left: $left;
}

.box {
  @include border($left: 1px solid);
}

Expected Output

.box {
  border-left: 1px solid; }

sassc output:

.box {
  border-top: null;
  border-right: null;
  border-bottom: null;
  border-left: 1px solid; }

no output from sassc when using output mode different from nested

I don't get any output from sassc if I use the '-t' option with a value different from 'nested'.

For example:

$ sassc -t expanded test.sass
# no output at all

My test.sass file is pretty simple:

$color: #eeeeee;

body {
  font: {
    color: $color;
  }
}

I'm using libsass 9c05850 and sassc 4905e0e (afaik the latest versions as of March 20 2013) on Fedora 18 with a shared libsass.

RGBA value doesn't work

This code:

$mw_box_shadow: 0 1px 3px rgba(0,0,0,0.9);
div{
  -webkit-box-shadow: $mw_box_shadow;
}

spits out this error:

Segmentation fault: 11

But this works:

$mw_box_shadow: 0 1px 3px #333;
div{
  -webkit-box-shadow: $mw_box_shadow;
}

Running both of the above as an inline command without supplying the output file:

$ sassc main.scss

"make test" just displays sassc usage

I might be missing something, but I'm trying to run the tests following the instructions in the README, but it just displays the help text for sassc. The Makefile has the test target defined as follows:

test: all
        bin/sassc -h

Am I missing something here?

Compiling sassc

Hi,

Tried compiling sassc 3.0.2 with 3.0.2 libsass but it fails. OS is RHEL 6.x and I tried using GCC Version gcc version 4.7.2 and gcc version 4.4.x

BUILD="static" make -C /usr/local/src/sassc/libsass
make[1]: Entering directory /usr/local/src/sassc/libsass' g++ -std=c++0x -Wall -fPIC -O2 -c -o ast.o ast.cpp In file included from ast.cpp:1: ast.hpp: In constructor ‘Sass::Hashed::Hashed(size_t)’: ast.hpp:211: error: ‘class std::unordered_map<Sass::Expression*, Sass::Expression*, std::hash<Sass::Expression*>, std::equal_to<Sass::Expression*>, std::allocator<std::pair<Sass::Expression* const, Sass::Expression*> > >’ has no member named ‘reserve’ ast.hpp: In member function ‘Sass::Hashed& Sass::Hashed::operator+=(Sass::Hashed*)’: ast.hpp:236: error: expected initializer before ‘:’ token ast.hpp:239: error: expected primary-expression before ‘return’ ast.hpp:239: error: expected ‘;’ before ‘return’ ast.hpp:239: error: expected primary-expression before ‘return’ ast.hpp:239: error: expected ‘)’ before ‘return’ ast.hpp: In member function ‘virtual bool Sass::Map::operator==(Sass::Expression&) const’: ast.hpp:719: error: expected initializer before ‘:’ token ast.hpp:721: error: expected primary-expression before ‘return’ ast.hpp:721: error: expected ‘;’ before ‘return’ ast.hpp:721: error: expected primary-expression before ‘return’ ast.hpp:721: error: expected ‘)’ before ‘return’ ast.hpp: In member function ‘virtual size_t Sass::Map::hash()’: ast.hpp:733: error: expected initializer before ‘:’ token ast.hpp:736: error: expected primary-expression before ‘return’ ast.hpp:736: error: expected ‘;’ before ‘return’ ast.hpp:736: error: expected primary-expression before ‘return’ ast.hpp:736: error: expected ‘)’ before ‘return’ ast.hpp: In member function ‘virtual size_t Sass::Function_Call::hash()’: ast.hpp:920: error: expected initializer before ‘:’ token ast.hpp:923: error: expected primary-expression before ‘return’ ast.hpp:923: error: expected ‘;’ before ‘return’ ast.hpp:923: error: expected primary-expression before ‘return’ ast.hpp:923: error: expected ‘)’ before ‘return’ In file included from ast.cpp:1: ast.hpp: In member function ‘virtual size_t Sass::String_Schema::hash()’: ast.hpp:1257: error: expected initializer before ‘:’ token ast.hpp:1260: error: expected primary-expression before ‘return’ ast.hpp:1260: error: expected ‘;’ before ‘return’ ast.hpp:1260: error: expected primary-expression before ‘return’ ast.hpp:1260: error: expected ‘)’ before ‘return’ make[1]: *** [ast.o] Error 1 make[1]: Leaving directory/usr/local/src/sassc/libsass'
make: *** [libsass-static] Error 2

Is spec/bourbon_test/input.scss able to compile?

Is test bourbon file spec/bourbon_test/input.scss able to be compiled? I doesn't compile for me. I get the error

terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check
Abort trap

Regarding Ruby dependency choice

@mgreter, @xzyfer

Here is a list of C++ testing frameworks: http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C.2B.2B

I purpose to make use of one of these (for instance CppUnit) to run sass-spec test suite in an effort to exempt
ruby dependenc[y/ies] (gem install minitest et al.).

One of the chief benefit is that it would enable us to test libsass' disableable options
more thoroughly and especially those related to source-map.

Thoughts?

BTW, Happy new year 2015! 🎈 🎉 🎆

Can't use --stdin option

Hi,

I've installed sassc through libsass (tried stable and unstable), but can't see the --stdin option.
Looks like I run sassc version 0.4.2

./bin/sassc --version
sassc 0.4.2

./bin/sassc --help
Usage: sassc [options] SCSS_FILE [OUT_CSS_FILE]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -s STYLE, --output-style=STYLE
                    Coding style of the compiled result.  Choose one of
                    compact, expanded, compressed, or nested. [default:
                    nested]
   -m, -g, --sourcemap   Emit source map.  Requires the second argument (output
                    css filename).
   -I DIR, --include-path=DIR
                    Path to find "@import"ed (S)CSS source files.  Can be
                    multiply used.
   -i DIR, --image-path=DIR
                    Path to find images. [default: ./]
   -w, --watch           Watch file for changes.  Requires the second argument
                    (output css filename).

Obviously if i give something from stdin or if I use --stdin arg, it fails. Why do ./bin/sassc doesn't give the same options as I can see there ? https://github.com/sass/sassc/blob/master/sassc.c

Thanks in advance

how to update sassc

I wanted to update sassc (and libsass) and just did git pull in each directory. Is that enough, or do I have to somehow build / make / link it again ?

Segfault 11 on scss file

test.scss:

$blue: #3bbfce;
$margin: 16px;

.content-navigation {
  border-color: $blue;
  color: darken($blue, 9%);
  .test {
    background: url('image.png');
  }
}

.border {
  padding: $margin / 2;
  margin: $margin / 2;
  border-color: $blue;
}

Output: $ bin/sassc test.scss
Segmentation fault: 11

Compiling on Mac Os X(mountain lion)

gcc -O2  sassc.o  -lstdc++ -lm -o sassc
Undefined symbols for architecture x86_64:
  "_sass_new_file_context", referenced from:
      _compile_file in sassc.o
      _main in sassc.o
  "_sass_compile_file", referenced from:
      _compile_file in sassc.o
      _main in sassc.o
  "_sass_free_file_context", referenced from:
      _compile_file in sassc.o
      _main in sassc.o
  "_sass_new_context", referenced from:
      _compile_stdin in sassc.o
  "_sass_compile", referenced from:
      _compile_stdin in sassc.o
  "_sass_free_context", referenced from:
      _compile_stdin in sassc.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [sassc] Error 1

-w, --watch option

Hi guys,

sassc is incredible and really fast! Several times faster than ruby version!
I miss the -w, --watch option

This is my fault? If not, is there any chance to add this feature?

Thanks!!!

Keep /* */ comments when

Is there a way to keep /* */ comments when compiling in sassc, when type is compressed, like you do in sass

I need it because I'm developing a Wordpress theme and they require some comments at the start!

Thanks!

Question: Installing on Windows

Hi,

Noob question, but how do you install this thing on windows. I've done it peice of cake on Ubuntu. However when using the make command on windows I get the following error:

BUILD="static" make -C C:\libsass-3.1.0
'BUILD' is not recognized as an internal or external command,
operable program or batch file.
make: *** [libsass-static] Error 1

Note: I have set the libsass environment variable already!

Thanks! I really need to use this tool urgently.

Using this with compass

Is it possible to use this sassc binary with compass? Pycharm has specific integration with compass and using the configuration file is very useful.

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.