Skip to content

Commit

Permalink
Initial commit for jekyllized:gulp
Browse files Browse the repository at this point in the history
Not complete at all but it's a first step at least.
  • Loading branch information
sondr3 committed May 2, 2015
1 parent 336e269 commit 0667750
Show file tree
Hide file tree
Showing 6 changed files with 434 additions and 0 deletions.
86 changes: 86 additions & 0 deletions generators/gulp/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
'use strict';

var _ = require('lodash');
var chalk = require('chalk');
var generators = require('yeoman-generator');

module.exports = generators.Base.extend({
prompting: function() {
var done = this.async();

var prompts = [{
type: 'list',
name: 'uploading',
message: 'How would you like to host/upload your site?',
choices: [{
name: 'Amazon S3',
value: 'amazonS3'
}, {
name: 'Rsync',
value: 'rsync'
}, {
name: 'GitHub Pages',
value: 'ghpages'
}, {
name: 'None',
value: 'noUpload'
}]
}];

this.prompt(prompts, function(props) {
this.props = _.extend(this.props, props);
this.config.set(this.props);

done();
}.bind(this));
},

writing: {
package: function() {
var pkg = this.fs.readJSON(this.destinationPath('package.json'), {});

pkg.devDependencies = pkg.devDependencies || {};
_.extend(pkg.devDependencies, {
'browser-sync': '^1.5.7',
'del': '^1.1.1',
'gulp': 'git://github.com/gulpjs/gulp#4.0',
'gulp-autoprefixer': '^2.0.0',
'gulp-cache': '~0.2.4',
'gulp-cached': '^1.0.1',
'gulp-changed': '^1.0.0',
'gulp-filter': '^2.0.0',
'gulp-group-concat': '^1.1.4',
'gulp-gzip': '0.0.8',
'gulp-htmlmin': '^1.0.0',
'gulp-if': '^1.2.4',
'gulp-imagemin': '^2.1.0',
'gulp-jshint': '^1.8.5',
'gulp-load-plugins': '^0.8.0',
'gulp-minify-css': '^0.4.4',
'gulp-rev-all': '^0.7.5',
'gulp-rev-replace': '^0.3.1',
'gulp-sass': '^1.0.0',
'gulp-shell': '^0.2.9',
'gulp-size': '^1.1.0',
'gulp-sourcemaps': '^1.3.0',
'gulp-uglify': '^1.1.0',
'gulp-uncss': '^1.0.0',
'gulp-useref': '^1.0.2',
'jshint-stylish': '^1.0.0',
'merge-stream': '^0.1.6',
'shelljs': '^0.3.0',
'trash': '^1.4.0'
});

this.fs.writeJSON(this.destinationPath('package.json'), pkg);
},

gulpfile: function() {

this.fs.copyTpl(
this.templatePath('gulpfile.js'),
this.destinationPath('gulpfile.js')
);
}
}
});
7 changes: 7 additions & 0 deletions generators/gulp/templates/aws-credentials.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"key": "<%= amazonKey %>",
"secret": "<%= amazonSecret %>",
"bucket": "<%= amazonBucket %>",
"region": "us-west-1",
"distributionId": "<%= amazonDistID %>"
}
11 changes: 11 additions & 0 deletions generators/gulp/templates/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';

// THIS IS A TEMPORARY FILE
// BECAUSE THERE IS JUST SO MANY
// WRONG VARIABLES IN THE OTHER ONE
//
// MAKES TESTING A GODDAMN NIGHTMARE

function hello() {
console.log('Yay');
}
Loading

0 comments on commit 0667750

Please sign in to comment.