From 0151f6c488263b977196e95c5bfcada84f134594 Mon Sep 17 00:00:00 2001 From: Vasil Sokolov Date: Fri, 27 Oct 2023 19:21:08 +0200 Subject: [PATCH] Configured vue cli builder --- .env.dist | 1 + .gitignore | 1 + README.md | 20 ++++++++++++++++++-- package.json | 1 + vue.config.js | 3 +++ 5 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .env.dist create mode 100644 vue.config.js diff --git a/.env.dist b/.env.dist new file mode 100644 index 0000000..4dd60bc --- /dev/null +++ b/.env.dist @@ -0,0 +1 @@ +VUE_APP_API_HOST=API_LOCAL_HOST \ No newline at end of file diff --git a/.gitignore b/.gitignore index 316686c..00d4863 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /*.zip .vscode/ .php-cs-fixer.cache +.env diff --git a/README.md b/README.md index c7b6f51..54a2410 100644 --- a/README.md +++ b/README.md @@ -72,9 +72,25 @@ git clone https://github.com/afterlogic/webmail-pro-8.git INSTALL_FOLDER_PATH ./builder.sh -t build ``` -5. Now you are ready to open a URL pointing to the installation directory in your favorite web browser. Be sure to add `/adminpanel/` to main URL to access admin interface. +5. In case you want to use the product in development mode and work with JS, you need to run webpack dev server. But before that rename .env.dist to .env and specify the Web API host. For example, `http://localhost/aurora/`. +Please note that if the backend responds on a domain other than localhost, you will have to specify custom headers in the index.php file to avoid CORS blocking cross-domain requests. -6. Upon installing the product, you'll need to [configure your installation](https://afterlogic.com/docs/webmail-pro/configuring-webmail). +Now you can run webpack dev server: +``` +npm run serve +``` + +This will compile JS script files. If you need to work with CSS, you need to run the following command: + +``` +npm run styles:watch --themes=Default,DefaultDark,DeepForest,Funny,Sand +``` + +You can modify the themes list and specify the themes you are currently working with. + +6. Now you are ready to open a URL pointing to the installation directory in your favorite web browser. Be sure to add `/adminpanel/` to main URL to access admin interface. + +7. Upon installing the product, you'll need to [configure your installation](https://afterlogic.com/docs/webmail-pro/configuring-webmail). **IMPORTANT:** diff --git a/package.json b/package.json index 72dfaee..56085bd 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "license": "AGPL-3.0", "scripts": { + "serve": "vue-cli-service serve", "js:build": "node -e \"require('./modules/CoreWebclient/gulp-tasks/javascript.js').default.build()\"", "js:min": "node -e \"require('./modules/CoreWebclient/gulp-tasks/javascript.js').default.min()\"", "js:watch": "node -e \"require('./modules/CoreWebclient/gulp-tasks/javascript.js').default.watch()\"", diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..e3a6431 --- /dev/null +++ b/vue.config.js @@ -0,0 +1,3 @@ +const config = require('./modules/CoreWebclient/gulp-tasks/vue.config.js') + +module.exports = config