-
-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update frontend build tools #121
base: v3
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is huge, thanks. I will review and test during next days and comment if needed.
Ok, I'm testing it and I will make separate comments for everything that is not ok. |
TODO 2: Missing dev start commandsBefore this PR I can run /**
* Tasks:
*
* gulp dist
* Generates the browser app in development mode (unless NODE_ENV is set
* to 'production').
*
* gulp live
* Generates the browser app in development mode (unless NODE_ENV is set
* to 'production'), opens it and watches for changes in the source code.
*
* gulp devel
* Generates the browser app in development mode (unless NODE_ENV is set
* to 'production'), opens two browsers and watches for changes in the source
* code.
*
* gulp devel:tcp
* Same as gulp devel, but forcing media over TCP.
*
* gulp devel:vp9
* Generates the browser app in development mode (unless NODE_ENV is set
* to 'production'), opens two browsers forcing VP9 and watches for changes in
* the source code.
*
* gulp devel:h264
* Generates the browser app in development mode (unless NODE_ENV is set
* to 'production'), opens two browsers forcing H264 and watches for changes in
* the source code.
* gulp
* Alias for `gulp dist`.
*/ All those things are gone now since there is just a |
TODO 3: Deploy to mediasoup-demo server
Can you detail it a bit more? I need to understand the implications here. We have a private script to upload the mediasoup-demo to our server where the official demo app runs: cat NO_GIT/deploy-v3demo.sh #/bin/bash
if [ "$1" == "" ] || [ "$1" == "web" ]; then
cd app/
NODE_ENV=production gulp dist
# NODE_ENV=development gulp dist
cd ../
fi
if [ "$1" == "" ] || [ "$1" == "node" ]; then
rsync -avu --delete --delete-excluded \
--exclude=/node_modules \
--exclude=/config.js \
--filter='protect /node_modules' \
--filter='protect /config.js' \
server/ OUR_SERVER:/PATH_TO_DEMO_SITE/
fi Note that for this to work,
|
TODO 4: README is outdated
|
Can we please have separate "lint" and "format" scripts? I am too used to them. |
Currently the lint has some format conflict with prettier, It is recommended to run prettier after eslint to avoid conflict. Anyway, the prettier should be very fast without modifying any logic at all. |
We can modify the deploy script as following for equivalent: cd app/
npm run build
# npm run build -- --mode=development
rm -rf ../server/public
mv dist ../server/public
cd ../ |
@ibc I have responded to all of your TODO by commits or comments |
Thanks @namnm. I will review these days. I won't forget. |
I will update ESLint to version 9 + prettier once this PR is merged since I've already migrated other projects (including mediasoup ones) to ESLint 9 so don't worry about this, please. |
TODO 5: Domain of config.js is not honoredIn v3 branch there is a setting in // Listening hostname (just for `gulp live` task).
domain : process.env.DOMAIN || 'localhost', In my personal // Listening hostname (just for `gulp live` task).
domain : 'mediasoup-demo.dev', Of course |
Wow, amazing work @namnm, THANKS A LOT |
Added changes:
|
Thanks a lot @namnm. I will check all this on Monday and merge it. |
@namnm could you please give me permission to push commits to your branch? I'd like to fix some potential problems and I'd prefer to do it before I merge your PR. For example those issues that show up in the browser console: |
I'm fixing some of those issues in a separate branch, but I'd prefer to use your branch directly if that's ok. |
TODO 6:
|
@ibc In the above error, it says |
I may not be able to check this until next week probably (complex days here). |
npm start
will start development server on port 3000npm run start:tcp
npm run start:vp9
npm run start:h264
BROWSER=none
before run npmnpm run build
will build the code intoapp/dist
. We might need to move toserver/public
to serve this UI