Skip to content

ssglopes/angular2-project-starter

Repository files navigation

angular2-project-starter

Goal

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.

What does the script?

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.

Installation

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

Toggle between bootstrap 3 and 4

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)]

Credits

License

MIT