Skip to content

add 'make watch-frontend' and expand docs #10931

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

Merged
merged 4 commits into from
Apr 12, 2020

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Apr 2, 2020

Not perfect as it requires two terminals, but it's still builds much faster then running the full build. Also, the dev mode of webpack enables additional logging in the browser console, so this should be the go-to mode for frontend development.

Copy link
Contributor

@everhopingandwaiting everhopingandwaiting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need it

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 3, 2020
@guillep2k guillep2k added topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Apr 3, 2020
@guillep2k guillep2k added this to the 1.12.0 milestone Apr 3, 2020
@codecov-io
Copy link

Codecov Report

Merging #10931 into master will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10931   +/-   ##
=======================================
  Coverage   43.50%   43.50%           
=======================================
  Files         597      597           
  Lines       83916    83916           
=======================================
+ Hits        36504    36510    +6     
+ Misses      42903    42899    -4     
+ Partials     4509     4507    -2     
Impacted Files Coverage Δ
modules/git/repo_language_stats.go 66.17% <0.00%> (-4.42%) ⬇️
modules/git/command.go 86.95% <0.00%> (-2.61%) ⬇️
services/pull/check.go 52.43% <0.00%> (-1.22%) ⬇️
modules/queue/workerpool.go 56.93% <0.00%> (-1.07%) ⬇️
services/pull/temp_repo.go 31.62% <0.00%> (ø)
models/error.go 31.02% <0.00%> (+0.53%) ⬆️
modules/git/repo.go 48.11% <0.00%> (+0.83%) ⬆️
services/pull/pull.go 35.88% <0.00%> (+0.88%) ⬆️
modules/process/manager.go 78.31% <0.00%> (+3.61%) ⬆️
modules/git/utils.go 70.14% <0.00%> (+4.47%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3723b06...0ed509c. Read the comment docs.

@lafriks
Copy link
Member

lafriks commented Apr 3, 2020

Imho built in option would be better

@silverwind
Copy link
Member Author

@lafriks yes a single command would be preferred but doing that also opens up issue that the runtime depends on the existance node_modules which I don't really like because gitea is a single-binary distribution that should be able to run standalone.

@lafriks
Copy link
Member

lafriks commented Apr 3, 2020

@silverwind not really, it could be special flag to gitea web command that you can run that would start npx webpack. Something like ./gitea web --dev

@lafriks
Copy link
Member

lafriks commented Apr 3, 2020

or we could even detect if gitea is started in development mode and node_modules directory exists in current working directory and only than start npx webpack in background

@silverwind
Copy link
Member Author

Yeah that could be added later (and this task be removed again), but I still think it's worthwile to have now (at least it saves me from typing that long command every time 😉).

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 4, 2020
@guillep2k
Copy link
Member

If I may, I'd rather not pollute the binary with dev options. It's not likely that anyone would not have the source files when doing front-end development, unless of course they're only working on a UI theme; but even then, the .less files are source code too.

Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a Make target is way more better than a bigger gitea binary and more dependencys

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 11, 2020
@guillep2k
Copy link
Member

Ping LG-TM

@guillep2k guillep2k merged commit cc4da79 into go-gitea:master Apr 12, 2020
@silverwind silverwind deleted the frontend-watch branch April 12, 2020 08:09
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* add 'make watch-frontend' and expand docs

* add bindata note

* add .PHONY

Co-authored-by: guillep2k <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants