Comments (9)
Sounds like the primary use case is keeping the NG2 quickstart instructions simple.
Using a custom browser sync config file that replaces lite-server would require changing the quickstart documentation, adding a file to copy/paste in addition to the package.json
that is already required. ie.
var historyFallback = require('connect-history-api-fallback');
var log = require('connect-logger');
/*
| For up-to-date information about the options:
| http://www.browsersync.io/docs/options/
*/
module.exports = {
"files": [
'./**/*.html', './**/*.css', './**/*.js'
],
"server": {
"baseDir": './',
"middleware": [
log(),
historyFallback({"index": '/index.html'})
]
},
"port": 3000
};
Both methods are able to satisfy the goals you mention as it exists today, more or less. A benefit of lite-server
is that you have control/flexibility over any future changes to the quickstart server (for any functionaly outside of what browsersync may provide) without requiring changes to the quickstart documentation. And if the crux of matter is simple instructions, I think the lite-server
npm package is the way to go.
from lite-server.
If we go the route of lite-server
, then we need to expose everything for browser sync and not override it. Plus we'd also need the index.html
and port to be flexible. The port should already be in the bs json.
Want to take a stab at a sample for it?
from lite-server.
The PR #16 already exposes everything via a separate (optional) bs-config.js
file. As far as duplicating all of browsersync's command line arguments, I'm not in favor. :) Too painful to maintain and keep in sync.
Or maybe I'm missing what you mean by:
expose everything for browser sync and not override it
from lite-server.
I meant that the json file allows all bs properties, but we are setting the port ourselves. so we want to use the bs file instead.
and we should add a fallback
file property for cases where folks want something other than the index.html.
from lite-server.
OK, thanks, I think I follow - I'll make modifications to PR #16 and we'll go from there :)
from lite-server.
coolio!
from lite-server.
@cgmartin you may want to add verbose
too (see https://github.com/johnpapa/lite-server/pull/24/files)
from lite-server.
Updated PR #16 based on the feedback here. Let me know if this matches what you're looking for.
from lite-server.
Version 2.0 has been published. New API that follows the exact bs-config.js
format for all overrides.
from lite-server.
Related Issues (20)
- Installation fails E429 too many Requests HOT 1
- Not listening on this port
- npm audit found vulnerabilities HOT 1
- npm is not started started script missing HOT 1
- i m trying to run npm start command but it is giving following error
- Problem with npm install HOT 2
- unable to start lite-server on wsl2 HOT 1
- Error using lite-server for create-react-app HOT 3
- The package needs to update axios to solve high severity vulnerability HOT 1
- Disable SPA handling? HOT 1
- lite-server doesn't trigger or reload the page when I save the page after adding something .
- CORS 404 OPTIONS HOT 2
- How to get Directory Listing working?
- Trying to start an html website using NPM and Lite-server HOT 2
- lite-server not installing using (npm install lite-server -g) HOT 1
- Lite-server dependecies are vulnerable (The Async package have a vulnerability)
- lite-server generating three Uncaught (in promise) errors after each reload
- Lite server disables CDN links
- Static files and api proxy HOT 1
- npm & github recommend not using: "All versions of package lite-server are vulnerable to Denial of Service"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lite-server.