Some changes
This commit is contained in:
parent
ea63243d6a
commit
00fd6f5d52
108
gulpfile.js
108
gulpfile.js
@ -1,70 +1,86 @@
|
||||
// Require all those npm-modules
|
||||
|
||||
var gulp = require('gulp'),
|
||||
sass = require('gulp-sass'),
|
||||
autoprefixer = require('gulp-autoprefixer'),
|
||||
cssmin = require('gulp-cssmin'),
|
||||
jshint = require('gulp-jshint'),
|
||||
uglify = require('gulp-uglify'),
|
||||
imagemin = require('gulp-imagemin'),
|
||||
pngcrush = require('imagemin-pngcrush'),
|
||||
rename = require('gulp-rename'),
|
||||
clean = require('gulp-rimraf'),
|
||||
concat = require('gulp-concat'),
|
||||
notify = require('gulp-notify'),
|
||||
cache = require('gulp-cache'),
|
||||
livereload = require('gulp-livereload');
|
||||
var gulp = require('gulp'),
|
||||
sass = require('gulp-sass'),
|
||||
autoprefixer = require('gulp-autoprefixer'),
|
||||
cssmin = require('gulp-cssmin'),
|
||||
jshint = require('gulp-jshint'),
|
||||
uglify = require('gulp-uglify'),
|
||||
imagemin = require('gulp-imagemin'),
|
||||
pngcrush = require('imagemin-pngcrush'),
|
||||
rename = require('gulp-rename'),
|
||||
del = require('del'),
|
||||
concat = require('gulp-concat'),
|
||||
notify = require('gulp-notify'),
|
||||
cache = require('gulp-cache'),
|
||||
livereload = require('gulp-livereload'),
|
||||
plumber = require('gulp-plumber');
|
||||
|
||||
|
||||
// render scss
|
||||
gulp.task('styles', function() {
|
||||
gulp.src('./src/scss/main.scss')
|
||||
.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(gulp.dest('./css'))
|
||||
.pipe(rename({suffix: '.min'}))
|
||||
.pipe(cssmin())
|
||||
.pipe(gulp.dest('./css'))
|
||||
.pipe(notify({ message: 'Styles task complete' }));
|
||||
gulp.task('styles', function() {var onError = function(err) {
|
||||
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(autoprefixer('last 2 version', 'IE 9', 'safari 5', 'Firefox ESR', 'opera 12.1', 'ios 6', 'android 4', 'BlackBerry 10'))
|
||||
.pipe(gulp.dest('./css'))
|
||||
.pipe(rename({suffix: '.min'}))
|
||||
.pipe(cssmin())
|
||||
.pipe(gulp.dest('./css'))
|
||||
.pipe(notify({ message: 'Styles task complete' }));
|
||||
});
|
||||
|
||||
|
||||
// compress images
|
||||
gulp.task('images', function() {
|
||||
gulp.src('./src/img/*')
|
||||
.pipe(cache(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true })))
|
||||
.pipe(gulp.dest('./img/'))
|
||||
.pipe(notify({ message: 'Images task complete' }));
|
||||
gulp.src('./src/img/*')
|
||||
.pipe(cache(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true })))
|
||||
.pipe(gulp.dest('./img/'))
|
||||
.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
|
||||
gulp.task('scripts', function() {
|
||||
gulp.src('./src/js/**/*.js')
|
||||
.pipe(concat('main.js'))
|
||||
.pipe(gulp.dest('./js'))
|
||||
.pipe(rename({suffix: '.min'}))
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest('./js'))
|
||||
.pipe(notify({ message: 'Scripts task complete' }));
|
||||
gulp.src('./src/js/**/*.js')
|
||||
.pipe(concat('main.js'))
|
||||
.pipe(gulp.dest('./js'))
|
||||
.pipe(rename({suffix: '.min'}))
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest('./js'))
|
||||
.pipe(notify({ message: 'Scripts task complete' }));
|
||||
});
|
||||
|
||||
|
||||
// watch it while working
|
||||
gulp.task('watch', function() {
|
||||
// Watch .scss files
|
||||
gulp.watch('src/scss/**/*.scss', ['styles']);
|
||||
// Watch .scss files
|
||||
gulp.watch('src/scss/**/*.scss', ['styles']);
|
||||
|
||||
// Watch .js files
|
||||
gulp.watch('src/js/**/*.js', ['scripts']);
|
||||
// Watch .js files
|
||||
gulp.watch('src/js/**/*.js', ['scripts']);
|
||||
|
||||
// Watch image files
|
||||
gulp.watch('src/img/**/*', ['images']);
|
||||
// Watch image files
|
||||
gulp.watch('src/img/**/*', ['images']);
|
||||
});
|
||||
|
||||
|
||||
// clean the folders
|
||||
gulp.task('clean', function(cb) {
|
||||
del(['./css/*', './js/*', './img/*'], cb)
|
||||
});
|
||||
|
||||
|
||||
// default: all of them! \o/
|
||||
gulp.task('default', ['clean'], function() {
|
||||
gulp.start('styles', 'scripts', 'images');
|
||||
gulp.start('styles', 'scripts', 'images');
|
||||
});
|
||||
|
43
index.html
43
index.html
@ -1,24 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Title goes here</title>
|
||||
|
||||
<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="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta charset="utf-8">
|
||||
<title>Title goes here</title>
|
||||
<meta name="description" content="description goes here " />
|
||||
<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" />
|
||||
<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>
|
||||
<body>
|
||||
|
||||
|
||||
<script src="instantclick.min.js" data-no-instant></script>
|
||||
<script data-no-instant>InstantClick.init();</script>
|
||||
<div id="wrap">
|
||||
<header>
|
||||
<h1>Headline</h1>
|
||||
</header>
|
||||
<main>
|
||||
<article class="">
|
||||
Welcome!
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
48
package.json
48
package.json
@ -2,23 +2,37 @@
|
||||
"name": "ProjectName",
|
||||
"description": "Project description",
|
||||
"version": "1.0.0",
|
||||
"author": "Jan Jastrow",
|
||||
"license": "MIT",
|
||||
"homepage": "projecturl",
|
||||
"url" : "http://github.com/Gehirnfussel/project/issues",
|
||||
"url" : "http://github.com/Gehirnfussel/project/",
|
||||
"email" : "jan@schwerkraftlabor.de",
|
||||
"devDependencies": {
|
||||
"gulp": "~3.8.6",
|
||||
"gulp-sass": "~0.7.2",
|
||||
"gulp-autoprefixer": "~0.0.8",
|
||||
"gulp-cssmin": "~0.1.6",
|
||||
"gulp-jshint": "~1.8.0",
|
||||
"gulp-uglify": "~0.3.1",
|
||||
"gulp-imagemin": "0.6.2",
|
||||
"gulp-concat": "~2.3.4",
|
||||
"gulp-rename": "~1.2.0",
|
||||
"gulp-rimraf": "~0.1.0",
|
||||
"gulp-watch": "~0.6.9",
|
||||
"gulp-cache": "~0.2.0",
|
||||
"gulp-notify": "~1.4.0",
|
||||
"gulp-livereload": "~2.1.0",
|
||||
}
|
||||
"scripts": {},
|
||||
"main": "gulpfile.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://bitbucket.org/Gehirnfussel/project"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"del": "^0.1.3",
|
||||
"gulp": "^3.8.10",
|
||||
"gulp-autoprefixer": "^2.0.0",
|
||||
"gulp-cache": "^0.2.4",
|
||||
"gulp-concat": "^2.4.2",
|
||||
"gulp-cssmin": "^0.1.6",
|
||||
"gulp-imagemin": "^2.0.0",
|
||||
"gulp-jshint": "^1.9.0",
|
||||
"gulp-livereload": "^3.0.2",
|
||||
"gulp-minify-css": "^0.3.11",
|
||||
"gulp-notify": "^2.1.0",
|
||||
"gulp-plumber": "^0.6.6",
|
||||
"gulp-rename": "^1.2.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"
|
||||
},
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
# www.robotstxt.org/
|
||||
# www.robotstxt.org/
|
||||
# http://code.google.com/web/controlcrawlindex/
|
||||
|
||||
User-agent: *
|
||||
User-agent: *
|
||||
|
Loading…
Reference in New Issue
Block a user