Skip to content

Commit

Permalink
Initial commit. Hello, foo
Browse files Browse the repository at this point in the history
  • Loading branch information
rbndelrio committed Mar 7, 2015
0 parents commit 7d248d0
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 0 deletions.
80 changes: 80 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Modules
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
sass = require('gulp-ruby-sass'),
livereload = require('gulp-livereload'),
imgopt = require('gulp-imagemin'),
prefix = require('gulp-autoprefixer'),
plumber = require('gulp-plumber');


// Paths
var imgDir = 'img/',
jsDir = 'js/',
jminDir = 'min/',
sassDir = 'sass/',
cssDir = 'css/';


//Uglify
gulp.task('scripts',function(){
gulp.src(jsDir + '*.js')
.pipe(plumber())
.pipe(uglify())
.on('error', function (err){
console.error('!!!JS!!!', err.message);})
.pipe(gulp.dest(jminDir))
.pipe(livereload());
});


//SASS
gulp.task('styles',function(){
return sass(sassDir)
.pipe(plumber())
.on('error', function (err) {
console.error('!!!CSS!!!', err.message);})
.pipe(prefix('last 2 versions'))
.pipe(gulp.dest(cssDir))
.pipe(livereload());
});


//Image Optimization
gulp.task('image',function () {
gulp.src([imgDir + '*', '!**/*.db'])
.pipe(plumber())
.pipe(imgopt())
.pipe(gulp.dest(imgDir))
});


//Markup Stuff
gulp.task('markup',function(){
gulp.src(['*.html','*.htm'])
.pipe(livereload());
});


//File Watcher
gulp.task('watch',function(){
var server = livereload();
livereload.listen();
gulp.watch(jsDir + '*.js',['scripts']);
gulp.watch(sassDir + '*.sass',['styles']);
gulp.watch(['*.html','*.htm'],['markup']);
// gulp.watch(imgDir + '*.*',['image']);
});


//DEFAULT
gulp.task('default',[
'scripts',
'styles',
'watch']);

gulp.task('build',[
'scripts',
'styles',
'markup',
'image']);
20 changes: 20 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Things</title>
<link rel="apple-touch-icon" href="img/touch-icon.png">
<link rel="icon" sizes="192x192" href="img/touch-icon.png">
<link rel="shortcut icon" href="img/fav.ico">
<link rel="stylesheet" href="css/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="min/modernizr.js" type="text/javascript"></script>
<script src="min/js.js"></script>
</head>
<body>
</body>
</html>
3 changes: 3 additions & 0 deletions js/js.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$(document).ready(function () {
console.log('Hello, World!');
});
4 changes: 4 additions & 0 deletions sass/style.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
html,body
margin: 0
padding: 0
width: 100%

0 comments on commit 7d248d0

Please sign in to comment.