Update files locations
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
* use npm instead of yarn * group frontend stuff * group backend stuff
This commit is contained in:
parent
ced691c230
commit
04c3c926ff
@ -10,9 +10,9 @@ steps:
|
||||
- name: frontend
|
||||
image: node:13.8.0
|
||||
commands:
|
||||
- npm install yarn
|
||||
- yarn install
|
||||
- yarn build
|
||||
- cd frontend
|
||||
- npm install
|
||||
- npm run-script build
|
||||
|
||||
- name: backend
|
||||
image: golang:1.14.0-alpine3.11
|
||||
|
@ -1,17 +1,10 @@
|
||||
## Install dependencies
|
||||
|
||||
### Install node
|
||||
### Install node and npm
|
||||
|
||||
You'll need node v6+, here's a link to install it:
|
||||
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
|
||||
|
||||
### Install yarn and dependencies
|
||||
|
||||
```
|
||||
sudo npm install -g yarn
|
||||
yarn install
|
||||
```
|
||||
|
||||
## Dev
|
||||
|
||||
#### Check your config.yml file
|
||||
|
@ -1,6 +1,6 @@
|
||||
root: .
|
||||
valid_ext: .go
|
||||
colors: 1
|
||||
build_name: dev-build
|
||||
build_log: dev-build.log
|
||||
tmp_path: ./build
|
||||
valid_ext: .go
|
||||
root: ./backend
|
||||
colors: 1
|
||||
tmp_path: ../build
|
@ -4,7 +4,7 @@ authorizer:
|
||||
cost: 10
|
||||
pgdsn: postgres://test:test@127.0.0.1:5432/dev?sslmode=disable
|
||||
listen_port: 3000
|
||||
public_dir: build/public
|
||||
public_dir: ../build/public
|
||||
# default prefix, will be served by the go http server
|
||||
img_url_prefix: img/
|
||||
periodic_refresh:
|
||||
|
7
dev.sh
7
dev.sh
@ -65,7 +65,7 @@ _migrate() {
|
||||
|
||||
_ensure_command jq
|
||||
_ensure_command go
|
||||
_ensure_command yarn
|
||||
_ensure_command npm
|
||||
|
||||
_check_command migrate || {
|
||||
_log_info "Installing migrate"
|
||||
@ -135,7 +135,7 @@ case $1 in
|
||||
# Apply the migrations
|
||||
_migrate -path "$MIGRATION_SCHEMA" up
|
||||
|
||||
CONFIG_FILE="./config.yml" fresh -c fresh.conf
|
||||
(cd backend && CONFIG_FILE="../config.yml" fresh -c fresh.conf)
|
||||
;;
|
||||
docker-db)
|
||||
_ensure_command docker
|
||||
@ -144,8 +144,7 @@ case $1 in
|
||||
docker-compose -f "$DOCKER_COMPOSE_FILE" "$@"
|
||||
;;
|
||||
front)
|
||||
yarn install
|
||||
yarn start
|
||||
(cd frontend && npm install && npm run-script start)
|
||||
;;
|
||||
db-init)
|
||||
_ensure_command jq
|
||||
|
@ -10,7 +10,7 @@ const protectedRoute = ({
|
||||
isActivated,
|
||||
isTokenSet,
|
||||
setUserToken,
|
||||
...otherProps,
|
||||
...otherProps
|
||||
}) => {
|
||||
const isAuthenticated = () => {
|
||||
if (isTokenSet) {
|
||||
|
13566
frontend/package-lock.json
generated
Normal file
13566
frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
"scripts": {
|
||||
"start": "NODE_ENV=development ./node_modules/webpack/bin/webpack.js -d --progress --colors --watch",
|
||||
"build": "NODE_ENV=production ./node_modules/webpack/bin/webpack.js -p --progress --colors",
|
||||
"lint": "./node_modules/eslint/bin/eslint.js frontend/."
|
||||
"lint": "./node_modules/eslint/bin/eslint.js ."
|
||||
},
|
||||
"dependencies": {
|
||||
"bootstrap": "^4.3.1",
|
@ -5,18 +5,18 @@ var HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
var { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
||||
|
||||
var mode = "development";
|
||||
var BUILD_DIR = path.resolve(__dirname, "build/public/");
|
||||
var BUILD_DIR = path.resolve(__dirname, "../build/public/");
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
mode = "production";
|
||||
BUILD_DIR = path.resolve(__dirname, "canapeapp/public/");
|
||||
BUILD_DIR = path.resolve(__dirname, "../canapeapp/public/");
|
||||
}
|
||||
|
||||
var SRC_DIR = path.resolve(__dirname, "frontend/js");
|
||||
var SRC_DIR = path.resolve(__dirname);
|
||||
|
||||
const config = {
|
||||
mode: mode,
|
||||
entry: path.join(SRC_DIR, "app.js"),
|
||||
entry: path.join(SRC_DIR, "js/app.js"),
|
||||
output: {
|
||||
path: BUILD_DIR,
|
||||
filename: "[contenthash]-app.js",
|
||||
@ -77,7 +77,7 @@ const config = {
|
||||
cleanOnceBeforeBuildPatterns: ["**/*", "!img/**/*", "!img"],
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: path.join(SRC_DIR, "../index.html"),
|
||||
template: path.join(SRC_DIR, "index.html"),
|
||||
}),
|
||||
new WebpackPwaManifest({
|
||||
fingerprints: true,
|
||||
@ -96,11 +96,11 @@ const config = {
|
||||
start_url: "/",
|
||||
icons: [
|
||||
{
|
||||
src: path.resolve(__dirname, "frontend/img/android-chrome-512x512.png"),
|
||||
src: path.resolve(__dirname, "img/android-chrome-512x512.png"),
|
||||
sizes: [96, 128, 192, 256, 384, 512],
|
||||
},
|
||||
{
|
||||
src: path.resolve(__dirname, "frontend/img/apple-touch-icon.png"),
|
||||
src: path.resolve(__dirname, "img/apple-touch-icon.png"),
|
||||
sizes: [80, 120, 152, 167, 180],
|
||||
ios: true
|
||||
},
|
Loading…
x
Reference in New Issue
Block a user