X Tutup
Skip to content

Commit c68aaba

Browse files
committed
Added gulp
1 parent 6e77563 commit c68aaba

File tree

6 files changed

+33
-86
lines changed

6 files changed

+33
-86
lines changed

03 - CSS Variables/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules

03 - CSS Variables/gulpfile.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const gulp = require('gulp');
2+
const browserSync = require('browser-sync').create();
3+
4+
gulp.task('default', ['browser-sync']);
5+
6+
gulp.task('browser-sync', ['watch'], function() {
7+
return browserSync.init({ server: { baseDir: './src' } });
8+
});
9+
10+
gulp.task('watch', function() {
11+
return gulp.watch('./src/**/*', ['refresh']);
12+
});
13+
14+
gulp.task('refresh', function() {
15+
return browserSync.reload();
16+
});

03 - CSS Variables/index-FINISHED.html

Lines changed: 0 additions & 84 deletions
This file was deleted.

03 - CSS Variables/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "2",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "variables.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"devDependencies": {
12+
"browser-sync": "^2.18.2",
13+
"gulp": "^3.9.1"
14+
}
15+
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ <h2>Update CSS Variables with <span class='hl'>JS</span></h2>
5252
}
5353
</style>
5454

55-
<script>
56-
</script>
55+
<script src='variables.js'></script>
5756

5857
</body>
5958
</html>

03 - CSS Variables/src/variables.js

Whitespace-only changes.

0 commit comments

Comments
 (0)
X Tutup