-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a48c9be
commit ebf7986
Showing
7 changed files
with
131 additions
and
61 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
var toga = require('toga'), | ||
css = require('toga-css'), | ||
md = require('toga-markdown'), | ||
sample = require('toga-sample'), | ||
pura = require('toga-pura'), | ||
|
||
config = { | ||
src: './src/assets/**/*.css', | ||
dest: './dist/docs' | ||
}; | ||
|
||
toga | ||
.src(config.src) | ||
.pipe(css.parser()) | ||
.pipe(md.formatter()) | ||
.pipe(sample.formatter()) | ||
.pipe(pura.compiler()) | ||
.pipe(toga.dest(config.dest)); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,7 @@ indent_style = space | |
|
||
[*.md] | ||
indent_style = space | ||
|
||
[.*rc] | ||
indent_size = 2 | ||
indent_style = space |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
|
||
coverage/ | ||
docs/ | ||
dist/ | ||
node_modules/ | ||
test/actual/ | ||
web/ | ||
|
||
*.log | ||
.*.swp | ||
.DS_Store | ||
.publish | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,54 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'), | ||
base = { base: './src/' }, | ||
config = { isWatching: false }; | ||
config = { | ||
src: './src', | ||
dest: './dist', | ||
isWatching: false | ||
}, | ||
base = { | ||
base: config.src | ||
}; | ||
|
||
gulp.task('default', ['html', 'css', 'copy']); | ||
|
||
gulp.task('deploy', ['default'], function () { | ||
var deploy = require('gulp-gh-pages'); | ||
|
||
return gulp | ||
.src('./web/**/*') | ||
.pipe(deploy({ | ||
branch: 'master' | ||
})); | ||
}); | ||
|
||
gulp.task('html', function () { | ||
var fm = require('gulp-front-matter'), | ||
hb = require('gulp-hb'); | ||
|
||
return gulp | ||
.src('./src/*.html', base) | ||
.src(config.src + '/*.html', base) | ||
.pipe(fm({ property: 'meta' })) | ||
.pipe(hb()) | ||
.pipe(gulp.dest('./web/')); | ||
.pipe(gulp.dest(config.dest)); | ||
}); | ||
|
||
gulp.task('css', function () { | ||
var myth = require('gulp-myth'); | ||
|
||
return gulp | ||
.src('./src/assets/css/*.css', base) | ||
.src(config.src + '/assets/css/*.css', base) | ||
.pipe(myth({ | ||
browsers: ['last 2 versions'], | ||
compress: true, | ||
source: './src/assets/css/', | ||
source: config.src + '/assets/css/', | ||
sourcemap: config.isWatching | ||
})) | ||
.pipe(gulp.dest('./web/')); | ||
.pipe(gulp.dest(config.dest)); | ||
}); | ||
|
||
gulp.task('copy', function () { | ||
return gulp | ||
.src('./src/{CNAME,LICENSE,README.md,assets/img/**}', base) | ||
.pipe(gulp.dest('./web/')); | ||
.src(config.src + '/{CNAME,LICENSE,README.md,assets/img/**}', base) | ||
.pipe(gulp.dest(config.dest)); | ||
}); | ||
|
||
gulp.task('watch', function () { | ||
var watch = require('gulp-watch'), | ||
lr = require('gulp-livereload'); | ||
|
||
config.isWatching = true; | ||
|
||
watch('./src/**/*.html', function () { | ||
gulp.start('html'); | ||
}); | ||
|
||
watch('./src/**/*.css', function () { | ||
gulp.start('css'); | ||
}); | ||
|
||
watch('./src/assets/images/**/*.*', function () { | ||
gulp.start('copy'); | ||
}); | ||
gulp.task('deploy', ['default'], function () { | ||
var deploy = require('gulp-gh-pages'); | ||
|
||
watch('./web/**/*.*').pipe(lr()); | ||
return gulp | ||
.src(config.dest + '/**/*') | ||
.pipe(deploy({ | ||
branch: 'master' | ||
})); | ||
}); |
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
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