From 04f19f5a28ba90cca4adeb8125ef19cb7a258c94 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Tue, 3 Nov 2020 17:26:32 +0100 Subject: [PATCH] Fix yarn dev script --- package.json | 6 +++--- src/main.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index fd6dc27..501e8f2 100644 --- a/package.json +++ b/package.json @@ -5,15 +5,15 @@ "repository": "https://gitlab.com/ArisuOngaku/wms-boilerplate", "author": "Alice Gaudon ", "private": true, - "main": "dist/main.js", + "main": "dist/src/main.js", "scripts": { "dist-webpack": "webpack --mode production", "clean": "(test ! -d dist || rm -r dist)", - "compile": "yarn clean && tsc && mv dist/src/* dist/", + "compile": "yarn clean && tsc", "build": "yarn compile && yarn dist-webpack", "lint": "eslint . --ext .js,.jsx,.ts,.tsx", "dev": "concurrently -k -n \"Typescript,Node,Webpack,Maildev\" -p \"[{name}]\" -c \"blue,green,red,yellow\" \"tsc --watch\" \"nodemon\" \"webpack --watch --mode development\" \"maildev\"", - "start": "yarn build && node dist/main.js", + "start": "yarn build && node dist/src/main.js", "test": "jest --verbose --runInBand" }, "devDependencies": { diff --git a/src/main.ts b/src/main.ts index e243999..14be157 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,9 +2,9 @@ import {delimiter} from "path"; // Load config from specified path or default + wms-core/config (default defaults) process.env['NODE_CONFIG_DIR'] = - __dirname + '/../node_modules/wms-core/config/' + __dirname + '/../../node_modules/wms-core/config/' + delimiter - + (process.env['NODE_CONFIG_DIR'] || __dirname + '/../config/'); + + (process.env['NODE_CONFIG_DIR'] || __dirname + '/../../config/'); import {log} from "wms-core/Logger"; import App from "./App";