Working on integrating js static site generator.

This commit is contained in:
mrmrs 2014-10-15 10:06:29 -07:00
parent 7fac671c86
commit 7c04e5c467
8 changed files with 59 additions and 6 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
node_modules*
.DS_STORE

24
docs/borders/index.html Normal file
View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title>
TACHYONS - Form follows function
</title>
<meta name="author" content="@mrmrs">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700" rel="stylesheet">
<link rel="stylesheet" href="/css/tachyons.min.css">
</head>
<body class="dt wi-100">
<header class="bg-blue tc h-100 pvx dtc wi-100 v-mid">
<div class="tc mbl mbn-ns">
<h1 class="aqua f5 mega-ns dib db-ns b mrs mrn-ns mbn ttu mtn">Tachyons </h1>
<h2 class="aqua f5 f4-ns dib db-ns fw1 mbm mbx-ns">Performance-first CSS</h2>
</div>
<a title="Tachyons" href="http://github.com/mrmrs/tachyons/" class="small link aqua ba b--aqua tc br2 pas pam-ns">View on Github ▸</a>
</header>
</body>
</html>

View file

@ -11,10 +11,19 @@ var gulp = require('gulp'),
size = require('gulp-size'),
rename = require('gulp-rename'),
csslint = require('gulp-csslint'),
fileinclude = require('gulp-file-include'),
browserSync = require('browser-sync'),
browserReload = browserSync.reload,
stylestats = require('gulp-stylestats');
gulp.task('fileinclude', function() {
gulp.src(['test.html'])
.pipe(fileinclude({
prefix: '@@',
basepath: '@views'
}))
.pipe(gulp.dest('./'));
});
// Use csslint without box-sizing or compatible vendor prefixes (these
// don't seem to be kept up to date on what to yell about)
@ -34,11 +43,11 @@ gulp.task('pre-process', function(){
gulp.src('./sass/tachyons.scss')
.pipe(watch(function(files) {
return files.pipe(sass())
.pipe(size({gzip: false, showFiles: true, title:'un-prefixed uncompressed css'}))
.pipe(size({gzip: true, showFiles: true, title:'un-prefixed uncompressed css'}))
.pipe(size({gzip: false, showFiles: true, title:'un-prefixed css'}))
.pipe(size({gzip: true, showFiles: true, title:'un-prefixed gzipped css'}))
.pipe(prefix())
.pipe(size({gzip: false, showFiles: true, title:'prefixed uncompressed css'}))
.pipe(size({gzip: true, showFiles: true, title:'prefixed uncompressed css'}))
.pipe(size({gzip: false, showFiles: true, title:'prefixed css'}))
.pipe(size({gzip: true, showFiles: true, title:'prefixed css'}))
.pipe(gulp.dest('css'))
.pipe(browserSync.reload({stream:true}));
}));
@ -86,7 +95,7 @@ gulp.task('bs-reload', function () {
*/
gulp.task('default', ['pre-process', 'minify-css', 'bs-reload', 'browser-sync'], function(){
gulp.start('pre-process', 'csslint');
gulp.start('pre-process', 'minify-css', 'csslint');
gulp.watch('sass/*.scss', ['pre-process', 'minify-css']);
gulp.watch('css/tachyons.css', ['bs-reload']);
gulp.watch('*.html', ['bs-reload']);

View file

@ -23,6 +23,7 @@
"gulp": "^3.8.2",
"gulp-autoprefixer": "0.0.7",
"gulp-csslint": "^0.1.4",
"gulp-file-include": "^0.5.1",
"gulp-minify-css": "^0.3.5",
"gulp-rename": "^1.2.0",
"gulp-sass": "^0.7.2",
@ -34,6 +35,7 @@
"gulp-watch": "^0.6.8"
},
"scripts": {
"start": "gulp"
"start": "gulp",
"test": "gulp fileinclude"
}
}

3
views/footer.html Normal file
View file

@ -0,0 +1,3 @@
<footer>
Footer
</footer>

3
views/head.html Normal file
View file

@ -0,0 +1,3 @@
<head>
</head>

3
views/header.html Normal file
View file

@ -0,0 +1,3 @@
<header>
Test header
</header>

8
views/index.html Normal file
View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
@@include('./head.html')
<body>
@@include('./header.html')
@@include('./footer.html')
</body>
</html>