Skip to content

Commit 9f8e3ea

Browse files
Improved the documentation and grammar
1 parent 6a7619d commit 9f8e3ea

File tree

5 files changed

+84
-104
lines changed

5 files changed

+84
-104
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Live Server - Web Extension
2-
>**HELP! NEEDS A GOOD DOCUMENTATION [#4](https://github.com/ritwickdey/live-server-web-extension/issues/4)**
2+
<!-- >**HELP! NEEDS A GOOD DOCUMENTATION [#4](https://github.com/ritwickdey/live-server-web-extension/issues/4)** -->
33

4-
## Brief Description
4+
### Brief Description
55
This browser add-on is an extension for a developer tool in VS Code editor ([Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer)). With this add-on installed, along with the VS Code extension, it gives you a functionality to automatically update your website on save; for other files than just `.htm` and `.html`.
66

7-
So, more specifically, with this add-on, live reload will also work with the following server-side files like: `PHP`, `Node.js` and `ASP.NET`.
7+
So specifically, with this add-on, live reload will also work with the following server-side files within the spectrum of: `PHP`, `.NET` and `NodeJS`.
88

99
<br><hr>
1010

11-
## Documentation
11+
### Documentation
1212
***[About.md](./docs/About.md)***
1313
***[Setup.md](./docs/Setup.md)***
1414
***[FAQ.md](./docs/FAQ.md)***
@@ -19,11 +19,11 @@ So, more specifically, with this add-on, live reload will also work with the fol
1919
<br>
2020

2121
#### The Common Misconceptions
22-
Neither the browser add-on nor the VS Code extension will host a server for: `PHP`, `ASP.NET` or `NodeJS`. It will give you the *reloading function*, so you do not need to refresh the page every time you save your server-side code.
22+
Neither the browser add-on nor the VS Code extension will host a server for: `PHP`, `.NET` or `NodeJS`. It will give you the *reloading function*, so you do not need to refresh the page every time you save your server-side code.
2323

2424
<br><hr>
2525

26-
## News
26+
### News
2727
* #### Verision 1.0.0 (26.10.17)
2828
* ***[New Feature]*** No need to setup proxy. There is now a way to setup - that is pretty easy & straight-forward.
2929

@@ -38,5 +38,5 @@ Neither the browser add-on nor the VS Code extension will host a server for: `PH
3838
<br><hr>
3939

4040

41-
## License
41+
### License
4242
This extension is licensed under the [MIT License](./LICENSE)

docs/About.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
# About
2-
![Illustration GIF-image](./../img/screenshots/live-server-web-extension.gif)
32

43
## That's why I built this extension.
5-
**Lorem ipsum dolor** sit amet, consectetur adipisicing elit. Eligendi non quis exercitationem culpa nesciunt nihil aut nostrum explicabo reprehenderit optio amet ab temporibus asperiores quasi cupiditate. Voluptatum ducimus voluptates voluptas?
4+
The reason I built this browser add-on is to delight the experience of server-side programming...lorem ipsum dolor
65

76
<br>
8-
<br>
97

10-
## Code Insight
11-
```h
8+
![Illustration GIF-image](./../img/screenshots/live-server-web-extension.gif)
9+
10+
<br><br>
11+
12+
# Code Insight
13+
```js
1214
master/
1315
1416
┣━━img/ // Folder with images
1517
1618
┣━━popup/ // Folder for the popup page
1719
18-
┣━━manifest.json // Initialize extension
20+
┣━━manifest.json // Initiate the extension to app store
1921
┣━━background.js // Background script
20-
┗━━reload.js // Reload funcionallity
22+
┗━━reload.js // Reload functionality
2123
```
24+
<br>
2225

2326
#### manifest.json
2427
The manifest.json file is a JSON-formatted file, and is the only file that every extension using WebExtension APIs must contain.
@@ -37,6 +40,5 @@ Background scripts are loaded as soon as the extension is loaded and stay loaded
3740
<br>
3841

3942
#### reload.js
40-
info is needed...
41-
43+
info is needed...
4244
*[all through you can use the npm package [live-server](https://www.npmjs.com/package/live-server)]*

docs/FAQ.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
# Frequently Asked Questions
22

3-
## PHP will download instead of executing
4-
I'm a new to this live server thing but for .html it worked perfectly fine! But now when I want to use it for .php it want's me to download it instead of executing it.
3+
<br>
54

6-
How can I fix it?
5+
### PHP will download instead of executing
6+
I'm new to this live-server thing. I have used it for *`.html`* pages, and it worked flawlessly! But now, when I want to use it for php pages, it downloads the .php file instead of executing it.
77

88
**Answer:**
99
1. [The Common Misconceptions](#the-common-misconceptions)
1010
2. You will need to install a server on your machine or download the necessary requirements. Here is a Stackoverflow question: [PHP server on local machine?](https://stackoverflow.com/questions/1678010/php-server-on-local-machine)
11-
+ [PHP](http://php.net/downloads.php) (just the preprocessor)
11+
+ [PHP](http://php.net/downloads.php) (just the preprocessor without apache)
1212
+ [XAMPP](https://www.apachefriends.org/index.html) (cross-platform)
1313
+ [MAMP](https://www.mamp.info/en/downloads/) (mac)
1414
+ [WAMP](http://www.wampserver.com/en/) (windows)
15-
+ [AppServ](https://www.appserv.org/) (windows)
15+
3. Visit the ***Actual Server Address***: `http://localhost:[port_number]/[workspace]`, not the VS Code extension's ***Live Server Address***: `http://127.0.0.1:5500/`
1616

17-
<br><hr>
1817

19-
## Another question
18+
<br><br><hr><br>
19+
20+
<!-- ### Another question
2021
Lorem ipsum dolor
2122
2223
**Answer:**
2324
Lorem ipsum dolor
2425
25-
<br><hr>
26+
<br><hr><br> -->
2627

2728
>## The Common Misconceptions
28-
>Neither the browser add-on nor the VS Code extension will host a server for: `PHP`, `ASP.NET` or `NodeJS`. It will give you the *reloading function*, so you do not need to refresh the page every time you save.
29+
>Neither the browser add-on nor the VS Code extension will host a server for: `PHP`, `.NET` or `NodeJS`. It will give you the *reloading function*, so you do not need to refresh the page every time you save.
2930
>
30-
>The reason I built this browser add-on is to delight the experience of server-side programming. The server-side is heavier than the client-side because it needs a larger server environment to run and preprocess your code in: `php`, `nodejs` and `asp.net`.
31+
>The reason I built this browser add-on is to delight the experience of server-side programming. The server-side is heavier than the client-side because it needs a larger server environment to run and preprocess your code in: `PHP`, `NodeJS` or `.NET`.

docs/Setup.md

Lines changed: 53 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,77 @@
11
# Setup
2-
>#### The Common Misconceptions
3-
>Neither the browser add-on nor the VS Code extension will host a server for: `PHP`, `ASP.NET` or `NodeJS`. It will give you the *reloading function*, so you do not need to refresh the page every time you save.
2+
#### The Common Misconceptions
3+
Neither the browser add-on nor the VS Code extension will host a server for: `PHP`, `.NET` or `NodeJS`. It will give you the *reloading function*, so you do not need to refresh the page every time you save.
4+
5+
In other words. If you just want the reload function when you work with `.html` files, then you do not need this extension at all.
46

57
<br>
68

79
***Need Help? [Watch Video Tutorial](https://www.youtube.com/watch?v=54wcX1G2GH8)***
810

9-
<br><hr>
10-
11-
## There are two ways to setup `Live Server Web Extension`.
11+
<br><br>
1212

13-
1. [Direct Setup](#direct-setup) (Easy)
14-
2. [Proxy Setup](#proxy-setup) (Advanced)
15-
16-
<br><hr>
13+
# Direct Setup<sup><sub><sup>`Easy`</sup></sub></sup> | Proxy Setup<sup><sub><sup>`Advanced`</sup></sub></sup>
1714

18-
## Direct Setup
15+
### Direct Setup
1916

20-
1. Install [VS Code](https://code.visualstudio.com/download) from Microsoft (code editor).
21-
2. Install VS Code [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) (extension).
17+
1. Install [VS Code](https://code.visualstudio.com/download) from Microsoft. <sup>(code editor)</sup>
18+
2. Install VS Code [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer). <sup>(extension to code editor)</sup>
2219
3. Install the browser add-on; [Chrome](https://chrome.google.com/webstore/detail/live-server-web-extension/fiegdmejfepffgpnejdinekhfieaogmj/) or [Firefox](https://addons.mozilla.org/en-US/firefox/addon/live-server-web-extension/).
23-
4. Install and run a server on your machine
24-
+ [PHP](http://php.net/downloads.php) (just the preprocessor)
25-
+ [XAMPP](https://www.apachefriends.org/index.html) (cross-platform)
26-
+ [MAMP](https://www.mamp.info/en/downloads/) (mac)
27-
+ [WAMP](http://www.wampserver.com/en/) (windows)
20+
4. Install and run a server on your machine: [Servers and Frameworks](#servers-and-frameworks)
2821
5. Enter the neccesary fields (screenshot below)
29-
+ **Actual Server Address:** is the address where your server is located and the port.
30-
+ **Live Server Address:** is the address where your VS code extension is running.
31-
6. Push the Go Live-button in your editor.
22+
1. **Actual Server Address:** is the address where your server is located and the port.
23+
2. **Live Server Address:** is the address where your VS code extension is running.
24+
6. Push the `Go Live`-button in your editor's statusbar.
3225
7. Visit the `Actual Server Address`
3326

34-
![](./../img/screenshots/direct-setup.png)
27+
![two-step-image](./../img/screenshots/direct-setup.png)
3528

3629
<br><hr>
3730

38-
## Proxy Setup
31+
### Proxy Setup
32+
1. Install [VS Code](https://code.visualstudio.com/download) from Microsoft. <sup>(code editor)</sup>
33+
2. Install VS Code [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer). <sup>(extension to code editor)</sup>
34+
3. Install the browser add-on; [Chrome](https://chrome.google.com/webstore/detail/live-server-web-extension/fiegdmejfepffgpnejdinekhfieaogmj/) or [Firefox](https://addons.mozilla.org/en-US/firefox/addon/live-server-web-extension/).
35+
4. Install and run a server on your machine: [Servers and Frameworks](#servers-and-frameworks)
36+
5. Enter the neccesary values (code block below)
37+
1. **Proxy Address:** is the folder you want proxy from. The path is relative to the workspace.
38+
2. **Live Server Address:** is the address where your VS code extension is running.
39+
6. Push the `Go Live`-button in your editor's statusbar.
40+
41+
*`.vscode/settings.json`*
42+
```js
43+
{
44+
// Mainly for static files
45+
"liveServer.settings.useWebExt": true,
3946

40-
* Install the extension on your browser.
41-
* Install [`VSCode`](https://code.visualstudio.com/download) Editor & [`Live Server`](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) Extension.
42-
* Confiure Live Server settings (`.vscode/settings.json`) as follows :
47+
// This means that you change your real URL (current PHP url)
48+
// to another URL (which Live Sever starts).
49+
"liveServer.settings.proxy": {
50+
"enable": true,
51+
"baseUri": "/", // i. Workspace folder.
52+
"proxyUri": "http://localhost:80/workspace" // ii. Actual Server Address.
53+
},
54+
}
4355

44-
```js
45-
//.vscode/settings.json
56+
```
57+
>**Note:** You need to stay on the new host that will be provided by Live Server.
4658
47-
{
48-
// Mainly for static files
49-
"liveServer.settings.useWebExt": true,
59+
<br><br><hr>
5060

51-
/*
52-
If you have dynamic pages (PHP), you have to setup proxy - it's pretty easy.
61+
# Servers and Frameworks
5362

54-
In easy word, it means you're shifting your real url (actual PHP url)
55-
to another url (which LiveSever will start).
56-
*/
57-
"liveServer.settings.proxy": {
58-
"enable": true, //switch on :)
59-
"baseUri": "/", //from where you want to proxy (live server).
60-
"proxyUri": "http://127.0.0.1:80" //the actual server url (NOT live server).
61-
},
62-
}
6363

64-
```
65-
* ...And you're done! Just Open Live Server _`(ctrl+shift+p > "Open Live Server")`_ and don't forget to turn on live reload from your browser.
66-
* Note: You have stay on the new url that will be given by Live Server.
64+
### PHP
65+
+ [PHP](http://php.net/downloads.php) <sup><sub>`just the preprocessor`</sub></sup>
66+
+ [XAMPP](https://www.apachefriends.org/index.html) <sup><sub>`cross-platform`</sub></sup>
67+
+ [MAMP](https://www.mamp.info/en/downloads/) <sup><sub>`mac`</sub></sup>
68+
+ [WAMP](http://www.wampserver.com/en/) <sup><sub>`windows`</sub></sup>
6769

68-
<!-- <br>
6970

70-
# All available VS Code settings
71-
```json
72-
{
73-
"liveServer.settings.AdvanceCustomBrowserCmdLine": null,
74-
"liveServer.settings.ChromeDebuggingAttachment": false,
75-
"liveServer.settings.CustomBrowser": "null",
76-
"liveServer.settings.donotShowInfoMsg": false,
77-
"liveServer.settings.donotVerifyTags": false,
78-
"liveServer.settings.host": "127.0.0.1",
79-
"liveServer.settings.https": {
80-
"enable": false,
81-
"cert": "",
82-
"key": "",
83-
"passphrase": ""
84-
},
85-
"liveServer.settings.ignoreFiles": [
86-
".vscode/**",
87-
"**/*.scss",
88-
"**/*.sass"
89-
],
90-
"liveServer.settings.NoBrowser": false,
91-
"liveServer.settings.port": 5500,
92-
"liveServer.settings.proxy": {
93-
"enable": false,
94-
"baseUri": "/",
95-
"proxyUri": "http://127.0.0.1:80"
96-
},
97-
"liveServer.settings.root": "/",
98-
"liveServer.settings.useWebExt": false
99-
}
100-
``` -->
71+
### NodeJS
72+
+ [ExpressJS](https://expressjs.com/en/starter/installing.html) <sup><sub>`cross-platform`</sub></sup>
73+
74+
75+
### .Net
76+
+ [DotNet Core](https://www.microsoft.com/net/learn/get-started/windows) <sup><sub>`cross-platform`</sub></sup>
77+
+ [IIS](https://www.iis.net/) <sup><sub>`windows`</sub></sup>

manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33
"name": "Live Server Web Extension",
44
"version": "1.0.0",
5-
"description": "Live Reload For Static & Dynamic Pages",
5+
"description": "This browser add-on is an extension for a developer tool in VS Code editor (Live Server). With this add-on installed, along with the VS Code extension, it gives you a functionality to automatically update your website on save; for other files than just .htm and .html.",
66
"icons": {
77
"96": "./img/icon.png",
88
"128": "./img/icon128.png"
@@ -36,4 +36,4 @@
3636
"http://*/*",
3737
"https://*/*"
3838
]
39-
}
39+
}

0 commit comments

Comments
 (0)