sportal3 v2.0.1
INSTRUCTIONS - ENGLISH VERSION
Project dependecies:
node, npm, gulp
All three packages should be installed only once for all projects!
- node and npm installation instructions: https://nodejs.org/en/download/package-manager/
verify installation with commands:
node -v (prefered version 8.XX.XX)
and
npm -v (prefered version 5.XX.XX)
- global gulp installation (UNIX-like systems require sudo) - after node (and npm) installation:
(sudo) npm install -g gulp (prefered version 3.XX.XX. Command for specific version is npm install -g gulp@X.XX)
* gulp installation UNIX-like systems require sudo) - after node (and npm) installation and global gulp installation:
(sudo) npm install gulp (prefered version 3.XX.XX. Command for specific version is npm install -g gulp@X.XX )
Installation
For all project dependant modules we use npm (node package manager)
You can install all required modules with command:
npm install
When you want to include new module in project for development purposes it's good to add --save-dev
on this command, and for application modules --save
. That's a good practice - not necessary.
Client build
For the first client build you should choose one of the predefined clients, to copy some of project needed files that are not included in project repository (color scheme, logo...). Evert other time command workd without [--override] option!!!
Client XXX
build command for development environment - app
:
gulp work:make ( --override XXX )
(Otherwise default environment is prepared, configured in app/app-config.js
file with possible changes in app/customize/develop/client-config.js
- which is not in repository and should be manually added if wanted!)
For distribution - dist
build of the same client we use similar command:
gulp dist:make --override XXX
Sass compiler
Whole css on the project is build through sass files, and every change manually made on css files will be wiped out, like there were none, so you should avoid this.
Command for compiler is:
gulp sass:watch
The same effect is achieved with starting node http-server
.
Npm http-server
- application start
For project application start we use http-server
. It is not necessary to start any other server to work on project. Start command is:
npm start ( -- --port [PORT_NO] )
where PORT_NO
is port number on which application is run, and default is 8080
. Double '--'
are needed by npm so it can figure out that gulp argument are ahead. Npm is only gulp task wrapper.
After that project is started on: http://localhost:8080/app/
, and localhost
can be switched with you local ip address if desired port is opened in your system firewall.
In the back this server starts sass compiler, javascript, http, and json watchers, so every error should be logged in console
Clients modifications
Every client is build with changes include in custom folder for that client. Default client is in app/customize/develop
folder, but if there is no one (it is not included in repository) you can create one. Otherwise global configuration is used. If you want to add new client all customizable files are stored in app/customize/XXX
folder (you can check other client folders to see list of needed files).
Folders
_maps_
folders should be ignored by human user - they store a .css.map
files created by sass compiler.
app/ --> all application files
assets/ --> files needed for look and feel
fonts/ --> fonts
customize/ --> current client modifications
img/ --> images
content/ --> all app pages
css/ --> default css files
sass/ --> the main sass files and functions
shared/ --> shared files by all sites
services/
directives/
controllers/
templates/
sites/ --> all sites content
siteXXX/ --> content for siteXXX
content/ --> all files that should be changed by human
styles/ --> css files - manual change will be wiped off on build
customize/ --> files and folders with all custom clients information
dist/ --> dist app structure for desired client (it is removed on client development preparation)
tmp/ --> temporary dist build files (removed after successful dist build)
5 years ago