Some changes

This commit is contained in:
unknown 2015-07-27 09:49:42 +02:00
parent ea63243d6a
commit 00fd6f5d52
4 changed files with 119 additions and 85 deletions

View File

@ -9,15 +9,27 @@ var gulp = require('gulp'),
imagemin = require('gulp-imagemin'), imagemin = require('gulp-imagemin'),
pngcrush = require('imagemin-pngcrush'), pngcrush = require('imagemin-pngcrush'),
rename = require('gulp-rename'), rename = require('gulp-rename'),
clean = require('gulp-rimraf'), del = require('del'),
concat = require('gulp-concat'), concat = require('gulp-concat'),
notify = require('gulp-notify'), notify = require('gulp-notify'),
cache = require('gulp-cache'), cache = require('gulp-cache'),
livereload = require('gulp-livereload'); livereload = require('gulp-livereload'),
plumber = require('gulp-plumber');
// render scss // render scss
gulp.task('styles', function() { gulp.task('styles', function() {var onError = function(err) {
gulp.src('./src/scss/main.scss') notify.onError({
title: "Gulp",
subtitle: "Failure!",
message: "Error: <%= error.message %>",
sound: "Submarine"
})(err);
this.emit('end');
};
gulp.src('./src/scss/blacktie.scss')
.pipe(plumber({errorHandler: onError}))
.pipe(sass({ style: 'expanded' })) .pipe(sass({ style: 'expanded' }))
.pipe(autoprefixer('last 2 version', 'IE 9', 'safari 5', 'Firefox ESR', 'opera 12.1', 'ios 6', 'android 4', 'BlackBerry 10')) .pipe(autoprefixer('last 2 version', 'IE 9', 'safari 5', 'Firefox ESR', 'opera 12.1', 'ios 6', 'android 4', 'BlackBerry 10'))
.pipe(gulp.dest('./css')) .pipe(gulp.dest('./css'))
@ -27,6 +39,7 @@ gulp.task('styles', function() {
.pipe(notify({ message: 'Styles task complete' })); .pipe(notify({ message: 'Styles task complete' }));
}); });
// compress images // compress images
gulp.task('images', function() { gulp.task('images', function() {
gulp.src('./src/img/*') gulp.src('./src/img/*')
@ -35,11 +48,6 @@ gulp.task('images', function() {
.pipe(notify({ message: 'Images task complete' })); .pipe(notify({ message: 'Images task complete' }));
}); });
// clean the folders
gulp.task('clean', function() {
gulp.src(['./css/*', './js/*', './img/*'], {read: false})
.pipe(clean());
});
// do the javascript-dance // do the javascript-dance
gulp.task('scripts', function() { gulp.task('scripts', function() {
@ -52,6 +60,7 @@ gulp.task('scripts', function() {
.pipe(notify({ message: 'Scripts task complete' })); .pipe(notify({ message: 'Scripts task complete' }));
}); });
// watch it while working // watch it while working
gulp.task('watch', function() { gulp.task('watch', function() {
// Watch .scss files // Watch .scss files
@ -64,6 +73,13 @@ gulp.task('watch', function() {
gulp.watch('src/img/**/*', ['images']); gulp.watch('src/img/**/*', ['images']);
}); });
// clean the folders
gulp.task('clean', function(cb) {
del(['./css/*', './js/*', './img/*'], cb)
});
// default: all of them! \o/ // default: all of them! \o/
gulp.task('default', ['clean'], function() { gulp.task('default', ['clean'], function() {
gulp.start('styles', 'scripts', 'images'); gulp.start('styles', 'scripts', 'images');

View File

@ -1,24 +1,29 @@
<!DOCTYPE html> <!doctype html>
<html lang="de"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8">
<title>Title goes here</title> <title>Title goes here</title>
<meta name="description" content="description goes here " />
<link rel="dns-prefetch" href="//fonts.googleapis.com">
<link rel="dns-prefetch" href="//schwerkraftlabor.de">
<link rel="shortcut icon" href="favicon.ico" />
<link href="css/main.css" rel="stylesheet" />
<link type="text/plain" rel="author" href="humans.txt" />
<meta name="description" content="Description goes here." />
<meta name="author" content="Jan Jastrow" /> <meta name="author" content="Jan Jastrow" />
<link rel="dns-prefetch" href="//fonts.googleapis.com">
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <link rel="shortcut icon" href="favicon.ico" />
<link type="text/css" rel="stylesheet" href="css/blacktie.css" />
<link type="text/plain" rel="author" href="humans.txt" />
<link href='http://fonts.googleapis.com/css?family=Exo+2:700|Titillium+Web:400,700' rel='stylesheet' type='text/css'>
</head> </head>
<body> <body>
<div id="wrap">
<header>
<script src="instantclick.min.js" data-no-instant></script> <h1>Headline</h1>
<script data-no-instant>InstantClick.init();</script> </header>
<main>
<article class="">
Welcome!
</article>
</main>
</div>
</body> </body>
</html> </html>

View File

@ -2,23 +2,37 @@
"name": "ProjectName", "name": "ProjectName",
"description": "Project description", "description": "Project description",
"version": "1.0.0", "version": "1.0.0",
"author": "Jan Jastrow",
"license": "MIT",
"homepage": "projecturl", "homepage": "projecturl",
"url" : "http://github.com/Gehirnfussel/project/issues", "url" : "http://github.com/Gehirnfussel/project/",
"email" : "jan@schwerkraftlabor.de", "email" : "jan@schwerkraftlabor.de",
"scripts": {},
"main": "gulpfile.js",
"repository": {
"type": "git",
"url": "https://bitbucket.org/Gehirnfussel/project"
},
"dependencies": {},
"devDependencies": { "devDependencies": {
"gulp": "~3.8.6", "del": "^0.1.3",
"gulp-sass": "~0.7.2", "gulp": "^3.8.10",
"gulp-autoprefixer": "~0.0.8", "gulp-autoprefixer": "^2.0.0",
"gulp-cssmin": "~0.1.6", "gulp-cache": "^0.2.4",
"gulp-jshint": "~1.8.0", "gulp-concat": "^2.4.2",
"gulp-uglify": "~0.3.1", "gulp-cssmin": "^0.1.6",
"gulp-imagemin": "0.6.2", "gulp-imagemin": "^2.0.0",
"gulp-concat": "~2.3.4", "gulp-jshint": "^1.9.0",
"gulp-rename": "~1.2.0", "gulp-livereload": "^3.0.2",
"gulp-rimraf": "~0.1.0", "gulp-minify-css": "^0.3.11",
"gulp-watch": "~0.6.9", "gulp-notify": "^2.1.0",
"gulp-cache": "~0.2.0", "gulp-plumber": "^0.6.6",
"gulp-notify": "~1.4.0", "gulp-rename": "^1.2.0",
"gulp-livereload": "~2.1.0", "gulp-ruby-sass": "^0.7.1",
} "gulp-sass": "^1.2.4",
"gulp-uglify": "^1.0.2",
"gulp-watch": "^3.0.0",
"imagemin-jpegtran": "^4.0.0",
"imagemin-pngcrush": "^4.0.0"
},
} }

View File

@ -1,4 +1,3 @@
# www.robotstxt.org/ # www.robotstxt.org/
# http://code.google.com/web/controlcrawlindex/ # http://code.google.com/web/controlcrawlindex/
User-agent: * User-agent: *