-
Install Node.js
- on OSX use homebrew
brew install node
- on Windows use chocolatey
choco install nodejs
- on OSX use homebrew
-
Install these NPM packages globally
npm install -g webpack typescript typings karma
- Navigate to your project folder to install all dependencies
npm install
npm start
npm run docs
npm test
npm run build
You can pass configurations to the app like this:
npm start --env prod
This can be passed to start
and build
command.
projectRoot/
|
+-- config/ (configurations)
+-- dist/ (minified app version will placed by gulp here with the task 'gulp dist')
+-- docs/ (has the generated docs from typedoc)
|
+-- src/
| |
| +-- app/
| | |
| | + components/
| | + models/
| | + services/
| | + utils/
| | + modules/
| | | |
| | | + <moduleName>/
| | | |
| | | + components/
| | | | |
| | | | + <componentName>.ts
| | | | + <componentName>.html
| | | |
| | | + filters/
| | | | |
| | | | + <filterName>.filter.js
| | | |
| | | + services/
| | | |
| | | + <serviceName>.service.js
| | |
| | + app.config.ts (represents the project configuration)
| | + <appName>.ts (the app component)
| | + <appName>.html (the app view)
| | + <appName>.scss (the app styles)
| |
| +-- assets/
| | |
| | +-- fonts/
| | +-- i18n/
| | +-- images/
| |
| +-- index.html ("MAIN" - This is the start page of your single-page-application and has some gulp vars)
| +-- boot.ts
| +-- vendor.ts
+-- typings-custom/ (custom type definition)