From 1b53744edbc9cb8c89f2a1dda7b6c2e62fb705e2 Mon Sep 17 00:00:00 2001 From: Mattia Mancini <mancini@astron.nl> Date: Wed, 3 Oct 2018 13:04:20 +0000 Subject: [PATCH] OSB-6: add example in the cmake documentation --- CMake/NPMInstall.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CMake/NPMInstall.cmake b/CMake/NPMInstall.cmake index 299709ecb19..0f597438f17 100644 --- a/CMake/NPMInstall.cmake +++ b/CMake/NPMInstall.cmake @@ -4,6 +4,20 @@ # public_dir is the directory where the static files are stored # source_dir is the directory where the javascript/css files are stored +## +## NPM/REACT Quickstart tutorial +## The tool create-react-app can be used to create a barebone react html/js project. +## This tool can be installed systemwide with npm executing the command '#npm install -g create-react-app'. +## Then, the barebone project setup can be created in the [project-directory] executing the command +## '$create-react-app [project-directory]' +## The script will create the [project-directory], if it doesnt exist, containing the public and src folder and default package.json file, +## it will download the basic dependencies and will start a git repository in the [project-directory]. +## However, the file/directories required are only the public and the src directory and the package.json file. +## PLEASE MAKE SURE TO COPY ONLY THOSE FILES/DIRECTORIES IN THE LOFAR SRC TREE! +## Finally, the cmake file for the project has to contains these two lines to make the LOFAR cmake setup build the project +## 'include(NPMInstall)' +## 'npm_install([package.json file] PUBLIC [public directory] SOURCE [source directory] DESTINATION [install destination folder])' + # Copyright (C) 2008-2009 # ASTRON (Netherlands Foundation for Research in Astronomy) # P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, softwaresupport@astron.nl -- GitLab