jescalan / roots

a toolkit for rapid advanced front-end development
http://roots.netlify.com/
Other
1.45k stars 132 forks source link

compile production env output [object Object] in css file #667

Closed danielforsberg closed 9 years ago

danielforsberg commented 9 years ago

I have an app.wp.coffee with:

axis         = require 'axis'
rupture      = require 'rupture'
autoprefixer = require 'autoprefixer-stylus'
js_pipeline  = require 'js-pipeline'
css_pipeline = require 'css-pipeline'
bootstrap    = require 'bootstrap-styl'

module.exports =
    output: '../docroot/wp-content/themes/millennium/assets'

    ignores: ['readme.md', '**/layout.*', '**/_*', '.gitignore', 'ship.*conf', 'public']

    extensions: [
    js_pipeline(files: 'assets/js/*.js', out: 'js/build.js', minify: true),
    css_pipeline(files: 'assets/css/*.styl', out: 'css/build.css', minify: true)
  ]

    stylus:
    use: [axis(), rupture(), autoprefixer(), bootstrap()]

    jade:
        pretty: true

roots compile -e wp brings all the files where the output is set but the javascript is empty and the css file contains the text [object Object]

This worked before the update to 3.1.0

Thanks

sospedra commented 9 years ago

I'm not sure if something of the implementation changed with this new release but it has some very bad issues (e.g.: #654) I'd recommend you to rollback to 3.1.0 (npm i roots@3.1.0 -g) and stay in there since the 3.2.0 became more stable. Anyway, you could wait for @jenius to shed some light.

danielforsberg commented 9 years ago

Thanks for the tip with the rollback, but wierdly I still get the same result. (Since I already was on 3.1.0 I rolled back to 3.0.0).

johnpeele commented 9 years ago

+1

I am getting this same issue. I am on 3.1.0 as well.

brewingcode commented 9 years ago

This is fixed in commit carrot/roots-css-pipeline@5c588a8b9b23b292f54c7fd89037dd92e127eaf0 (included in v0.3.0 of css-pipeline), so I've found it easiest to just use 0.3.x as my css-pipeline in my package.json:

    "coffee-script": "1.9.x",
    "css-pipeline": "0.3.x",
    "jade": "1.x",

This produces properly minified css.

danielforsberg commented 9 years ago

Thanks @brewingcode - This resolved the issue