misc: add helper make dev command

Running webpack-dev-server is not enough, so add a helper which takes are of
doing the needful.
This commit is contained in:
Saúl Ibarra Corretgé 2018-04-20 11:37:28 +02:00
parent 2af76ebcf9
commit 169c47ac7f
2 changed files with 13 additions and 8 deletions

View File

@ -9,6 +9,7 @@ STYLES_BUNDLE = css/all.bundle.css
STYLES_DESTINATION = css/all.css STYLES_DESTINATION = css/all.css
STYLES_MAIN = css/main.scss STYLES_MAIN = css/main.scss
WEBPACK = ./node_modules/.bin/webpack WEBPACK = ./node_modules/.bin/webpack
WEBPACK_DEV_SERVER = ./node_modules/.bin/webpack-dev-server
all: compile deploy clean all: compile deploy clean
@ -56,6 +57,9 @@ deploy-css:
deploy-local: deploy-local:
([ ! -x deploy-local.sh ] || ./deploy-local.sh) ([ ! -x deploy-local.sh ] || ./deploy-local.sh)
dev: deploy-init deploy-css deploy-lib-jitsi-meet
$(WEBPACK_DEV_SERVER)
source-package: source-package:
mkdir -p source_package/jitsi-meet/css && \ mkdir -p source_package/jitsi-meet/css && \
cp -r *.js *.html connection_optimization favicon.ico fonts images libs static sounds LICENSE lang source_package/jitsi-meet && \ cp -r *.js *.html connection_optimization favicon.ico fonts images libs static sounds LICENSE lang source_package/jitsi-meet && \

View File

@ -44,7 +44,7 @@ To build the Jitsi Meet application, just type
make make
``` ```
## Working with the library sources (lib-jitsi-meet) ### Working with the library sources (lib-jitsi-meet)
By default the library is build from its git repository sources. The default dependency path in package.json is : By default the library is build from its git repository sources. The default dependency path in package.json is :
```json ```json
@ -72,12 +72,12 @@ It allows to link `lib-jitsi-meet` dependency to local source in few steps:
```bash ```bash
cd lib-jitsi-meet cd lib-jitsi-meet
# create global symlink for lib-jitsi-meet package #### create global symlink for lib-jitsi-meet package
npm link npm link
cd ../jitsi-meet cd ../jitsi-meet
# create symlink from the local node_modules folder to the global lib-jitsi-meet symlink #### create symlink from the local node_modules folder to the global lib-jitsi-meet symlink
npm link lib-jitsi-meet npm link lib-jitsi-meet
``` ```
@ -90,16 +90,17 @@ cd jitsi-meet
npm unlink lib-jitsi-meet npm unlink lib-jitsi-meet
npm install npm install
``` ```
## Running with webpack-dev-server for development ### Running with webpack-dev-server for development
Use it at the CLI, type Use it at the CLI, type
``` ```
node_modules/.bin/webpack-dev-server make dev
``` ```
By default the backend deployment used is `beta.meet.jit.si`, you can point the Jitsi-Meet app at a different backend by using a proxy server. To do this set the WEBPACK_DEV_SERVER_PROXY_TARGET variable, type By default the backend deployment used is `beta.meet.jit.si`, you can point the Jitsi-Meet app at a different backend by using a proxy server. To do this set the WEBPACK_DEV_SERVER_PROXY_TARGET variable:
``` ```
WEBPACK_DEV_SERVER_PROXY_TARGET=https://your-example-server.com node_modules/.bin/webpack-dev-server export WEBPACK_DEV_SERVER_PROXY_TARGET=https://your-example-server.com
make dev
``` ```
The app should be running at https://localhost:8080/ The app should be running at https://localhost:8080/