stephenlacy / gulp-stylus

Stylus plugin for gulp
MIT License
223 stars 60 forks source link

import problem #123

Closed ghost closed 9 years ago

ghost commented 9 years ago

I have this strange problem

f:\**\**\develop>gulp watch:styles
[23:55:41] Using gulpfile f:\**\**\templates\develop\gulpfile.js
[23:55:41] Starting 'watch:styles'...
[23:55:42] Finished 'watch:styles' after 906 ms
[23:55:49] Starting 'styles'...
[23:55:49] Finished 'styles' after 10 ms
Potentially unhandled rejection [2] ParseError: f:\**\templates\nib.js:15:108
   11| var stylus = require('stylus'),
   12|     path = require('path'),
   13|     nodes = stylus.nodes,
   14|     utils = stylus.utils,
   15|     Canvas;
-----------------------------------------------------------------------------------------
   16|
   17| exports = module.exports = plugin;
   18|

expected "indent", got ";"

This only happens when I add @import "" (it does not make any difference with nib, rupture, lost-grid etc.

this is my gulpfile.js

var gulp = require('gulp');
var stylus = require('gulp-stylus');
var nib = require('nib');

gulp.task('styles', function() {
    gulp.src('*.styl')
        .pipe(stylus({
    'include css': true
  }))
        .pipe(gulp.dest('./'));
});

gulp.task('watch:styles', function() {
    gulp.watch('**/*.styl', ['styles']);
});

and my style.styl

@import 'nib'

body
    background #89B436
    color #444
    h1
        font 14px
jescalan commented 9 years ago

It's really difficult for me to read this or understand what the issue is here. Is there any way you could revisit the formatting here and make it a little easier for me to understand?

ghost commented 9 years ago

strange thing this morning it worked

stephenlacy commented 9 years ago

I edited @aureliusster's comment as it was not updated.

jescalan commented 9 years ago

...so this is working now?

stephenlacy commented 9 years ago

Closing now, no conclusive response from OP