mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-22 08:54:33 +03:00
Replaced yarn by npm
This commit is contained in:
parent
92d5b2eb3e
commit
372d3f17cc
9 changed files with 17508 additions and 10696 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
@ -7,14 +7,7 @@
|
|||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
docker-compose.override.yml
|
||||
home
|
||||
|
|
11
.travis.yml
11
.travis.yml
|
@ -4,7 +4,6 @@ node_js:
|
|||
- "10.15.3"
|
||||
|
||||
cache:
|
||||
yarn: true
|
||||
directories:
|
||||
- node_modules
|
||||
|
||||
|
@ -12,19 +11,19 @@ services:
|
|||
- docker
|
||||
|
||||
install:
|
||||
- yarn install
|
||||
- npm ci
|
||||
|
||||
script:
|
||||
- yarn lint
|
||||
- yarn test:ci
|
||||
- npm run lint
|
||||
- npm run test:ci
|
||||
- if [[ -z $TRAVIS_TAG ]]; then docker build -t shlink-web-client:test . ; fi # Test docker image build only when no tag is present
|
||||
|
||||
after_success:
|
||||
- yarn ocular coverage/clover.xml
|
||||
- node_modules/.bin/ocular coverage/clover.xml
|
||||
|
||||
# Before deploying, build dist file for current travis tag
|
||||
before_deploy:
|
||||
- yarn build ${TRAVIS_TAG#?}
|
||||
- npm run build ${TRAVIS_TAG#?}
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FROM node:10.15.3-alpine as node
|
||||
COPY . /shlink-web-client
|
||||
RUN cd /shlink-web-client && yarn install && yarn build
|
||||
RUN cd /shlink-web-client && npm install && npm run build
|
||||
|
||||
FROM nginx:1.15.9-alpine
|
||||
LABEL maintainer="Alejandro Celaya <alejandro@alejandrocelaya.com>"
|
||||
|
|
|
@ -38,14 +38,13 @@ Official distributable files have been build so that they are served from the ro
|
|||
|
||||
If you need to host shlink-web-client yourself and serve it from a subpath, follow these steps:
|
||||
|
||||
* Download [node](https://nodejs.org/en/download/package-manager/) 10.4 or later (if you don't have it yet).
|
||||
* Download [yarn](https://yarnpkg.com/en/docs/install) package manager.
|
||||
* Download [node](https://nodejs.org/en/download/package-manager/) 10.15 or later (if you don't have it yet).
|
||||
* Download shlink-web-client source files for the version you want to build.
|
||||
* For example, if you want to build `v1.0.1`, use this link https://github.com/shlinkio/shlink-web-client/archive/v1.0.1.zip
|
||||
* Replace the `v1.0.1` part in the link with the one of the version you want to build.
|
||||
* Decompress the file and `cd` into the resulting folder.
|
||||
* Install project dependencies by running `yarn install`.
|
||||
* Install project dependencies by running `npm install`.
|
||||
* Open the `package.json` file in the root of the project, locate the `homepage` property and replace the value (which should be an empty string) by the path from which you want to serve shlink-web-client.
|
||||
* For example: `"homepage": "/my-projects/shlink-web-client",`.
|
||||
* Build the distributable contents by running `yarn build`.
|
||||
* Build the distributable contents by running `npm run build`.
|
||||
* Once the command finishes, you will have a `build` folder with all the static assets you need to run shlink-web-client. Just place them wherever you want them to be served from.
|
||||
|
|
|
@ -6,3 +6,4 @@ services:
|
|||
volumes:
|
||||
- /etc/passwd:/etc/passwd:ro
|
||||
- /etc/group:/etc/group:ro
|
||||
- ./home:/home/alejandro
|
||||
|
|
|
@ -3,8 +3,8 @@ version: '3'
|
|||
services:
|
||||
shlink_web_client_node:
|
||||
container_name: shlink_web_client_node
|
||||
image: node:10.15.0-alpine
|
||||
command: /bin/sh -c "cd /home/shlink/www && yarn install && yarn start"
|
||||
image: node:10.15.3-alpine
|
||||
command: /bin/sh -c "cd /home/shlink/www && npm install && npm run start"
|
||||
volumes:
|
||||
- ./:/home/shlink/www
|
||||
ports:
|
||||
|
|
17488
package-lock.json
generated
Normal file
17488
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
14
package.json
14
package.json
|
@ -3,19 +3,19 @@
|
|||
"description": "A React-based progressive web application for shlink",
|
||||
"version": "1.0.0",
|
||||
"private": false,
|
||||
"homepage": "",
|
||||
"homepage": "https://shlink.io",
|
||||
"scripts": {
|
||||
"lint": "yarn lint:js && yarn lint:css",
|
||||
"lint": "npm run lint:js && npm run lint:css",
|
||||
"lint:js": "eslint src test scripts config",
|
||||
"lint:js:fix": "yarn lint:js --fix",
|
||||
"lint:js:fix": "npm run lint:js -- --fix",
|
||||
"lint:css": "stylelint src/*.scss src/**/*.scss",
|
||||
"lint:css:fix": "yarn lint:css --fix",
|
||||
"lint:css:fix": "npm run lint:css -- --fix",
|
||||
"start": "node scripts/start.js",
|
||||
"serve:build": "yarn serve ./build",
|
||||
"serve:build": "serve ./build",
|
||||
"build": "node scripts/build.js",
|
||||
"test": "node scripts/test.js --env=jsdom --colors",
|
||||
"test:ci": "yarn test --coverage --coverageReporters=text --coverageReporters=text-summary --coverageReporters=clover",
|
||||
"test:pretty": "yarn test --coverage --coverageReporters=text --coverageReporters=text-summary --coverageReporters=html"
|
||||
"test:ci": "npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary --coverageReporters=clover",
|
||||
"test:pretty": "npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary --coverageReporters=html"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.6.3",
|
||||
|
|
Loading…
Reference in a new issue