Skip to content

Commit

Permalink
Switch from yarn to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
linusg committed Feb 26, 2024
1 parent 3fad445 commit c569ace
Show file tree
Hide file tree
Showing 7 changed files with 14,539 additions and 8,873 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: yarn install
- run: yarn build
- run: npm install
- run: npm run build
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: yarn install
- run: yarn lint:js
- run: yarn lint:md
- run: yarn lint:scss
- run: npm install
- run: npm run lint:js
- run: npm run lint:md
- run: npm run lint:scss
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: yarn install
- run: yarn test
- run: npm install
- run: npm test
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ directory as `docker-compose.yml`)

### Manually

- Run `yarn install` to install dependencies
- Run `yarn build` to compile and minify for production
- Run `npm install` to install dependencies
- Run `npm run build` to compile and minify for production
- Copy the content of the `dist/` directory to your webroot

## Configuration
Expand All @@ -97,23 +97,23 @@ See [`docs/config.md`](docs/config.md) for all available options.

## Development

- Run `yarn install` to install dependencies
- Run `yarn serve` to compile for development and start the hot-reload server
- Run `yarn lint:js` to lint JavaScript/Vue files
- Run `yarn lint:md` to lint Markdown files
- Run `yarn lint:scss` to lint SCSS files
- Run `yarn format:js` to format JavaScript/Vue files
- Run `yarn format:md` to format Markdown files
- Run `yarn format:scss` to format SCSS files
- Run `yarn test` to run unit tests
- Run `npm install` to install dependencies
- Run `npm run serve` to compile for development and start the hot-reload server
- Run `npm run lint:js` to lint JavaScript/Vue files
- Run `npm run lint:md` to lint Markdown files
- Run `npm run lint:scss` to lint SCSS files
- Run `npm run format:js` to format JavaScript/Vue files
- Run `npm run format:md` to format Markdown files
- Run `npm run format:scss` to format SCSS files
- Run `npm test` to run unit tests

### CORS-Proxy

You can use the [`corsProxy.js`](scripts/corsProxy.js) script to use your production
instance of OwnTracks for development without making changes to its CORS-Headers:

```console
$ yarn cors-proxy
$ npm run cors-proxy
```

If you have [basic authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#Basic_authentication_scheme)
Expand All @@ -127,7 +127,7 @@ OT_BASIC_AUTH_PASSWORD='P@$$w0rd'
Then run:

```console
$ env $(cat .env | xargs) yarn cors-proxy
$ env $(cat .env | xargs) npm run cors-proxy
```

The default host and port it binds to is `0.0.0.0:8888`. Change using the `OT_PROXY_HOST`
Expand All @@ -141,7 +141,7 @@ This project uses [Vue I18n](https://kazupon.github.io/vue-i18n/). To see missin
unused i18n entries, run:

```console
$ yarn i18n:report
$ npm run i18n:report
```

To add a new locale, copy `en-US.json` to `<locale>.json` in [`src/locales`](src/locales)
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:20 as build
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn install
COPY package.json package-lock.json ./
RUN npm install
COPY . ./
RUN yarn build
RUN npm run build

FROM nginx:1.25-alpine
LABEL version="2.12.0"
Expand Down
Loading

0 comments on commit c569ace

Please sign in to comment.