1.0.4 • Published 2 years ago
rapid-preview v1.0.4
RapidPreview
Discription
Instalation
- To install first you need nodejs installed. click here to downloat node
- Type following command to install
npm i -g rapid-preview- Or run npx command directly
npx rapid-preview@latest < arguments,>usage
- Got to any directory that includes a html file.
- If the directory have only one html file , Simply run "
rapidpreview"- If you have multiple files, Then specify the filename. Like "
rapidpreview <file_name.html>"- If the default PORT is not available, Specify the port like "
rapidpreview index.html --port 5000"node: If you'r using editer like VScode and wanna use integrated terminal, Then follow the steps.
- Run "
npm init" to create npm project.- In npm json file add command to a script, For Example, In Package File:
In here I added a script "{ "name": "my-package", "version": "1.0.0", "description": "", "main": "index.js", "dependencies": {} "devDependencies": {}, "scripts": { "run-rapidpreview": "rapidpreview index.html" }, "author": "-Author-name-" }run-rapidpreview".- Run that script using "
npm run <script-name>", In previous example \ isrun-rapidpreview.Argument List
--helpoptional### To Show help ``` rapidpreview --help ```--portoptionalTo specify the PORT
rapidpreview --port 3000default:: 4040
--pathoptionalTo specify the path to watch
rapidpreview --path "E://my_app/"default:: '.' (current path)
--fileoptionalTo specify the file name
rapidpreview --file mysite.htmldefault:: <first file in the path>
Example
rapidpreview index.htmlrapidpreview --path C://Github/myApp --file example.html --port 3000