diff --git a/CMakeLists.txt b/CMakeLists.txt index 999957c39d..56a5ba1576 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -872,7 +872,7 @@ include_directories( ) ################################################################################ -## PATHS, installation, packages +## PATHS, installation, packages, frontend ################################################################################ if (MSVC) @@ -882,6 +882,7 @@ if (MSVC) endif() include(ArangoDBInstall) +include(frontend/aardvark) if (NOT(SKIP_PACKAGING)) include(packages/packages) endif() diff --git a/README_maintainers.md b/README_maintainers.md index dde33fd2d7..eaa3f42130 100644 --- a/README_maintainers.md +++ b/README_maintainers.md @@ -911,33 +911,9 @@ Then adjust the docker images in the config (`arangodb3.json`) and redeploy it u Front-End (WebUI) ========= -To see the changes of possible modifications in javascript files, templates -and scss files please use grunt to generate the bundled version. - -To install grunt (with all related dependencies), just go to the frontend app -folder (/js/apps/system/_admin/aardvark/APP) and run: - -`npm install` - -On Mac OS you also have to install grunt-cli: - -`(sudo) npm install -g grunt-cli` - -Then you can choose between three choices: - -1. Build all arangodb related files: - - * `grunt` - -2. Build all arangodb related files, including libraries. This should always -be used when we offer a new major release of arangodb. - - * `grunt deploy` - -3. Live build arangodb related files, when a file has been changed. This task -does not include the minifying process. - - * `grunt watch` +To build the current frontend build please use the command: `make frontend`. +The command `make frontend_clean` will remove all available node modules and +start a clean installation. -------------------------------------------------------------------------------- NPM dependencies diff --git a/cmake/frontend/aardvark.cmake b/cmake/frontend/aardvark.cmake new file mode 100644 index 0000000000..ec61a9cccb --- /dev/null +++ b/cmake/frontend/aardvark.cmake @@ -0,0 +1,16 @@ + +################################################################################ +## frontend build +################################################################################ +add_custom_target(frontend + COMMENT "create frontend build" + COMMAND npm i --prefix ${PROJECT_SOURCE_DIR}/js/apps/system/_admin/aardvark/APP + COMMAND npm install --prefix ${PROJECT_SOURCE_DIR}/js/apps/system/_admin/aardvark/APP grunt + COMMAND ${PROJECT_SOURCE_DIR}/js/apps/system/_admin/aardvark/APP/node_modules/grunt/bin/grunt --gruntfile ${PROJECT_SOURCE_DIR}/js/apps/system/_admin/aardvark/APP/GruntFile.js deploy + ) + +add_custom_target(frontend_clean + COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/js/apps/system/_admin/aardvark/APP/node_modules + COMMENT "Removing frontend node modules" + ) + diff --git a/js/apps/system/_admin/aardvark/APP/package.json b/js/apps/system/_admin/aardvark/APP/package.json index 59757d4b85..602d22fc3e 100644 --- a/js/apps/system/_admin/aardvark/APP/package.json +++ b/js/apps/system/_admin/aardvark/APP/package.json @@ -12,7 +12,7 @@ "eslint-config-standard": "^6.2.1", "eslint-plugin-promise": "^3.3.2", "eslint-plugin-standard": "^2.0.1", - "grunt": "*", + "grunt": "^1.0.1", "grunt-babel": "*", "grunt-concat-in-order": "*", "grunt-concurrent": "*", @@ -26,18 +26,11 @@ "grunt-contrib-uglify": "*", "grunt-contrib-watch": "*", "grunt-eslint": "^19.0.0", - "grunt-karma": "*", "grunt-processhtml": "*", "grunt-sass": "*", "grunt-text-replace": "*", - "jasmine-core": "*", - "karma": "*", - "karma-coverage": "*", - "karma-jasmine": "*", - "karma-phantomjs-launcher": "*", "load-grunt-tasks": "*", "matchdep": "*", - "phantomjs-prebuilt": "*", "sass": "*" }, "repository": { @@ -45,7 +38,6 @@ "url": "git://github.com/arangodb/arangodb.git" }, "dependencies": { - "grunt": "^1.0.1", "grunt-babel": "^6.0.0", "grunt-concat-in-order": "^0.2.6", "grunt-contrib-compress": "^1.3.0", @@ -57,13 +49,8 @@ "grunt-contrib-sass": "^1.0.0", "grunt-contrib-uglify": "^1.0.1", "grunt-contrib-watch": "^1.0.0", - "grunt-karma": "^2.0.0", "grunt-processhtml": "^0.4.0", "grunt-sass": "^1.2.0", - "karma": "^0.13.22", - "karma-coverage": "^1.0.0", - "karma-jasmine": "^1.0.2", - "karma-phantomjs-launcher": "^1.0.0", "matchdep": "^1.0.1" } }