Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stephenlacy/gulp-stylus
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f9d2369d55e7d26d5e43432f0afdea5b2116f801
Choose a base ref
...
head repository: stephenlacy/gulp-stylus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d79824c819c86ab2fed1596b7894761065bf8cf2
Choose a head ref
  • 4 commits
  • 5 files changed
  • 2 contributors

Commits on Nov 23, 2016

  1. Copy the full SHA
    7fb0e16 View commit details

Commits on Dec 20, 2016

  1. update licenses

    stephenlacy committed Dec 20, 2016
    Copy the full SHA
    029e104 View commit details

Commits on Dec 25, 2017

  1. Remove gulp-util

    stephenlacy committed Dec 25, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    stephenlacy Stephen Lacy
    Copy the full SHA
    f222454 View commit details
  2. 2.7.0

    stephenlacy committed Dec 25, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    stephenlacy Stephen Lacy
    Copy the full SHA
    d79824c View commit details
Showing with 22 additions and 21 deletions.
  1. +1 −1 LICENSE
  2. +2 −2 README.md
  3. +2 −2 index.js
  4. +5 −4 package.json
  5. +12 −12 test/main.js
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Steve Lacy (slacy.me) <me@slacy.me> | Fractal (wearefractal.com)
Copyright (c) 2015 Steve Lacy (slacy.me) <me@slacy.me>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -110,9 +110,9 @@ gulp.task('pass-object', function () {
// Use with gulp-data
gulp.task('gulp-data', function() {
gulp.src('./components/**/*.styl')
.pipe(data(function(){
.pipe(data(function(file){
return {
componentPath: '/' + (file.path.replace(file.base, '').replace(/\/[^\/]*$/, ''));
componentPath: '/' + (file.path.replace(file.base, '').replace(/\/[^\/]*$/, ''))
};
}))
.pipe(stylus())
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -2,14 +2,14 @@

var through = require('through2');
var stylus = require('accord').load('stylus');
var gutil = require('gulp-util');
var rext = require('replace-ext');
var extname = require('path').extname;
var assign = require('lodash.assign');
var PluginError = require('plugin-error');
var applySourceMap = require('vinyl-sourcemaps-apply');

function guErr(err) {
return new gutil.PluginError('gulp-stylus', err);
return new PluginError('gulp-stylus', err);
}

module.exports = function (options) {
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "gulp-stylus",
"description": "Stylus plugin for gulp",
"version": "2.6.0",
"version": "2.7.0",
"homepage": "http://github.com/stevelacy/gulp-stylus",
"repository": {
"type": "git",
"url": "http://github.com/stevelacy/gulp-stylus.git"
},
"author": "Steve Lacy <me@slacy.me> (http://slacy.me) | Fractal (http://wearefractal.com)",
"author": "Steve Lacy <me@slacy.me> (http://slacy.me)",
"main": "./index.js",
"dependencies": {
"accord": "^0.26.3",
"gulp-util": "^3.0.6",
"lodash.assign": "^3.2.0",
"plugin-error": "^0.1.2",
"replace-ext": "0.0.1",
"stylus": "^0.54.0",
"through2": "^2.0.0",
@@ -21,7 +21,8 @@
"devDependencies": {
"gulp-sourcemaps": "^1.5.2",
"mocha": "^2.3.2",
"should": "^8.0.2"
"should": "^8.0.2",
"vinyl": "^2.1.0"
},
"engines": {
"node": ">= 4.2.0"
24 changes: 12 additions & 12 deletions test/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

var should = require('should');
var gutil = require('gulp-util');
var sourcemaps = require('gulp-sourcemaps');
var File = require('vinyl');
var originalStylus = require('stylus');
var stylus = require('../');
var fs = require('fs');
@@ -15,7 +15,7 @@ describe('gulp-stylus', function() {
it('should render stylus .styl to CSS .css', function(done) {
var stream = stylus();

var fakeFile = new gutil.File({
var fakeFile = new File({
base: 'test/fixtures',
cwd: 'test/',
path: 'test/fixtures/normal.styl',
@@ -35,7 +35,7 @@ describe('gulp-stylus', function() {

it ('should compress when called', function(done) {
var stream = stylus({compress: true});
var fakeFile = new gutil.File({
var fakeFile = new File({
base: 'test/fixtures',
cwd: 'test/',
path: 'test/fixtures/normal.styl',
@@ -57,7 +57,7 @@ describe('gulp-stylus', function() {

it ('should import other .styl files', function(done) {
var stream = stylus({import: __dirname + '/fixtures/one.styl'});
var fakeFile = new gutil.File({
var fakeFile = new File({
base: 'test/fixtures',
cwd: 'test/',
path: 'test/fixtures/normal.styl',
@@ -78,7 +78,7 @@ describe('gulp-stylus', function() {

it ('should define variables in .styl files', function(done) {
var stream = stylus({define: {'white': '#fff'}});
var fakeFile = new gutil.File({
var fakeFile = new File({
base: 'test/fixtures',
cwd: 'test/',
path: 'test/fixtures/define.styl',
@@ -99,7 +99,7 @@ describe('gulp-stylus', function() {

it ('should support defining variables in .styl files using gulp-data (data object attached to file)', function(done) {
var stream = stylus();
var fakeFile = new gutil.File({
var fakeFile = new File({
base: 'test/fixtures',
cwd: 'test/',
path: 'test/fixtures/define.styl',
@@ -127,7 +127,7 @@ describe('gulp-stylus', function() {
it('should skip css files', function(done) {
var stream = stylus();

var fakeFile = new gutil.File({
var fakeFile = new File({
base: 'test/fixtures',
cwd: 'test/',
path: 'test/fixtures/ie8.css',
@@ -151,7 +151,7 @@ describe('gulp-stylus', function() {

var file = 'test/fixtures/error.styl';

var fakeFile = new gutil.File({
var fakeFile = new File({
base: 'test/fixtures',
cwd: 'test/',
path: file,
@@ -170,7 +170,7 @@ describe('gulp-stylus', function() {

it ('should import nested and reverse recursive files', function(done) {
var stream = stylus();
var fakeFile = new gutil.File({
var fakeFile = new File({
base: 'test/fixtures',
cwd: 'test/',
path: 'test/fixtures/import.styl',
@@ -190,7 +190,7 @@ describe('gulp-stylus', function() {
it ('should generate sourcemaps', function(done) {
var stream = stylus({sourcemap: true});

var fakeFile = new gutil.File({
var fakeFile = new File({
base: 'test/fixtures',
cwd: 'test/',
path: 'test/fixtures/normal.styl',
@@ -217,7 +217,7 @@ describe('gulp-stylus', function() {
it ('should generate sourcemaps with gulp-sourcemaps', function(done) {
var stream = sourcemaps.init();

var fakeFile = new gutil.File({
var fakeFile = new File({
base: 'test/fixtures',
cwd: 'test/',
path: 'test/fixtures/normal.styl',
@@ -246,7 +246,7 @@ describe('gulp-stylus', function() {
it ('should use native stylus sourcemap options when provided', function(done) {
var stream = sourcemaps.init();

var fakeFile = new gutil.File({
var fakeFile = new File({
base: 'test',
cwd: 'test/',
path: 'test/fixtures/normal.styl',