1
0
mirror of https://github.com/jdan/98.css.git synced 2026-05-05 06:01:22 +09:00

add live-server

This commit is contained in:
Jordan Scales
2020-04-25 20:05:47 -04:00
parent 9b4cb16669
commit 02472b601e
4 changed files with 1211 additions and 64 deletions

View File

@@ -46,9 +46,11 @@ Refer to the [documentation page](https://jdan.github.io/98.css/) for specific i
### Developing
First, run `npm install`.
[`style.css`](https://github.com/jdan/98.css/blob/master/style.css) is where everything happens.
You can use `npm start` to start a development environment that will watch for file changes and rebuild 98.css, serving everything on localhost.
You can use `npm start` to start a development environment that will watch for file changes and rebuild 98.css, reloading your browser in the process.
You can run a build manually with `npm run build`. This will write to the `dist/` directory.

1253
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -32,13 +32,13 @@
"gh-pages": "^2.2.0",
"glob": "^7.1.6",
"highlight.js": "^9.18.1",
"live-server": "^1.2.1",
"mkdirp": "^1.0.4",
"postcss-calc": "^7.0.2",
"postcss-copy": "^7.1.0",
"postcss-css-variables": "^0.14.0",
"postcss-inline": "^1.2.0",
"postcss-inline-svg": "^4.1.0",
"serve-handler": "^6.1.2"
"postcss-inline-svg": "^4.1.0"
},
"dependencies": {}
}

View File

@@ -1,7 +1,4 @@
const chokidar = require("chokidar");
const handler = require("serve-handler");
const http = require("http");
const build = require("./build");
chokidar
@@ -15,12 +12,5 @@ chokidar
build();
});
const server = http.createServer((request, response) => {
return handler(request, response, {
public: "dist",
});
});
server.listen(3000, () => {
console.log("Running at http://localhost:3000");
});
var liveServer = require("live-server");
liveServer.start({ port: 3000, root: "dist" });