mirror of
https://github.com/OutlineFoundation/outline-server.git
synced 2026-05-13 13:58:57 +00:00
Migrate from Yarn to Node lts/gallium (#1004)
* attempt upgrade over CI update shadowbox build node version wild guess try other image, not holding my breath switch image back, try no --upgrade? lol whoops wrong SHA trying this tip out of hand - will make platform a env var next apparently buildx is supposed to detect the platform - lets see find replace yarn w/ npm fix git hook cache npm deps proper lock and enforce engine licenses are... generated by yarn lmao some weird leftovers explode out test workflow jobs Title Case and check for cache hit upgrade NPM check version... eh, worth a try reinstall deps for now so we can debug downstream issues use root bin fix npm workspace, merge lint w/ setup HMMM attempt cache load fix keys remove restore-keys regular install attempt more "correct" npm approach annoyingly caching ~/.npm doesn't cache the global npm version less correct node_module cache, will roll back if doesn't work er... node 15 :/, restore keys changing key...? permission setting so cache can properly hit separate dependecy permission task verbose chmod fix sentry webhook consistency thing * print architecture * attempt amd64-explicit node image * attempt nodev16 upgrade * ah, okay, let's try picking this hash * fix node version reference and npm run clean * revert untouched files caught in squash * remove yarn from travis.yml * testing ci * npmrc comment, revert one of cis * Update src/server_manager/web_app/run_gallery_action.sh Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com> * Update src/server_manager/web_app/run_action.sh Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com> * licenses change * fix package-lock regression * fix webpack-dev-server properly * set install to ci in Dockerfile * forgot to include the README * add ci where it makes sense * delete this part of the README * missed one * testing sub-node_modules * better chmod * prefer glob * reset .github/workflows/test.yml * oops, yarn in ci * rename everything (#1006) * Update test.yml * check_requirements (#1008) * reqcheck draft * finish drafting script - need to test and add to hooks * attempt to roll our own setup... * remove setup script and rename a couple things * remove this nightmare lol * Update release_manager.yml * Update test.yml * 'do' -> 'action' * run -> start * Update src/shadowbox/docker/build.action.sh Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com> * Update README.md * Update README.md Co-authored-by: Benjamin M. Schwartz <bemasc@google.com> * rename 'action' to action * add action list to run action itself * Update src/shadowbox/README.md Co-authored-by: Benjamin M. Schwartz <bemasc@google.com> * Update README.md Co-authored-by: Benjamin M. Schwartz <bemasc@google.com> * Update scripts/run_action.sh Co-authored-by: Benjamin M. Schwartz <bemasc@google.com> * Update src/server_manager/scripts/fill_packaging_opts.sh Co-authored-by: Benjamin M. Schwartz <bemasc@google.com> * style guide fixes * lower case fixes * enforce major version * Update scripts/run_action.sh Co-authored-by: Benjamin M. Schwartz <bemasc@google.com> * Update package.json Co-authored-by: Benjamin M. Schwartz <bemasc@google.com> Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com> Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>
This commit is contained in:
parent
0eca970d6a
commit
9d80b6d448
53 changed files with 39425 additions and 17112 deletions
31
README.md
31
README.md
|
|
@ -33,39 +33,42 @@ The system comprises the following components:
|
|||
## Code Prerequisites
|
||||
|
||||
In order to build and run the code, you need the following installed:
|
||||
- [Node](https://nodejs.org/)
|
||||
- [Yarn](https://yarnpkg.com/en/docs/install)
|
||||
- [Node](https://nodejs.org/) (version `16.13.0`)
|
||||
- [NPM](http://npmjs.org/) (version `8.1.0`)
|
||||
- [Wine](https://www.winehq.org/download), if you would like to generate binaries for Windows.
|
||||
|
||||
Then you need to install all the NPM package dependencies:
|
||||
```
|
||||
yarn
|
||||
|
||||
> 💡 NOTE: if you have `nvm` installed, run `nvm use` to switch to the correct node version!
|
||||
|
||||
Install dependencies with:
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
This project uses [Yarn workspaces](https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/).
|
||||
This project uses [NPM workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces/).
|
||||
|
||||
|
||||
## Build System
|
||||
|
||||
We have a very simple build system based on package.json scripts that are called using `yarn`
|
||||
We have a very simple build system based on package.json scripts that are called using `npm run`
|
||||
and a thin wrapper for what we call build "actions".
|
||||
|
||||
We've defined a `do` package.json script that takes an `action` parameter:
|
||||
We've defined a package.json script called `action` whose parameter is a relative path:
|
||||
```shell
|
||||
yarn do $ACTION
|
||||
npm run action $ACTION
|
||||
```
|
||||
|
||||
This command will define a `do_action()` function and call `${ACTION}_action.sh`, which must exist.
|
||||
The called action script can use `do_action` to call its dependencies. The $ACTION parameter is
|
||||
This command will define a `run_action()` function and call `${ACTION}.action.sh`, which must exist.
|
||||
The called action script can use `run_action` to call its dependencies. The $ACTION parameter is
|
||||
always resolved from the project root, regardless of the caller location.
|
||||
|
||||
The idea of `do_action` is to keep the build logic next to where the relevant code is.
|
||||
The idea of `run_action` is to keep the build logic next to where the relevant code is.
|
||||
It also defines two environmental variables:
|
||||
|
||||
- ROOT_DIR: the root directory of the project, as an absolute path.
|
||||
- BUILD_DIR: where the build output should go, as an absolute path.
|
||||
|
||||
> ⚠️ To find all the actions in this project, run `yarn actions`
|
||||
> ⚠️ To find all the actions in this project, run `npm run action:list`
|
||||
|
||||
### Build output
|
||||
|
||||
|
|
@ -87,7 +90,7 @@ The directories have subdirectories for intermediate output:
|
|||
|
||||
To clean up:
|
||||
```
|
||||
yarn run clean
|
||||
npm run clean
|
||||
```
|
||||
|
||||
## Shadowsocks Resistance Against Detection and Blocking
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue