Skip to content

bassjobsen/angular2-bootstrap4-website-builder

Repository files navigation

Angular 2 with Bootstrap 4 starting point

This repository holds the source code based on the angular.io quickstart. It is a potentially a good starting point for your Angular 2 application or website with Bootstrap 4 and ng-bootstrap.

Demo

Prerequisites

Node.js and npm are essential to Angular 2 development.

Get it now if it's not already installed on your machine.

Verify that you are running at least node v5.x.x and npm 3.x.x by running node -v and npm -v in a terminal/console window. Older versions produce errors.

We recommend nvm for managing multiple versions of node and npm.

Create a new project based on the Angular 2 Bootstrap 4 Website builder

Clone this repo into new project folder (e.g., my-proj).

git clone  https://github.com/bassjobsen/angular2-bootstrap4-website-builder  my-proj
cd my-proj

We have no intention of updating the source on bassjobsen/angular2-bootstrap4-website-builder. Discard everything "git-like" by deleting the .git folder.

rm -rf .git  // non-Windows
rd .git /S/Q // windows

Create a new git repo

You could start writing code now and throw it all away when you're done. If you'd rather preserve your work under source control, consider taking the following steps.

Initialize this project as a local git repo and make the first commit:

git init
git add .
git commit -m "Initial commit"

Create a remote repository for this project on the service of your choice.

Grab its address (e.g. https://github.com/<my-org>/my-proj.git) and push the local repo to the remote.

git remote add origin <repo-address>
git push -u origin master

Install npm packages

See npm and nvm version notes above

Install the npm packages described in the package.json and verify that it works:

Attention Windows Developers: You must run all of these commands in administrator mode.

npm install
npm start

If the typings folder doesn't show up after npm install please install them manually with:

npm run typings -- install

The npm start command first compiles the application, then simultaneously re-compiles and runs the lite-server. Both the compiler and the server watch for file changes.

Shut it down manually with Ctrl-C.

You're ready to write your application.

npm scripts

We've captured many of the most useful commands in npm scripts defined in the package.json:

  • npm start - runs the compilers and a server at the same time, both in "watch mode".
  • npm run tsc - runs the TypeScript compiler once.
  • npm run tsc:w - runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them.
  • npm run lite - runs the lite-server, a light-weight, static file server, written and maintained by John Papa and Christopher Martin with excellent support for Angular apps that use routing.
  • npm run typings - runs the typings tool.
  • npm run postinstall - called by npm automatically after it successfully completes package installation. This script installs the TypeScript definition files this app requires. Here are the test related scripts:
  • npm test - compiles, runs and watches the karma unit tests
  • npm run e2e - run protractor e2e tests, written in JavaScript (*e2e-spec.js)

The tool loads Bootstrap's SCSS code from the node_modules folder and compiles it with node-sass.

About

A potentially a good starting point for your Angular 2 application or website with Bootstrap 4 and ng-bootstrap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published