Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
gulp-autoload-tasks
Advanced tools
Auto loads tasks for large modular projects, including configuration object and reducing code (imports) duplication
Loading code inspired by generator-gulp-angular 's gulpefile.js
$ npm install --save-dev gulp-autoload-tasks
gulpfile.js
:
var gulp = require('gulp');
var plugins = require('gulp-load-plugins')(gulp);
var config = {
src: 'src',
tmp: '.tmp',
dist: 'dist'
}
require('gulp-autoload-tasks')(gulp, plugins, config);
gulp.task('default', ['copy']);
gulp_tasks/copy.js
:
module.exports = function (gulp, plugins, config) {
gulp.task('copy', function () {
return gulp
.src( config.src + 'index.html' )
.pipe( gulp.dest( config.dist ) );
})
gulpfile.js
:
var differentDir = 'gulp_awesome_tasks'; // Default: 'gulp_tasks'
require('gulp-autoload-tasks')(gulp, plugins, config, differentDir);
var autoLoadTasks = require('gulp-autoload-tasks');
Loads every file in the gulpTasksDir (gulp_tasks
by default) with the following params - gulp
, plugins
, config
. So that your module declaration looks like
gulpfile.js
:
var autoLoadTasks = require('gulp-autoload-tasks');
autoLoadTasks(gulp, plugins, config, gulpTaskDir);
some_gulp_task.js
:
module.exports = function (gulp, plugins, config) {
/* code goes here */
}
Type: Object
The imported gulp module
Type: Object
Usually created by gulp-load-plugins
Type: Object
Configuration object. Can contain folder names and paths, generic error handler and all of the repeating variables you might have in your gulp workflow.
Type: String
Default: gulp_tasks
The directory containing the gulp task files. Each file has the name of the task it holds - clean.js
, build.js
, etc...
Copyright (c) 2015 Shai Reznik
Licensed under the MIT License.
FAQs
Auto loads gulp tasks for large modular projects
The npm package gulp-autoload-tasks receives a total of 17 weekly downloads. As such, gulp-autoload-tasks popularity was classified as not popular.
We found that gulp-autoload-tasks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.