Code Monkey home page Code Monkey logo

gulp-jade-globbing's People

Contributors

creeation avatar ivanbanov avatar jsahlen avatar scottnath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ivanbanov

gulp-jade-globbing's Issues

Crashing for when use the globbing in a file that is extended

Im trying to use the globbing to load all components from a folder

// default.jade

include ../components/**/*

doctype html
html
  head
    include ../partials/head

    body
      include ../partials/header
      include ../partials/menu
      include ../partials/main
      include ../partials/footer

In a second file Im extending this first one that use globbing

extends ../layouts/default.jade

block main

when I try to compile Im getting a error

Error in plugin 'gulp-jade'
Message:
    /Users/ivanbanov/github/natue/naturals/templates/layouts/default.jade:1
  > 1| include ../components/**/*
    2|
    3| doctype html
    4| html

ENOENT, no such file or directory '/Users/ivanbanov/github/natue/naturals/templates/components/**/*.jade'
Details:
    errno: -2
    code: ENOENT
    path: /Users/ivanbanov/github/natue/naturals/templates/layouts/default.jade
    syscall: open

Files included with include placeholder fails

When trying to retrieve a file with an include placeholder inside a file which is included himself the plugins fails to transform the string.

1| include {components}

ENOENT: no such file or directory, open '/src/templates/components/{components}.jade'

If the file is not included himself there's no issues.
{components} is mapped to /src/templates/mixins/components/*.jade

No such file or directory

gulpfile.js

'use strict';

let
  gulp = require('gulp'),
  jade = require('gulp-jade'),
  jadeGlob = require('gulp-jade-globbing');

const
  PATH = {
    APP          : '../application/',
    JADE         : {
      VIEWS      : '../source/jade/views/**/*.jade'
    }
  };

gulp.task('jade', function(){
  gulp
    .src(PATH.JADE.VIEWS)
    .pipe(jadeGlob())
    .pipe(jade())
    .pipe(gulp.dest(PATH.APP));
});

Terminal error:

Error: /Users/delch/Sites/frontskel/source/jade/templates/default.jade:1
  > 1| include ../components/**/*.jade
    2| 
    3| doctype html
    4| - var title = 'Untitled page'

ENOENT: no such file or directory, open '/Users/delch/Sites/frontskel/source/jade/components/**/*.jade'

placeholder option not work correctly in Windows

Faced with a particular problem in Windows.
In MacOS work perfectly.

gulp-jade-globbing: Warning!
  glob pattern did not match any files.
  pattern:      ..\*.jade
  placeholder:  {blocks}

gulpfile:

var blocks = 'app/blocks/**/*.jade';

gulp.task('jade', function(){
  gulp.src(['app/pages/index/index.jade'])
      .pipe(jadeGlobbing({
          placeholder: {
            'blocks': blocks
          }
        }))
    .pipe(jade())
    .pipe(gulp.dest('public/'));
});

index.jade:

include {blocks}

ls app/blocks/logo/:

logo.jade
logo.styl
Win8x64
node -v 4.2.0
gulp -v 3.9.0
gulp-jade-globbing -v 0.1.9

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.