Skip to content

Commit

Permalink
init开发环境设置
Browse files Browse the repository at this point in the history
  • Loading branch information
cuilei5205189 committed Jul 23, 2018
0 parents commit 9a4788c
Show file tree
Hide file tree
Showing 8 changed files with 4,457 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
14 changes: 14 additions & 0 deletions dist/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.test {
height: 100vh;
width: 100vw;
background: #6bc3c9; }
.test .test1 {
background-color: yellow;
height: 100px;
width: 100px; }
.test .test2 {
background-color: green;
height: 100px;
width: 100px; }
.test .test3 {
background-color: blue; }
1 change: 1 addition & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta http-equiv="X-UA-Compatible" content="ie=edge"/><link rel="stylesheet" href="css/style.css"/><title>learn gulp</title></head><body><div class="test"></div></body></html>
30 changes: 30 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
var gulp = require('gulp')
jade = require('gulp-jade')
sass = require('gulp-sass')
plumber = require('gulp-plumber')


gulp.task('images', function () {
return gulp.src('images/**').pipe(gulp.dest('dist/images'))
})

gulp.task('sass', function () {
return gulp.src('sass/*.scss')
.pipe(plumber())
.pipe(sass())
.pipe(gulp.dest('dist/css'))
})

gulp.task('jade', function () {
return gulp.src('jade/*.jade')
.pipe(plumber())
.pipe(jade())
.pipe(gulp.dest('dist'))
})

gulp.task('see', function () {
gulp.watch('sass/**', ['sass'])
gulp.watch('jade/*.jade', ['jade'])
})

gulp.task('default', ['see']);
12 changes: 12 additions & 0 deletions jade/index.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
html(lang="en")
head
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1.0")
meta(http-equiv="X-UA-Compatible", content="ie=edge")
link(rel="stylesheet", href="css/style.css")
title learn gulp
body
.test


Loading

0 comments on commit 9a4788c

Please sign in to comment.