Skip to content

Commit ed7992e

Browse files
committed
Merge branch 'master' of https://github.com/mwiley/gulp_example
Conflicts: gulpfile.js index.html
2 parents 8fb3fdc + 7f63ff1 commit ed7992e

File tree

9 files changed

+76
-9
lines changed

9 files changed

+76
-9
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules/
2+
.sass_cache/

coffee/script.coffee

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
$ ->
2-
$('h1').append('Hello')
1+
$list = $('#list')
2+
$('#add').click ->
3+
$li = $('<li class="animate">')
4+
$list.append $li
5+
$li.html 'test'
6+
return
7+
$('#remove').click ->
8+
$('#list li:last').remove()
9+
return

css/style.css

+10
Original file line numberDiff line numberDiff line change
@@ -4888,5 +4888,15 @@ button.close {
48884888
display: none !important; } }
48894889

48904890
.test {
4891+
color: red; }
4892+
4893+
.animate {
4894+
transition-property: transform, color;
4895+
transition-timing: ease-out;
4896+
transition-duration: .3s;
4897+
color: red; }
4898+
4899+
.animation:active {
4900+
transform: scale(1.02);
48914901
color: blue; }
48924902

dist/all.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1-
alert("Hello");
1+
var $list;
2+
3+
$list = $('#list');
4+
5+
$('#add').click(function() {
6+
var $li;
7+
$li = $('<li class="animate">');
8+
$list.append($li);
9+
$li.html('test');
10+
});
11+
12+
$('#remove').click(function() {
13+
$('#list li:last').remove();
14+
});

dist/all.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ gulp.task('sass', function() {
3333
gulp.task('coffee', function() {
3434
gulp.src('coffee/*.coffee')
3535
.pipe(coffee({bare: true}))
36-
.on('error', gutil.log)
37-
.pipe(gulp.dest('scripts'));
36+
.pipe(gulp.dest('js'));
3837
});
3938

4039
// Concatenate & Minify JS
@@ -51,12 +50,13 @@ gulp.task('scripts', function() {
5150
// Watch Files For Changes
5251
gulp.task('watch', function() {
5352
livereload.listen();
53+
gulp.watch('coffee/*.coffee', ['coffee']);
5454
gulp.watch('js/*.js', ['lint', 'scripts']);
55-
gulp.watch('scss/*.scss', ['sass']);
5655
gulp.watch('*.html', function(e){
5756
livereload.changed(e.path);
5857
});
58+
gulp.watch('scss/*.scss', ['sass']);
5959
});
6060

6161
// Default Task
62-
gulp.task('default', ['lint', 'sass', 'scripts', 'watch']);
62+
gulp.task('default', ['lint', 'sass', 'coffee', 'scripts', 'watch']);

index.html

+11
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,22 @@
44
<title>Bootstrap 101 Template</title>
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<link rel="stylesheet" type="text/css" href="css/style.css">
7+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
78
</head>
89
<body>
10+
911
<div class="page-wrapper">
1012
<h1 class="test">Hello, world!</h1>
1113
<script src="js/script.js"></script>
14+
15+
<ul id="list">
16+
<li class='animate'>test</li>
17+
</ul>
18+
19+
<input type="button" value="add" id="add">
20+
<input type="button" value="remove" id="remove">
21+
<script src="dist/all.min.js"></script>
1222
</div>
23+
1324
</body>
1425
</html>

js/script.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1-
alert("Hello");
1+
var $list;
2+
3+
$list = $('#list');
4+
5+
$('#add').click(function() {
6+
var $li;
7+
$li = $('<li class="animate">');
8+
$list.append($li);
9+
$li.html('test');
10+
});
11+
12+
$('#remove').click(function() {
13+
$('#list li:last').remove();
14+
});

scss/style.scss

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
@import "bootstrap";
22

33
.test{
4+
color: red;
5+
}
6+
7+
.animate{
8+
transition-property: transform, color;
9+
transition-timing: ease-out;
10+
transition-duration: .3s;
11+
color: red;
12+
}
13+
14+
.animation:active{
15+
transform: scale(1.02);
416
color: blue;
517
}
618
.page-wrapper {

0 commit comments

Comments
 (0)