Having a startup project based on Angular 2 supporting jQuery (for stuff Angular 2 is missing), Bootstrap 3 or Bootstrap 4, ng2-bootstrap and Font Awesome in case using bootstrap 4. Bootstrap 3 uses Glyphicons.
The script creates an app directory inside /var/www if it's not created. It will also install a virtual host into the /etc/apache2 directory if the app.conf is not found. It will add the projectname to the /etc/hosts file. It will start download all required files needed for the angular 2 project inside '/var/www/app/[project-name(string)]/'. It will default install bootstrap 4.
Make sure before executing the command below that /var/www is writable.
The command will download two shell scripts and execute them.
- Replace [project-name(string)] below with the project name.
Open a terminal and execute:
wget https://raw.githubusercontent.com/ssglopes/angular2-project-starter/master/install.sh -P /var/www/ && chmod +x /var/www/install.sh && /var/www/install.sh [project-name(string)]
After execution has finished open a browser and go to either:
For development against webpack server: http://localhost:8080/
For transpiled site: http://www.[project-name(string)].app
To switch between bootstrap versions for the created project, executed: bootstrap.sh [bootstrap-version(int)]. Only some files will be modified and unneeded packages will be removed followed by downloading newly required packages from npm.
wget https://raw.githubusercontent.com/ssglopes/angular2-project-starter/master/bootstrap.sh -P /var/www/app/[project-name(string)]/source/[sub-folder(string)]/ && chmod +x /var/www/app/[project-name(string)]/source/[sub-folder(string)]/bootstrap.sh && /var/www/app/[project-name(string)]/source/[sub-folder(string)]/bootstrap.sh [bootstrap-version(int)]
- angular 2: https://github.com/angular/angular
- angular2-webpack: https://github.com/preboot/angular2-webpack
- ng2-bootstrap: https://github.com/valor-software/ng2-bootstrap
- bootstrap 3: https://github.com/twbs/bootstrap
- bootstrap 4: https://github.com/twbs/bootstrap/tree/v4-dev
- Fontawesome: https://github.com/FortAwesome/Font-Awesome
- jQuery: https://github.com/jquery/jquery
- And all others not mentioned here.