This repository has been archived by the owner on Feb 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from Code4Nepal/42_np
doc: update README #42
- Loading branch information
Showing
2 changed files
with
49 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,59 @@ | ||
# पारिजात | ||
# Sangraha Frontend | ||
|
||
Super performant `Material` app for preact world using [preact-material-components](https://github.com/prateekbh/preact-material-components) | ||
Sangraha frontend is a single page application created using Preact. Preact is a lightwright React alternative. | ||
|
||
## CLI Commands | ||
## Development Instructions | ||
|
||
``` bash | ||
# install dependencies | ||
### Pre-requisites | ||
|
||
Node.js is required to develop the frontend. To install Node.js and npm (Node Package Manager) either follow the [official instructions](https://nodejs.org/en/) or [use nvm](https://github.com/creationix/nvm). | ||
|
||
#### Using nvm | ||
|
||
Install `nvm` following the instructions here [nvm installation](https://github.com/creationix/nvm). | ||
|
||
Then install the stable version of `node` and `npm`. At the time when this was written the `LTS` version for Node was `8.12.0`. | ||
|
||
```bash | ||
nvm install 8.12.0 | ||
``` | ||
|
||
### Install Dependencies | ||
|
||
Head to the directory where this README.md file is located and install all development dependencies using npm: | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
This downloads all the dependencies locally in `node_modules` directory. | ||
|
||
# serve with hot reload at localhost:8080 | ||
|
||
### Start Development Server | ||
|
||
Start the development server using the following command: | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
This will start local development server at `localhost:8080` . The development server has hot-reloading enabled and any changes reflect in the browser once the files are saved. | ||
|
||
|
||
# build for production with minification | ||
### Build for production | ||
|
||
To build the application for deployment (minified static files), use the following: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
# test the production build locally | ||
### Start Production Server | ||
|
||
```bash | ||
npm run serve | ||
``` | ||
|
||
For detailed explanation on how things work, checkout the [CLI Readme](https://github.com/developit/preact-cli/blob/master/README.md). | ||
## Preact-CLI | ||
|
||
The frontend was bootstrapped using Preact-CLI. For further instructions, and detailed explanation on how things work, checkout the [CLI Readme](https://github.com/developit/preact-cli/blob/master/README.md). |