Last active
May 9, 2016 23:35
-
-
Save morecallan/7194572636343d49271d9300eb1b2189 to your computer and use it in GitHub Desktop.
Task Runners
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Whenever creating a never (IN THE PROJECT FOLDER): | |
1. TERM: touch .gitignore | |
node_modules | |
bower_components | |
.DS_Store | |
(never check in your PM folders to github) | |
2. SUBLIME: Create boilerplate (MAKE SURE TO ADD JS FILES TO JAVASCRIPTS DIR - EXCEPT gulpfile.js | |
3. TERM: bower init (- yes to defaults) | |
4. TERM: npm init (- yes to defaults) | |
5. Then you can install things that you need | |
TERM: bower install jquery --save | |
TERM: npm install gulp jshint gulp-jshint jshint-stylish gulp-watch --save | |
6. TERM: touch gulpfile.js | |
``` | |
var gulp = require('gulp'); | |
var jshint = require('gulp-jshint'); | |
var watch = require('gulp-watch'); | |
gulp.task('default', ['lint', 'watch']); | |
gulp.task('watch', function() { | |
gulp.watch('./javascripts/**/*.js', ['lint']); | |
}); | |
gulp.task('lint', function() { | |
return gulp.src('./javascripts/**/*.js') | |
.pipe(jshint()) | |
.pipe(jshint.reporter('jshint-stylish')); | |
}); | |
``` | |
7. TERM: touch .jshintrc | |
``` | |
{ | |
"predef": [ "document", "jQuery", "$", "console" ], | |
"esversion": 6, | |
"globalstrict": true | |
} | |
``` | |
8. Create GitHub repo - copy and paste instructions | |
9. TERM: git push origin master | |
10. TERM: git checkout -b [cm-new-branch] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment