Git Product home page Git Product logo

gulp-task-loader's People

Contributors

alexbeauchemin avatar archr avatar blvz avatar evanshortiss avatar hontas avatar mamboer avatar salimkayabasi avatar tjsail33 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

Watchers

 avatar  avatar  avatar

gulp-task-loader's Issues

add file filter

I'm working on something over vpn/samba, and my mac is creating these http://apple.stackexchange.com/a/14981/87168 which then gulp-task-loader is trying to load and obviously fails with SyntaxError: Unexpected token ILLEGAL DIt would be nice if you could define some sort of filter in options.

Cannot properly load tasks when serving from nested directory

Hi!
I have a problem with serving the tasks from directory that is not placed in the root of application(i.e. gulp/tasks). Basically the problem is that the tasks are not loading properly because the path to the module is not being created correctly. For example with above dir I get Cannot resolve module ... \gulp\tasks\tasks\build\hello.js. I created a fix for this altrough maybe it is not neccesary and it is just a problem for me. But you can take a look at it and eventually merge it if you'd like. I wrote the tests too, everything's passing.

Path gets doubled when loading tasks from a sub-folder

I'm trying to point my task loader to a specific folder ./tasks/dev

gulp.task("default", function(){ require('gulp-task-loader')( { dir: './tasks/dev/', settings: settings, handleErrors: handleErrors }); });

But when I run the task it actually doubles the 'dev' part of the folder path.

[10:14:37] Error: Cannot find module 'C:\Git\my-project\tasks**\dev\dev**browser-sync.js'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at loadTask (C:\Git\my-project\node_modules\gulp-task-loader\index.js:50:14)
at loadTasks (C:\Git\my-project\node_modules\gulp-task-loader\index.js:71:4)
at C:\Git\my-project\node_modules\gulp-task-loader\index.js:76:6
at Array.forEach (native)
at loadTasks (C:\Git\my-project\node_modules\gulp-task-loader\index.js:75:6)
at module.exports (C:\Git\my-project\node_modules\gulp-task-loader\index.js:81:2)

This actually look very similar to #12 and devbridge/Front-End-Toolkit#56

I'm running version 1.4.2

Glob support

Can we have glob support to make filtering better? Filtering by extension won't work for me as i have some .spec.js files. would like to be able to:

require('gulp-task-loader')('tasks/gulp/!(*.spec).js');

1.4.0 breaks sub task functionality.

We've been using gulp-task-loader for our project since 1.3.1 and we have the following folder setup.

src/
    gulp/
        tasks/
            build/
                fonts.js
                images.js
                sass.js
                templates.js
            test/
                e2e.js
                lint.js
                unit.js

We have gulp-task-loader configured to look for tasks in src/gulp/tasks/

require ('gulp-task-loader')({dir: './src/gulp/tasks');

After updating to 1.4.0, we started receiving the following error:

Error: Cannot find module '/home/portiz/repos/project/src/gulp/tasks/fonts.js'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at loadTask (/home/portiz/repos/project/node_modules/gulp-task-loader/index.js:41:14)
    at loadTasks (/home/portiz/repos/project/node_modules/gulp-task-loader/index.js:66:4)
    at /home/portiz/repos/project/node_modules/gulp-task-loader/index.js:71:6
    at Array.forEach (native)
    at loadTasks (/home/portiz/repos/project/node_modules/gulp-task-loader/index.js:70:6)
    at /home/portiz/repos/project/node_modules/gulp-task-loader/index.js:71:6

Stepping through and debugging our gulp tasks, we found that the gulp-task-loader was truncating the "build" path node from the task location. It occurs somewhere on line 66:

loadTask(currentPath.split('/').slice(opts.dir.split('/').length, -1), file);

Is there something wrong with gulp-task-loader, or are we doing something wrong with the new version on our end?

v1.2.0 is broken.

After updating from 1.0.8, the module is looking for the tasks relatively to its installation folder.

This doesn't work:
taskLoader(path.join(__dirname, 'tasks'));

Stack trace:

Error: Cannot find module '/home/myuser/myfolder/myapp/node_modules/gulp-task-loader/home/myuser/myfolder/myapp/tasks/angularTemplates.js
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at loadTask (/home/myuser/myfolder/myapp/node_modules/gulp-task-loader/index.js:44:14)
    at loadTasks (/home/myuser/myfolder/myapp/node_modules/gulp-task-loader/index.js:65:4)
    at Array.forEach (native)
    at module.exports (/home/myuser/myfolder/myapp/node_modules/gulp-task-loader/index.js:77:4)
    at Object.<anonymous> (/home/myuser/myfolder/myapp/gulpfile.js:20:1)

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.