feat: Add start, start:dev and start:server-dev scripts for easy dev ️.

This commit is contained in:
Gervwyk 2022-01-21 18:25:25 +02:00
parent 1ef213b19d
commit da813c3d13
3 changed files with 5 additions and 3 deletions

View File

@ -37,6 +37,9 @@
"lerna:publish": "lerna publish from-git",
"postversion": "yarn install",
"prettier": "prettier --config .prettierrc --write **/*.js",
"start:server-dev": "yarn workspace @lowdefy/server-dev start --package-manager yarn --config-directory ../../app",
"start": "yarn workspace @lowdefy/server build:lowdefy --config-directory ../../app && yarn workspace @lowdefy/server build:next && yarn workspace @lowdefy/server start",
"start:dev": "yarn workspace @lowdefy/server build:lowdefy --config-directory ../../app && yarn workspace @lowdefy/server dev",
"test": "lerna run test",
"test:ci": "yarn install --immutable --immutable-cache --check-cache && yarn build && yarn test --ignore='@lowdefy/format' --ignore='@lowdefy/block-dev'"
},

View File

@ -25,7 +25,7 @@ async function configWatcher(context) {
.some((filePath) => filePath.includes('lowdefy.yaml') || filePath.includes('lowdefy.yml'));
if (lowdefyYamlModified) {
const lowdefyVersion = await getLowdefyVersion(context);
if (lowdefyVersion !== context.version) {
if (lowdefyVersion !== context.version || lowdefyVersion === 'local') {
console.warn('Lowdefy version changed. You should restart your development server.');
process.exit();
}

View File

@ -34,8 +34,7 @@
"scripts": {
"build:lowdefy": "lowdefy-build",
"build:next": "next build",
"dev": "yarn build:lowdefy && yarn && next dev",
"dev:prod": "yarn build:lowdefy && yarn && yarn build:next && next start",
"dev": "next dev",
"start": "next start",
"lint": "next lint",
"next": "next"