Browse Source

gulp browser-sync

windhamdavid 4 years ago
parent
commit
adea0f052a
2 changed files with 43 additions and 0 deletions
  1. 16 0
      gulpfile.js
  2. 27 0
      package.json

+ 16 - 0
gulpfile.js

@@ -0,0 +1,16 @@
+const gulp = require('gulp');
+const browserSync = require('browser-sync').create();
+
+function run() {
+  browserSync.init({
+    server: {
+      baseDir: "./",
+      index: "/index.html"
+    }
+  });
+  gulp.watch('./css/**/*.css').on('change', browserSync.reload);;
+  gulp.watch('./*.html').on('change',browserSync.reload);
+  gulp.watch('./js/**/*.js').on('change', browserSync.reload);
+}
+
+exports.run = run;

+ 27 - 0
package.json

@@ -0,0 +1,27 @@
+{
+  "name": "daw",
+  "version": "1.0.0",
+  "author": "",
+  "description": "a space on the interwebs",
+  "private": true,
+  "repository": {
+    "type": "git",
+    "url": "https://code.davidawindham.com/david/daw"
+  },
+  "main": "index.js",
+  "scripts": {
+    "dev": "next",
+    "build": "next build",
+    "start": "next start"
+  },
+  "keywords": [],
+  "license": "ISC",
+  "dependencies": {
+    "milligram": "^1.3.0",
+    "normalize.css": "^8.0.1"
+  },
+  "devDependencies": {
+    "browser-sync": "^2.26.7",
+    "gulp": "^4.0.2"
+  }
+}