From f56bb9ec0322042d1774a845569454e470a2fdcd Mon Sep 17 00:00:00 2001 From: Zhe Zhang Date: Mon, 17 Aug 2015 17:53:23 +0800 Subject: init gulp workflow for building assets --- .gitignore | 1 + gulpfile.babel.js | 31 +++++++++++++++++++++++++++++++ package.json | 26 ++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 gulpfile.babel.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 85de9cf..ba49d74 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ src +node_modules diff --git a/gulpfile.babel.js b/gulpfile.babel.js new file mode 100644 index 0000000..839cf63 --- /dev/null +++ b/gulpfile.babel.js @@ -0,0 +1,31 @@ +// Gulpfile.js for Hugo Theme – Slim +// Git repo: https://github.com/zhe/hugo-theme-slim + +// This gulpfile makes use of new JavaScript features. +// Babel handles this without us having to do anything. It just works. +// You can read more about the new JavaScript features here: +// https://babeljs.io/docs/learn-es2015/ + +import gulp from 'gulp'; +import gulpLoadPlugins from 'gulp-load-plugins'; + +const $ = gulpLoadPlugins(); +const options = { + +}; + +// Compile and prefix stylesheets +gulp.task('style', () => { + return gulp.src('src/sass/*.scss') + .pipe($.sourcemaps.init()) + .pipe($.sass().sync({ + outputStyle: 'expanded', + precision: 10, + includePaths: ['.'], + }).on('error', $.sass.logError)) + .pipe($.autoprefixer({ + browsers: ['last 2 version'], + })) + .pipe($.sourcemaps.write()) + .pipe(gulp.dest('static/css')); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..e3a87fc --- /dev/null +++ b/package.json @@ -0,0 +1,26 @@ +{ + "name": "hugo-theme-slim", + "description": "Slim is a minimal, clean and beautiful theme for [Hugo](http://gohugo.io/).", + "version": "1.0.0", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://zhe@github.com/zhe/hugo-theme-slim.git" + }, + "author": "Zhe Zhang", + "license": "ISC", + "bugs": { + "url": "https://github.com/zhe/hugo-theme-slim/issues" + }, + "homepage": "https://github.com/zhe/hugo-theme-slim#readme", + "devDependencies": { + "babel": "^5.8.21", + "gulp": "^3.9.0", + "gulp-autoprefixer": "^2.3.1", + "gulp-load-plugins": "^1.0.0-rc.1", + "gulp-sass": "^2.0.4", + "gulp-sourcemaps": "^1.5.2" + } +} -- cgit v1.2.3