move to gulp

This commit is contained in:
Naoki Rinmous 2016-10-25 12:19:29 +08:00
parent 62f462cbc5
commit d25f8e5b8b
2 changed files with 45 additions and 0 deletions

22
gulpfile.js Normal file
View File

@ -0,0 +1,22 @@
const bower = require('gulp-bower');
const browserSync = require('browser-sync');
const cleanCss = require('gulp-clean-css');
const gulp = require('gulp');
const rename = require('gulp-rename');
const sass = require('gulp-sass');
gulp.task('default', ['stylesheet']);
gulp.task('stylesheet', function () {
return gulp.src('./assets/stylesheets/index.scss')
.pipe(sass().on('error', sass.logError))
.pipe(rename('index.bundle.css'))
.pipe(gulp.dest('./assets/stylesheets/'))
.pipe(cleanCss())
.pipe(rename('index.bundle.min.css'))
.pipe(gulp.dest('./assets/stylesheets/'));
});
gulp.task('watch', ['default'], function () {
gulp.watch('./assets/stylesheets/**/*.scss', ['stylesheet']);
});

23
package.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "loopback.moe",
"version": "0.0.1",
"description": "",
"main": "",
"dependencies": {},
"devDependencies": {
"gulp": "^3.9.1",
"gulp-clean-css": "^2.0.13",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.3.2"
},
"repository": {
"type": "git",
"url": "git+https://github.com/amphineko/loopback.moe.git"
},
"scripts": {
"postinstall": "bower install"
},
"author": "Naoki Rinmous <sukareki@gmail.com>",
"license": "MIT",
"homepage": "https://loopback.moe/"
}