mirror of https://github.com/stashapp/stash.git
Cut over to v2.5 UI (#433)
* Cut over to v2.5 UI * Use node 12 in travis * Remove unnecessary `nvm use` * Update docker file
This commit is contained in:
parent
10b6d4b579
commit
aee9df966b
|
@ -4,11 +4,10 @@
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<excludeFolder url="file://$MODULE_DIR$/certs" />
|
<excludeFolder url="file://$MODULE_DIR$/certs" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/ui/v1/dist" />
|
<excludeFolder url="file://$MODULE_DIR$/ui/v2.5/build" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/ui/v2/build" />
|
<excludeFolder url="file://$MODULE_DIR$/ui/v2.5/node_modules" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/ui/v2/node_modules" />
|
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -9,9 +9,10 @@ env:
|
||||||
- GO111MODULE=on
|
- GO111MODULE=on
|
||||||
before_install:
|
before_install:
|
||||||
- echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc
|
- echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc
|
||||||
- travis_retry yarn --cwd ui/v2 install --frozen-lockfile
|
- nvm install 12
|
||||||
|
- travis_retry yarn --cwd ui/v2.5 install --frozen-lockfile
|
||||||
- make generate
|
- make generate
|
||||||
- CI=false yarn --cwd ui/v2 build # TODO: Fix warnings
|
- CI=false yarn --cwd ui/v2.5 build # TODO: Fix warnings
|
||||||
#- go get -v github.com/mgechev/revive
|
#- go get -v github.com/mgechev/revive
|
||||||
script:
|
script:
|
||||||
#- make lint
|
#- make lint
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -21,7 +21,7 @@ clean:
|
||||||
.PHONY: generate
|
.PHONY: generate
|
||||||
generate:
|
generate:
|
||||||
go generate -mod=vendor
|
go generate -mod=vendor
|
||||||
cd ui/v2 && yarn run gqlgen
|
cd ui/v2.5 && yarn run gqlgen
|
||||||
|
|
||||||
# Runs gofmt -w on the project's source code, modifying any files that do not match its style.
|
# Runs gofmt -w on the project's source code, modifying any files that do not match its style.
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
|
@ -49,5 +49,5 @@ it:
|
||||||
|
|
||||||
.PHONY: ui
|
.PHONY: ui
|
||||||
ui:
|
ui:
|
||||||
cd ui/v2 && yarn build
|
cd ui/v2.5 && yarn build
|
||||||
packr2
|
packr2
|
||||||
|
|
|
@ -69,7 +69,7 @@ Join the [Discord server](https://discord.gg/2TsNFKt).
|
||||||
* Go Install: `go get github.com/gobuffalo/packr/v2/packr2@v2.0.2`
|
* Go Install: `go get github.com/gobuffalo/packr/v2/packr2@v2.0.2`
|
||||||
* [Binary Download](https://github.com/gobuffalo/packr/releases)
|
* [Binary Download](https://github.com/gobuffalo/packr/releases)
|
||||||
* [Yarn](https://yarnpkg.com/en/docs/install) - Yarn package manager
|
* [Yarn](https://yarnpkg.com/en/docs/install) - Yarn package manager
|
||||||
* Run `yarn install --frozen-lockfile` in the `stash/ui/v2` folder (before running make generate for first time).
|
* Run `yarn install --frozen-lockfile` in the `stash/ui/v2.5` folder (before running make generate for first time).
|
||||||
|
|
||||||
NOTE: You may need to run the `go get` commands outside the project directory to avoid modifying the projects module file.
|
NOTE: You may need to run the `go get` commands outside the project directory to avoid modifying the projects module file.
|
||||||
|
|
||||||
|
|
|
@ -32,10 +32,10 @@ RUN wget -O /ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/releases/ffmpeg-rele
|
||||||
mv /ffmpeg*/ /ffmpeg/
|
mv /ffmpeg*/ /ffmpeg/
|
||||||
|
|
||||||
# copy the ui yarn stuff so that it doesn't get rebuilt every time
|
# copy the ui yarn stuff so that it doesn't get rebuilt every time
|
||||||
COPY ./ui/v2/package.json ./ui/v2/yarn.lock /stash/ui/v2/
|
COPY ./ui/v2.5/package.json ./ui/v2.5/yarn.lock /stash/ui/v2.5/
|
||||||
|
|
||||||
WORKDIR /stash
|
WORKDIR /stash
|
||||||
RUN yarn --cwd ui/v2 install --frozen-lockfile
|
RUN yarn --cwd ui/v2.5 install --frozen-lockfile
|
||||||
|
|
||||||
COPY . /stash/
|
COPY . /stash/
|
||||||
ENV GO111MODULE=on
|
ENV GO111MODULE=on
|
||||||
|
|
|
@ -65,7 +65,7 @@ func unauthorized(w http.ResponseWriter) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Start() {
|
func Start() {
|
||||||
uiBox = packr.New("UI Box", "../../ui/v2/build")
|
uiBox = packr.New("UI Box", "../../ui/v2.5/build")
|
||||||
//legacyUiBox = packr.New("UI Box", "../../ui/v1/dist/stash-frontend")
|
//legacyUiBox = packr.New("UI Box", "../../ui/v1/dist/stash-frontend")
|
||||||
setupUIBox = packr.New("Setup UI Box", "../../ui/setup")
|
setupUIBox = packr.New("Setup UI Box", "../../ui/setup")
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
BROWSER=none
|
BROWSER=none
|
||||||
PORT=3001
|
PORT=3000
|
||||||
|
|
|
@ -1,42 +1,45 @@
|
||||||
* Install gulp `yarn global add gulp`
|
|
||||||
|
|
||||||
|
|
||||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||||
|
|
||||||
## Available Scripts
|
## Available Scripts
|
||||||
|
|
||||||
In the project directory, you can run:
|
In the project directory, you can run:
|
||||||
|
|
||||||
### `npm start`
|
### `yarn start`
|
||||||
|
|
||||||
Runs the app in the development mode.<br>
|
Runs the app in the development mode.<br />
|
||||||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||||
|
|
||||||
The page will reload if you make edits.<br>
|
The page will reload if you make edits.<br />
|
||||||
You will also see any lint errors in the console.
|
You will also see any lint errors in the console.
|
||||||
|
|
||||||
### `npm test`
|
### `yarn test`
|
||||||
|
|
||||||
Launches the test runner in the interactive watch mode.<br>
|
Launches the test runner in the interactive watch mode.<br />
|
||||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||||
|
|
||||||
### `npm run build`
|
### `yarn build`
|
||||||
|
|
||||||
Builds the app for production to the `build` folder.<br>
|
Builds the app for production to the `build` folder.<br />
|
||||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||||
|
|
||||||
The build is minified and the filenames include the hashes.<br>
|
The build is minified and the filenames include the hashes.<br />
|
||||||
Your app is ready to be deployed!
|
Your app is ready to be deployed!
|
||||||
|
|
||||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||||
|
|
||||||
### `npm run eject`
|
### `yarn format`
|
||||||
|
|
||||||
|
Formats the whitespace of all typescript and scss code with prettier, to ease editing and ensure a common code style.
|
||||||
|
|
||||||
|
Should ideally be run before all frontend PRs.
|
||||||
|
|
||||||
|
### `yarn eject`
|
||||||
|
|
||||||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
||||||
|
|
||||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||||
|
|
||||||
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||||
|
|
||||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||||
|
|
||||||
|
@ -45,3 +48,27 @@ You don’t have to ever use `eject`. The curated feature set is suitable for sm
|
||||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||||
|
|
||||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||||
|
|
||||||
|
### Code Splitting
|
||||||
|
|
||||||
|
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
|
||||||
|
|
||||||
|
### Analyzing the Bundle Size
|
||||||
|
|
||||||
|
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
|
||||||
|
|
||||||
|
### Making a Progressive Web App
|
||||||
|
|
||||||
|
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
|
||||||
|
|
||||||
|
### Advanced Configuration
|
||||||
|
|
||||||
|
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
|
||||||
|
|
||||||
|
### Deployment
|
||||||
|
|
||||||
|
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
|
||||||
|
|
||||||
|
### `yarn build` fails to minify
|
||||||
|
|
||||||
|
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
|
||||||
|
|
Loading…
Reference in New Issue