digitaltourism-bo

1.0.0 • Public • Published

DigitalTourism - Back-Office Angular application

This is a README about the Angular2 Application "DigitalTourism - Back-Office".

It helps to install and update the application, provides helpful command lines, and discusses about Angular2 updates and choices.

Please, feel free to add any remarks, hints and tips about the application.

Main tools and modules

Only npm is scheduled to be used. Other package manager (e.g bower) are still not officially supported by Angular2 Beta and npm seems to be sufficient for now.

This application use the following tools:

  • TSC : TypeScript Compiler.
  • Gulp : Task scheduler / runner. It helps automating the build process, prepares and generates static files to run the application.
  • TSLint : TypeScript linter, parsing and analyzing .ts code. A standard tslint.json has been made but may be improved later.
  • Typings : The registry of type definitions for TypeScript. Helps to integrate 3-rd party node modules within TS.
  • SystemJS : Dynamic module loader for JS. (the choice with CommonJS has not been discussed)
  • TODO : Configure a lite server for development environment (e.g gulp-live-server)
  • TODO : Use module bundler to load JS library in a better way (e.g WebPack)

Development Environment

First, ensure that node.js and npm are installed and up-to-date:

> node -v
v5.5.0
> npm -v
3.6.0

Once located in ./src/ project's directory, run:

> npm install
> npm install --only=dev # For dev. only

To update all modules locally installed by npm for the project:

> npm update

To update all modules globally installed by npm (in case you had already a npm environment):

> npm update -g

Install DefinitelyTyped elements, helping to use 3rd party libraries with TypeScript. Run the typings tool (new version of tsd):

> typings install

It should create a src/typings/ directory, containing browser.d.ts file.

Use Gulp commands to compile .ts files and run a static server:

> gulp
[16:30:56] Starting 'clean'...
[16:30:56] Finished 'clean' after 34 ms
[16:30:56] Starting 'tslint'...
[16:30:56] Starting 'compile'...
[16:30:56] Starting 'copy:assets'...
[16:30:56] Starting 'copy:libs'...

Then, for continuous integration during development phase, run:

> gulp watch

Configure your Apache server and serve the directory src/dist/ ! Example:

<VirtualHost *>
    DocumentRoot "/path/to/back-office/src/dist"
    ServerName digitaltourism-bo.local #fit to your domain

    <Directory "/path/to/back-office/src/dist">
      Order allow,deny
      Allow from all
      Options +FollowSymLinks +ExecCGI
      RewriteEngine On
      AllowOverride All
    </Directory>
</VirtualHost>

Open your specified domain in your browser and Tadam !

Readme

Keywords

none

Package Sidebar

Install

npm i digitaltourism-bo

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • sizrar