{"id":19852447,"url":"https://github.com/dperrymorrow/gulp-task-generator","last_synced_at":"2025-06-22T05:37:46.275Z","repository":{"id":57259169,"uuid":"51475978","full_name":"dperrymorrow/gulp-task-generator","owner":"dperrymorrow","description":"CLI tool for setting up your Gulp tasks","archived":false,"fork":false,"pushed_at":"2016-08-27T04:53:07.000Z","size":175,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T05:27:12.142Z","etag":null,"topics":["cli","gulp-tasks","series"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dperrymorrow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-10T22:06:17.000Z","updated_at":"2018-08-21T18:18:44.000Z","dependencies_parsed_at":"2022-08-25T02:00:12.429Z","dependency_job_id":null,"html_url":"https://github.com/dperrymorrow/gulp-task-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dperrymorrow%2Fgulp-task-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dperrymorrow%2Fgulp-task-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dperrymorrow%2Fgulp-task-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dperrymorrow%2Fgulp-task-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dperrymorrow","download_url":"https://codeload.github.com/dperrymorrow/gulp-task-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241241325,"owners_count":19932726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","gulp-tasks","series"],"created_at":"2024-11-12T14:02:02.407Z","updated_at":"2025-02-28T21:17:32.755Z","avatar_url":"https://github.com/dperrymorrow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Gulp Task Generator\n\n![gulp-task-generator](https://raw.githubusercontent.com/dperrymorrow/gulp-task-generator/master/gulp_generator_logo.png)\n\nA command line tool that builds your gulpfile to your exact needs by asking you a series of questions.\n\n## Supported Tasks\n\n- Jade\n- EJS\n- Less\n- Sass\n- Stylus\n- Autoprefix\n- Coffescript\n- Babel\n- Concatenation\n- Uglify\n- Sourcemaps\n\n## Installing:\n\n ```\n $ npm install gulp-task-generator -g\n ```\n\nnow change directories to your project and run the setup\n\n```\n $ gulp-task-generator\n```\n\nGulp-Task-Generator will now ask you a series of questions about your project and build your gulpfile.js accordingly.\n\n```\n$ gulp-task-generator\n------------------------------- QUESTIONS -------------------------------\n? You already have a Gulpfile.js. Overwrite? Yes\n? Would you like to run CSS tasks? Yes\n? Which CSS pre-processor would you like to use? less\n? Would you like to autoprefix your CSS? Yes\n? Would you like your CSS minified? Yes\n? Would you like your CSS files concatenated? Yes\n? Name of your concatenated CSS file? main.css\n? Where are your CSS source files? source/less\n? Where do you want your compiled CSS (generated) files? build/css\n? Would you like to run Javascript tasks? Yes\n? Will you be using Coffeescript? Yes\n? Convert ES6 to ES5? Yes\n? Would you like to run JsHint on your Javascript? Yes\n? Would you like to concatenate and minify your Javascript? Yes\n? Name of your concatenated js file? main.js\n? Where are your .coffee source files? source/coffee\n? Where do you want your compiled Javascript (generated) files? build/js\n? Would you like to use a template engine for HTML? Yes\n? Which HTML template engine would you like to use? jade\n? Where are your .jade source files? source/jade\n? Where do you want your compiled HTML (generated) files? build/\n------------------------- CREATING DIRS \u0026 FILES -------------------------\n/source/coffee =\u003e created\n/build/js =\u003e created\n/source/less =\u003e created\n/build/css =\u003e created\n/source/jade =\u003e created\n/build/ =\u003e created\ngulpfile.js =\u003e created\n------------------------ INSTALLING DEPENDENCIES ------------------------\n\u003e Installing the NPM packages based on your choices.\n\n\\generator-test@1.0.0 /Users/dperrymorrow/builds/generator-test\n├── gulp@3.9.1\n├── gulp-autoprefixer@3.1.0\n├── gulp-babel@6.1.2\n├── gulp-clean-css@2.0.12\n├── gulp-coffee@2.3.2\n├── gulp-concat@2.6.0\n├── gulp-jade@1.1.0\n├── gulp-jshint@2.0.1\n├── gulp-less@3.1.0\n├── gulp-notify@2.2.0\n├── gulp-plumber@1.1.0\n├── gulp-rename@1.2.2\n├── gulp-sourcemaps@1.6.0\n├── gulp-uglify@1.5.4\n└── jshint@2.9.2\n\n\u003e All NPM packages have been installed.\nTo use your new Gulp tasks:\n$ npm install -g gulp\n$ gulp\n```\n\nThe packages needed to run your gulpfile have been added to your npm package.json file as dependencies, and have been installed via ``npm install``\n\n## Usage\n\n```bash\n$ npm install -g gulp\n$ gulp\n```\n\n## gulpfile.js\n\nThe above choices would have resulted in the following ``gulpfile.js``\n\n```javascript\n/*\n=================================================\ngulpfile.js created with Gulp-Task-Generator\nhttps://www.npmjs.com/package/gulp-task-generator\n\nTo regenerate this file:\n$ cd {this dir}\n$ npm install -g gulp-task-generator\n$ gulp-task-generator\n=================================================\n*/\n\n\"use strict\";\n\nconst gulp = require('gulp');\nconst plumber = require('gulp-plumber');\nconst rename = require('gulp-rename');\nconst notify = require('gulp-notify');\nconst sourcemaps = require('gulp-sourcemaps');\nconst concat = require('gulp-concat');\nconst autoPrefixer = require('gulp-autoprefixer');\nconst cleanCss = require('gulp-clean-css');\nconst less = require('gulp-less');\n\nconst jshint = require('gulp-jshint');\nconst uglify = require('gulp-uglify');\nconst coffee = require('gulp-coffee');\nconst babel = require('gulp-babel');\n\nconst jade = require('gulp-jade');\n\ngulp.task('css', () =\u003e {\n  gulp.src(['source/less/**/*.less'])\n    .pipe(plumber({\n      handleError: err =\u003e {\n        console.log(err);\n        this.emit('end');\n      }\n    }))\n    .pipe(sourcemaps.init())\n    .pipe(less())\n    .pipe(autoPrefixer())\n    .pipe(concat('main.css'))\n    .pipe(gulp.dest('build/css'))\n    .pipe(rename({suffix: '.min'}))\n    .pipe(cleanCss())\n    .pipe(sourcemaps.write())\n    .pipe(gulp.dest('build/css'))\n    .pipe(notify('css task finished'))\n});\n\n\ngulp.task('js', () =\u003e {\n  gulp.src(['source/coffee/**/*.coffee'])\n    .pipe(plumber({\n      handleError: (err) =\u003e {\n        console.log(err);\n        this.emit('end');\n      }\n    }))\n    .pipe(coffee({bare: true}))\n    .pipe(jshint())\n    .pipe(jshint.reporter('default'))\n    .pipe(gulp.dest('build/js'))\n    .pipe(concat('main.js'))\n    .pipe(rename({suffix: '.min'}))\n    .pipe(uglify())\n    .pipe(babel())\n    .pipe(gulp.dest('build/js'))\n    .pipe(notify('js task finished'))\n});\n\ngulp.task('html', () =\u003e {\n  gulp.src(['source/jade/**/*.jade'])\n    .pipe(plumber({\n      handleError: err =\u003e {\n        console.log(err);\n        this.emit('end');\n      }\n    }))\n    .pipe(jade())\n    .pipe(gulp.dest('build/'))\n});\n\ngulp.task('default', [\"js\",\"css\",\"html\"], () =\u003e {\n  gulp.watch('source/coffee/**/*.coffee', ['js']);\n  gulp.watch('source/less/**/*.less', ['css']);\n  gulp.watch('source/jade/**/*.jade', ['html']);\n});\n```\n\nYou can then invoke the tasks with ``$ gulp`` or run individual gulp tasks.\n\nAnd, of course you can edit your gulpfile.js further for more customization, it is your gulpfile after all, Gulp-Generator just helps you build it.\n\n## Contributing\n\n- fork the repo\n- npm install\n\nTo test, from a test directory,\n\n```bash\nnode ../gulp-task-generator/bin/cli.js\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdperrymorrow%2Fgulp-task-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdperrymorrow%2Fgulp-task-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdperrymorrow%2Fgulp-task-generator/lists"}