This commit is contained in:
Igor Zhukov 2018-11-29 01:14:09 +04:00
commit 54013d0b01
2 changed files with 17 additions and 8 deletions

View File

@ -56,20 +56,27 @@ The app is based on the AngularJS JavaScript framework, and written in pure Java
The project repository is based on angularjs-seed and includes gulp tasks, so it's easy to launch the app locally on your desktop. The project repository is based on angularjs-seed and includes gulp tasks, so it's easy to launch the app locally on your desktop.
Install [node.js](http://nodejs.org/) and run the following commands in the project directory Install [node.js](http://nodejs.org/).
``` Install dependencies with:
sudo npm install -g gulp
```lang=bash
npm install npm install
``` ```
Optionaly, run the following commands in the project directory to install gulp globally:
```lang=bash
sudo npm install -g gulp
```
This will install all the needed dependencies. This will install all the needed dependencies.
#### Running web-server #### Running web-server
Just run `gulp watch` to start the web server and the livereload task. Just run `npm start` (`gulp watch`) to start the web server and the livereload task.
Open http://localhost:8000/app/index.html in your browser. Open http://localhost:8000/app/index.html in your browser.
@ -78,18 +85,18 @@ Open http://localhost:8000/app/index.html in your browser.
To run this application in Google Chrome as a packaged app, open this URL (in Chrome): `chrome://extensions/`, then tick "Developer mode" and press "Load unpacked extension...". Select the downloaded `app` folder and Webogram should appear in the list. To run this application in Google Chrome as a packaged app, open this URL (in Chrome): `chrome://extensions/`, then tick "Developer mode" and press "Load unpacked extension...". Select the downloaded `app` folder and Webogram should appear in the list.
Run `gulp watch` to watch for file changes and automatically rebuild the app. Run `npm start` (`gulp watch`) to watch for file changes and automatically rebuild the app.
#### Running as Firefox OS App #### Running as Firefox OS App
To run this application in Firefox as a packaged app, open "Menu" -> "Developer" -> "WebIDE" (or hit `Shift + F8`). Choose "Open packaged app" from the Project menu and select the `app` folder. To run this application in Firefox as a packaged app, open "Menu" -> "Developer" -> "WebIDE" (or hit `Shift + F8`). Choose "Open packaged app" from the Project menu and select the `app` folder.
Run `gulp watch` to watch for file changes and automatically rebuild the app. Run `npm start` (`gulp watch`) to watch for file changes and automatically rebuild the app.
#### Running in production #### Running in production
Run `gulp clean`, then `gulp publish` to build the minimized production version of the app. Copy `dist` folder contents to your web server. Don't forget to set `X-Frame-Options SAMEORIGIN` header ([docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options)). Run `npm run clean` (`gulp clean`), then `npm run build` (`gulp publish`) to build the minimized production version of the app. Copy `dist` folder contents to your web server. Don't forget to set `X-Frame-Options SAMEORIGIN` header ([docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options)).
### Third party libraries ### Third party libraries

View File

@ -19,8 +19,10 @@
"show": true "show": true
}, },
"scripts": { "scripts": {
"clean": "gulp clean",
"start": "gulp watch", "start": "gulp watch",
"test": "gulp test" "test": "gulp test",
"build": "gulp publish"
}, },
"repository": { "repository": {
"type": "git", "type": "git",