diff --git a/generators/boilerplate/index.js b/generators/boilerplate/index.js new file mode 100644 index 0000000..fd475ca --- /dev/null +++ b/generators/boilerplate/index.js @@ -0,0 +1,32 @@ +'use strict'; + +var generators = require('yeoman-generator'); + +module.exports = generators.Base.extend({ + configuring: function() { + this.fs.copy( + this.templatePath('editorconfig'), + this.destinationPath('.editorconfig') + ); + + this.fs.copy( + this.templatePath('gitattributes'), + this.destinationPath('.gitattributes') + ); + + this.fs.copy( + this.templatePath('gitignore'), + this.destinationPath('.gitignore') + ); + + this.fs.copy( + this.templatePath('jscsrc'), + this.destinationPath('.jscsrc') + ); + + this.fs.copy( + this.templatePath('jshintrc'), + this.destinationPath('.jshintrc') + ); + } +}); diff --git a/generators/boilerplate/templates/editorconfig b/generators/boilerplate/templates/editorconfig new file mode 100644 index 0000000..4a7ea30 --- /dev/null +++ b/generators/boilerplate/templates/editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/generators/boilerplate/templates/gitattributes b/generators/boilerplate/templates/gitattributes new file mode 100644 index 0000000..2125666 --- /dev/null +++ b/generators/boilerplate/templates/gitattributes @@ -0,0 +1 @@ +* text=auto \ No newline at end of file diff --git a/generators/boilerplate/templates/gitignore b/generators/boilerplate/templates/gitignore new file mode 100644 index 0000000..1ac3139 --- /dev/null +++ b/generators/boilerplate/templates/gitignore @@ -0,0 +1,70 @@ +# .gitignore for jekyllized projects + +# Ignore hidden folders +# This takes care of .tmp, .sass-cache, and many others +.*/ + +# OSX +._* +.AppleDouble +.DS_Store +.localized +.LSOverride +.Spotlight-V100 +.Trashes +Icon + +# Windows +Desktop.ini +ehthumbs.db +Thumbs.db + +# Linux +*~ + +# Tags +# Ignore tags created by etags and ctags +TAGS +tags + +# Always-ignore files and folders # +*.diff +*.err +*.log +*.orig +*.rej +*.swn +*.swo +*.swp +._* +*~ + +# Ignore packages # +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Packages +node_modules/* +.tmp +test/ + +# Sublime +*.sublime-project +*.sublime-workspace +*.sublime-projectcompletions + +app/_bower_components + +# Output folders +serve +site + +# hide the AWS and Rsync credentials file +aws-credentials.json +rsync-credentials.json diff --git a/generators/boilerplate/templates/jscsrc b/generators/boilerplate/templates/jscsrc new file mode 100644 index 0000000..4b5fa83 --- /dev/null +++ b/generators/boilerplate/templates/jscsrc @@ -0,0 +1,3 @@ +{ + "preset": "google" +} diff --git a/generators/boilerplate/templates/jshintrc b/generators/boilerplate/templates/jshintrc new file mode 100644 index 0000000..a89f882 --- /dev/null +++ b/generators/boilerplate/templates/jshintrc @@ -0,0 +1,18 @@ +{ + "node": true, + "browser": true, + "esnext": true, + "bitwise": false, + "curly": false, + "eqeqeq": true, + "eqnull": true, + "immed": true, + "latedef": true, + "newcap": true, + "noarg": true, + "quotmark": "double", + "undef": true, + "strict": false, + "trailing": true, + "smarttabs": true +}