Skip to content
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

Development: Move repository from yarn to npm #56

Merged
merged 8 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<script value="start" />
</scripts>
<node-interpreter value="project" />
<package-manager value="npm" />
<envs />
<method v="2" />
</configuration>
Expand Down
1 change: 1 addition & 0 deletions .run/Apollon (Server).run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<script value="start:server" />
</scripts>
<node-interpreter value="project" />
<package-manager value="npm" />
<envs />
<method v="2">
<option name="NpmBeforeRunTask" enabled="true">
Expand Down
1 change: 1 addition & 0 deletions .run/Apollon (Webapp).run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<script value="start:webapp" />
</scripts>
<node-interpreter value="project" />
<package-manager value="npm" />
<envs />
<method v="2" />
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ ENV DEPLOYMENT_URL="http://localhost:8080"
WORKDIR $build_dir

COPY . .
RUN yarn install
RUN yarn build
RUN npm install
RUN npm run build

# second stage which creates the container image to run the application
FROM node:16
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ Active elements that are interacted with by users in a session are highlighted i
git clone https://github.com/ls1intum/Apollon_standalone

# install the dependencies
yarn install
npm install

# set environment variable
export APPLICATION_SERVER_VERSION=0

# build the web application
yarn build:webapp
npm run build:webapp

# the output can be found in build/webapp directory of the project root
```
Expand All @@ -104,14 +104,14 @@ There are two variants to set this up:
git clone https://github.com/ls1intum/Apollon_standalone

# install the dependencies
yarn install
npm install

# set environment variable
export APPLICATION_SERVER_VERSION=1
export DEPLOYMENT_URL=https://apollon.ase.in.tum.de

# build the web application and the application server
yarn build
npm run build

# the output can be found in build/webapp and build/server directory of the project root
```
Expand Down Expand Up @@ -200,7 +200,7 @@ run docker container
docker run -d --name apollon_standalone -p 8080:8080 apollon_standalone

# build the web application and the application server
yarn build
npm run build

# the output can be found in build/webapp and build/server directory of the project root
```
Expand All @@ -216,13 +216,13 @@ docker run -it --entrypoint /bin/bash apollon_standalone

```
# installs dependencies
yarn install
npm install

# build application
yarn build
npm run build:local

# start webpack dev server
yarn start
npm run start

# accessible via localhost:8888 (webpack dev server with proxy to application server)
# accesible via localhost:8080 (application server with static files)
Expand All @@ -232,12 +232,12 @@ yarn start
While developing the Standalone project, it is often required to make changes in the Apollon project.
This can be achieved by executing the following workflow.

1. In the *Apollon* project: Generate a symlink by executing `yarn link` command.
2. In the *Standalone* project: Link the generated symlink of Apollon *(from step 1)* by executing `yarn link "@ls1intum/apollon"` command.
1. In the *Apollon* project: Generate a symlink by executing `npm link` command.
2. In the *Standalone* project: Link the generated symlink of Apollon *(from step 1)* by executing `npm link "@ls1intum/apollon"` command.

For more information please refer to the [documentation](https://classic.yarnpkg.com/lang/en/docs/cli/link/) of yarn.
For more information please refer to the [documentation](https://docs.npmjs.com/cli/v9/commands/npm-link) of npm.

> ***Note***: While making changes in the *Apollon* project, for the changes to get reflected in *Standalone*, execute the following workflow:
>
> - Recompile the Apollon project by executing `yarn prepare`
> - Rebuild the Standalone project by executing `yarn build`
> - Recompile the Apollon project by executing `npm run prepare`
> - Rebuild the Standalone project by executing `npm run build`
Loading