Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
3dd1862e
Commit
3dd1862e
authored
6 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
OSB-6
: added target install to cmake file
parent
f93b0ad3
No related branches found
No related tags found
2 merge requests
!89
Monitoring maintenance Epic branch merge
,
!1
Resolve OSB-13 "Monitoringmaintenance "
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMake/NPMInstall.cmake
+29
-12
29 additions, 12 deletions
CMake/NPMInstall.cmake
LCU/Maintenance/WebView/maintenancedb_view/src/themes/lofar.scss
+3
-3
3 additions, 3 deletions
...ntenance/WebView/maintenancedb_view/src/themes/lofar.scss
with
32 additions
and
15 deletions
CMake/NPMInstall.cmake
+
29
−
12
View file @
3dd1862e
...
...
@@ -58,44 +58,61 @@ function(npm_install NPM_PACKAGE_SPECIFICATION)
get_filename_component
(
JSON_PACKAGE_SPECIFICATION
"
${
NPM_PACKAGE_SPECIFICATION
}
"
REALPATH
)
# Checks if the directories public and source are actually present in the disk
if
(
WEBSITE_PUBLIC_DIR
MATCHES
"^$"
)
if
(
EXISTS
WEBSITE_PUBLIC_DIR
)
message
(
FATAL_ERROR
"public directory
\"
${
NPM_INSTALL_PUBLIC
}
\"
cannot be found."
)
endif
(
WEBSITE_PUBLIC_DIR
MATCHES
"^$"
)
endif
(
EXISTS
WEBSITE_PUBLIC_DIR
)
if
(
WEBSITE_SOURCE_DIR
MATCHES
"^$"
)
message
(
FATAL_ERROR
"source directory
\"
${
NPM_INSTALL_
PUBLIC
}
\"
cannot be found."
)
endif
(
WEBSITE_SOURCE_DIR
MATCHES
"^$"
)
if
(
EXISTS
WEBSITE_SOURCE_DIR
)
message
(
FATAL_ERROR
"source directory
\"
${
NPM_INSTALL_
SOURCE
}
\"
cannot be found."
)
endif
(
EXISTS
WEBSITE_SOURCE_DIR
)
get_filename_component
(
NPM_BINARY_DIR
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
REALPATH
)
add_custom_target
(
copy_src_public ALL SOURCES 'public' 'src' COMMENT
"Copying src and public directory into build directory"
)
add_custom_target
(
download_npm_dependencies ALL SOURCES node_modules package-lock.json DEPENDS copy_src_public COMMENT
"Attempt downloading of required npm dependencies"
)
add_custom_target
(
copy_src_public ALL SOURCES
"public"
"src"
COMMENT
"Copying src and public directory into build directory"
)
add_custom_target
(
download_npm_dependencies ALL SOURCES
"node_modules"
"package-lock.json"
DEPENDS copy_src_public COMMENT
"Attempt downloading of required npm dependencies"
)
add_custom_target
(
packing_javascript_files ALL SOURCES build COMMENT
"Attempt packing of javascript files"
)
add_custom_target
(
start_development_server_
${
PACKAGE_NAME
}
SOURCES
"node_modules"
"package-lock.json"
COMMENT
"Start start_development_server for
${
PACKAGE_NAME
}
"
)
add_custom_command
(
OUTPUT
'
package.json
'
OUTPUT
"
package.json
"
COMMAND
${
CMAKE_COMMAND
}
-E copy_if_different
${
JSON_PACKAGE_SPECIFICATION
}
${
NPM_BINARY_DIR
}
/package.json
COMMENT
"Copying package.json"
)
add_custom_command
(
OUTPUT
'
src
'
OUTPUT
"
src
"
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
WEBSITE_SOURCE_DIR
}
${
NPM_BINARY_DIR
}
/src
COMMENT
"Copying javascript src directory"
)
add_custom_command
(
OUTPUT
'
public
'
OUTPUT
"
public
"
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
WEBSITE_PUBLIC_DIR
}
${
NPM_BINARY_DIR
}
/public
COMMENT
"Copying public directory"
)
add_custom_command
(
OUTPUT node_modules
package-lock.json
OUTPUT
"
node_modules
"
"
package-lock.json
"
COMMAND npm install
DEPENDS
'
package.json
'
DEPENDS
"
package.json
"
WORKING_DIRECTORY
${
NPM_BINARY_DIR
}
COMMENT
"Downloading npm dependencies for
${
NPM_BINARY_DIR
}
/package.json"
)
add_custom_command
(
TARGET start_development_server_
${
PACKAGE_NAME
}
COMMAND npm start
WORKING_DIRECTORY
${
NPM_BINARY_DIR
}
COMMENT
"Starting development server"
)
add_custom_command
(
OUTPUT
"build"
COMMAND npm run build
DEPENDS copy_src_public download_npm_dependencies
COMMENT
"Packing javascript files for deploy"
)
message
(
${
NPM_INSTALL_DESTINATION
}
)
install
(
DIRECTORY
${
NPM_BINARY_DIR
}
/build/ DESTINATION
${
NPM_INSTALL_DESTINATION
}
)
endfunction
(
npm_install
)
This diff is collapsed.
Click to expand it.
LCU/Maintenance/WebView/maintenancedb_view/src/themes/lofar.scss
+
3
−
3
View file @
3dd1862e
@import
"lofar-variables"
;
@import
"node_modules/bootstrap/scss/bootstrap"
;
@import
"lofar-styles"
;
@import
"lofar-variables
.scss
"
;
@import
"node_modules/bootstrap/scss/bootstrap
.scss
"
;
@import
"lofar-styles
.scss
"
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment