Skip to content

Commit 045c4ea

Browse files
committed
⚡️ Release the seed
0 parents  commit 045c4ea

15 files changed

+3724
-0
lines changed

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
9+
# Change these settings to your own preference
10+
indent_style = space
11+
indent_size = 2
12+
13+
# We recommend you to keep these unchanged
14+
end_of_line = lf
15+
charset = utf-8
16+
trim_trailing_whitespace = true
17+
insert_final_newline = true
18+
19+
[*.md]
20+
trim_trailing_whitespace = false

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Project
2+
.idea
3+
4+
# Node
5+
node_modules
6+
7+
# macOS
8+
.DS_Store
9+
.AppleDouble
10+
.LSOverride
11+
Icon
12+
._*
13+
.Spotlight-V100
14+
.Trashes
15+
16+
## Windows
17+
Thumbs.db
18+
ehthumbs.db
19+
Desktop.ini
20+
$RECYCLE.BIN/
21+
22+
# Package Managers
23+
yarn-error.log
24+
npm-debug.log
25+
26+
# Cache
27+
.awcache

README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<a href="https://ultimateangular.com" target="_blank"><img src="https://toddmotto.com/img/ua.png"></a>
2+
3+
# Angular Fundamentals Seed
4+
5+
> This is the seed project for the [Angular Fundamentals](https://ultimateangular.com/courses/#angular-2) course by [Todd Motto](https://twitter.com/toddmotto).
6+
7+
## Project Setup and Tooling
8+
9+
### Tools
10+
11+
This course is recorded with the following tools, you can optionally follow along using the same, or your favourite text editor/IDE and browser.
12+
13+
*Text editor*: Visual Studio Code, you can [download it here](http://code.visualstudio.com) for both Mac, Windows and Linux.
14+
*Browser*: Google Chrome, you can [download it here](https://www.google.com/chrome)
15+
16+
### Prerequisites
17+
18+
Please make sure that you have the following installed:
19+
20+
* Install the _latest version_ of [Node.js](http://nodejs.org) (Mac or Windows)
21+
* Mac users can optionally `brew install node` if they have [brew](http://brew.sh) installed
22+
23+
* Node Sass, you _may_ need it if you haven't already got it installed:
24+
25+
```bash
26+
npm install -g node-sass
27+
```
28+
29+
### Project Install
30+
31+
To grab the seed project, either Fork this repo or [click here to download](https://github.com/UltimateAngular/angular-fundamentals-seed/archive/master.zip) the `.zip` folder and extract the files wherever you like on your machine.
32+
33+
#### Step 1: Package Manager
34+
35+
To install the project dependencies, you will need to install `yarn`. To install `yarn`, run the following in your terminal:
36+
37+
```bash
38+
npm install -g yarn
39+
```
40+
41+
Mac users can alternatively use `brew` to install `yarn`.
42+
43+
```bash
44+
brew update
45+
brew install yarn
46+
```
47+
48+
If you experience any issues when installing/using `yarn` you can checkout the installation instructions [here](https://yarnpkg.com/en/docs/install).
49+
50+
##### Step 2: Project Dependencies
51+
52+
Now that we have a package manager, we can install the project dependencies. You can do this by running:
53+
54+
```bash
55+
yarn install
56+
```
57+
58+
This will install our dependencies for running our Angular application.
59+
60+
#### Step 3: Running the project
61+
62+
During development, the project is built using `webpack-dev-server`. This provides a local development server as well as having webpack recompile our app when a file changes. The project will also automatically refresh the page whenever we make changes.
63+
64+
To start the project in development, run:
65+
66+
```
67+
yarn start
68+
```
69+
70+
This will output some information about the project (such as the TypeScript version and build progress). Once you see "build completed", you are ready to code!
71+
72+
Open your browser to [localhost:4000](http://localhost:4000) to start running the code.
73+
74+
### Project Tooling
75+
76+
The project uses `webpack` to build and compile all of our assets. This will do the following for us:
77+
78+
- Compile all our TypeScript code into JavaScript (starting from `main.ts` and branching outwards from imported files)
79+
- Bundle all our JavaScript into one file to use
80+
- Allow us to use SASS for our component's CSS files
81+
- Provide the polyfills needed to run our app in all modern browsers
82+
- Mock a JSON backend using [json-server](https://github.com/typicode/json-server)

app/app.component.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.app {
2+
3+
}

app/app.component.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-root',
5+
styleUrls: ['app.component.scss'],
6+
template: `
7+
<div class="app">
8+
Hello!
9+
</div>
10+
`
11+
})
12+
export class AppComponent {
13+
14+
}

app/app.module.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { NgModule } from '@angular/core';
2+
import { BrowserModule } from '@angular/platform-browser';
3+
import { CommonModule } from '@angular/common';
4+
5+
import { AppComponent } from './app.component';
6+
7+
@NgModule({
8+
imports: [
9+
BrowserModule,
10+
CommonModule
11+
],
12+
bootstrap: [
13+
AppComponent
14+
],
15+
declarations: [
16+
AppComponent
17+
]
18+
})
19+
export class AppModule {}

css/app.css

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
* {
2+
box-sizing: border-box;
3+
-webkit-box-sizing: border-box;
4+
-moz-box-sizing: border-box;
5+
font: 300 15px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
6+
}
7+
8+
html, body {
9+
height: 100%;
10+
margin: 0;
11+
padding: 0;
12+
background: #fff;
13+
-webkit-font-smoothing: antialiased;
14+
color: #545e6f;
15+
}
16+
17+
img {
18+
vertical-align: bottom;
19+
}
20+
img a {
21+
border: 0;
22+
}
23+
ul,
24+
ol {
25+
list-style: none;
26+
margin: 0;
27+
padding: 0;
28+
}
29+
a {
30+
color: #9f72e6;
31+
text-decoration: none;
32+
}
33+
input,
34+
button {
35+
outline: 0;
36+
}
37+
input {
38+
border: none;
39+
background: #fff;
40+
font-size: 13px;
41+
padding: 6px 30px 6px 10px;
42+
border-radius: 1px;
43+
box-shadow: 1px 1px 3px 1px #ccc;
44+
border: 1px solid #eee;
45+
}
46+
button {
47+
cursor: pointer;
48+
background: #9f72e6;
49+
border: 0;
50+
border-radius: 2px;
51+
padding: 5px 10px;
52+
text-align: center;
53+
color: #fff;
54+
}
55+
p {
56+
margin: 5px 0;
57+
}
58+
59+
body {
60+
padding: 50px;
61+
}
62+
63+
h3 {
64+
font-size: 22px;
65+
font-weight: 400;
66+
margin: 0;
67+
}
68+
h4 {
69+
font-size: 18px;
70+
font-weight: 300;
71+
margin: 0;
72+
}

db.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<base href="/">
5+
<title>Ultimate Angular</title>
6+
<link rel="stylesheet" href="/css/app.css">
7+
</head>
8+
<body>
9+
<app-root></app-root>
10+
11+
<script src="/vendor/vendor.js"></script>
12+
<script src="/build/app.js"></script>
13+
</body>
14+
</html>

main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2+
3+
import { AppModule } from './app/app.module';
4+
5+
platformBrowserDynamic().bootstrapModule(AppModule);

package.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "angular-fundamentals-seed",
3+
"version": "0.1.0",
4+
"description": "Ultimate Angular: Angular Fundamentals Seed",
5+
"repository": {
6+
"url": "git@github.com:UltimateAngular/angular-fundamentals-seed.git",
7+
"type": "git"
8+
},
9+
"license": "MIT",
10+
"author": "Ultimate Angular",
11+
"dependencies": {
12+
"@angular/common": "4.0.0-beta.1",
13+
"@angular/compiler": "4.0.0-beta.1",
14+
"@angular/core": "4.0.0-beta.1",
15+
"@angular/forms": "4.0.0-beta.1",
16+
"@angular/http": "4.0.0-beta.1",
17+
"@angular/platform-browser": "4.0.0-beta.1",
18+
"@angular/platform-browser-dynamic": "4.0.0-beta.1",
19+
"@angular/router": "4.0.0-beta.1",
20+
"reflect-metadata": "0.1.8",
21+
"rxjs": "5.0.1",
22+
"ts-helpers": "1.1.2",
23+
"zone.js": "0.7.4"
24+
},
25+
"scripts": {
26+
"prestart": "webpack --config vendor/webpack.config.js",
27+
"start": "webpack-dev-server"
28+
},
29+
"devDependencies": {
30+
"@types/core-js": "0.9.34",
31+
"@types/node": "6.0.46",
32+
"angular2-template-loader": "0.6.0",
33+
"awesome-typescript-loader": "3.0.0-beta.17",
34+
"chalk": "1.1.3",
35+
"core-js": "2.4.1",
36+
"json-server": "0.9.4",
37+
"node-sass": "3.13.0",
38+
"progress-bar-webpack-plugin": "1.9.0",
39+
"raw-loader": "0.5.1",
40+
"resolve-url-loader": "1.6.0",
41+
"sass-loader": "4.0.2",
42+
"typescript": "2.1.4",
43+
"webpack": "2.2.0-rc.3",
44+
"webpack-dev-server": "2.2.0-rc.0"
45+
}
46+
}

tsconfig.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"emitDecoratorMetadata": true,
5+
"experimentalDecorators": true,
6+
"noEmitHelpers": true,
7+
"pretty": true,
8+
"sourceMap": true,
9+
"lib": ["es5", "dom"],
10+
"strictNullChecks": false
11+
},
12+
"exclude": [
13+
"node_modules"
14+
],
15+
"awesomeTypescriptLoaderOptions": {
16+
"useWebpackText": true,
17+
"forkChecker": true,
18+
"useCache": true
19+
},
20+
"compileOnSave": false,
21+
"buildOnSave": false
22+
}

0 commit comments

Comments
 (0)