Skip to content

Commit 7dd824d

Browse files
committed
Initial Commit from Ember CLI v1.13.13
_..., ,:^;,...; -+===;. ,,--++====++-,,, .: /....., :::::~+++++#:,+#++++++++++++++++++#*..: /,...... (,,,,,,::=+++##++++++++++++++++++++++#. :....../ ...,,,,,::++++++++++++++++++++++++++++++*..,...: *..+...,#@@@@@@@@@++++++++++++++++++++++#*....* @#,;##############@@@+*+#@@@@@@@@@@#*++#..< *@##@@+,-*^^^*-+@####@@@######@@@#####@@,,,+ @#@* @#@@@@#@@+--*^^*--#@@@@@@# @#@. @# @##+++@#, .@@#@@ #@# @@ +@@++++#@@ @@ :@@ :@#* @#@++++++@#* #@ @@+ :*+@@#;,.__.+@#@+,-^^.++@# @@++ ;* :*@@@##@@@@;++r._j^.+@##@+,.__,,@@++. /* ........+++++++++++++#@@@@@###@@#++++, ,: ...,@@@#++===----==@@@####,,....+++++ .: ......@@##@\ ; :@####@,,...... +++. ; .........@###, ; ;xx#@;,,..... *;+, | ........,*;xxxx--^--=xxx,........ :+#; ; ......,,;xxxxxxxxxxxxx;,..... *+# ; ......,::xxxx;. ...... +. . *; ......... +### .... / ,. /:| ,. .+: ... ;##++##, . ,#. (..v..;*./ ** ## ###* .:*&&&+. \.,....<, #&+**==-..,,__ ;## ### :,*+&&&&&&&v+#&,,.._/ #&&&&*...,::,,. ##; ,##* .*****;:&&&&&&&&& ,+*+;~*..*** *.* ### ###* ******* *+#&;* ##,;## **** :, ** ##### ## ### ###, ######## .##### ;## ## ####### ;## #### ,###. ########## ######## ### #### ### ### ### ########## #### #### ,## ### #######* ### ,### ##############: ## ### #### ,## :#### ### ##; ########## ########### ## .## ,### ####### ##### :###### ###### .###### #### ## ### ### ######* :##### #### ############# #### ################ ######## ### #####* *#* #: :### *###* *#### #*
0 parents  commit 7dd824d

12 files changed

+221
-0
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
7+
# dependencies
8+
/node_modules
9+
/bower_components
10+
11+
# misc
12+
/.sass-cache
13+
/connect.lock
14+
/coverage/*
15+
/libpeerconnection.log
16+
npm-debug.log
17+
testem.log

ember-cli-build.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* global require, module */
2+
3+
var Angular2App = require('angular-cli/lib/broccoli/angular2-app');
4+
5+
module.exports = function(defaults) {
6+
var app = new Angular2App(defaults);
7+
return app.toTree();
8+
}

karma-test-shim.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Error.stackTraceLimit = Infinity;
2+
3+
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
4+
5+
__karma__.loaded = function() {};
6+
7+
System.config({
8+
packages: {
9+
'base/dist/app': {
10+
defaultExtension: false,
11+
format: 'register',
12+
map: Object.keys(window.__karma__.files)
13+
.filter(onlyAppFiles)
14+
.reduce(function(pathsMapping, appPath) {
15+
var moduleName = appPath.replace(/^\/base\/dist\/app\//, './').replace(/\.js$/, '');
16+
pathsMapping[moduleName] = appPath + '?' + window.__karma__.files[appPath]
17+
return pathsMapping;
18+
}, {})
19+
}
20+
}
21+
});
22+
23+
System.import('angular2/platform/browser').then(function(browser_adapter) {
24+
// TODO: once beta is out we should change this code to use a "test platform"
25+
browser_adapter.BrowserDomAdapter.makeCurrent();
26+
}).then(function() {
27+
return Promise.all(
28+
Object.keys(window.__karma__.files)
29+
.filter(onlySpecFiles)
30+
.map(function(moduleName) {
31+
return System.import(moduleName);
32+
}));
33+
}).then(function() {
34+
__karma__.start();
35+
}, function(error) {
36+
__karma__.error(error.stack || error);
37+
});
38+
39+
function onlyAppFiles(filePath) {
40+
return /^\/base\/dist\/app\/(?!spec)([a-z0-9-_\/]+)\.js$/.test(filePath);
41+
}
42+
43+
function onlySpecFiles(path) {
44+
return /\.spec\.js$/.test(path);
45+
}

karma.conf.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = function(config) {
2+
config.set({
3+
basePath: '',
4+
frameworks: ['jasmine'],
5+
files: [
6+
{pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: true},
7+
{pattern: 'node_modules/angular2/bundles/angular2.js', included: true, watched: true},
8+
{pattern: 'node_modules/angular2/bundles/testing.js', included: true, watched: true},
9+
10+
{pattern: 'karma-test-shim.js', included: true, watched: true},
11+
12+
// paths loaded via module imports
13+
{pattern: 'dist/**/*.js', included: false, watched: true},
14+
15+
// paths loaded via Angular's component compiler
16+
// (these paths need to be rewritten, see proxies section)
17+
{pattern: 'dist/**/*.html', included: false, watched: true},
18+
{pattern: 'dist/**/*.css', included: false, watched: true},
19+
20+
// paths to support debugging with source maps in dev tools
21+
{pattern: 'dist/**/*.ts', included: false, watched: false},
22+
{pattern: 'dist/**/*.js.map', included: false, watched: false}
23+
],
24+
proxies: {
25+
// required for component assests fetched by Angular's compiler
26+
"/app/": "/base/dist/app/"
27+
},
28+
exclude: [],
29+
preprocessors: {},
30+
reporters: ['progress'],
31+
port: 9876,
32+
colors: true,
33+
logLevel: config.LOG_INFO,
34+
autoWatch: true,
35+
browsers: ['Chrome'],
36+
singleRun: false
37+
});
38+
};

package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "angular-cli-test",
3+
"version": "0.0.0",
4+
"license": "Apache-2.0",
5+
"dependencies": {
6+
"angular2": "2.0.0-beta.0",
7+
"es6-promise": "^3.0.2",
8+
"es6-shim": "^0.33.3",
9+
"reflect-metadata": "0.1.2",
10+
"rxjs": "5.0.0-beta.0",
11+
"systemjs": "0.19.4",
12+
"zone.js": "0.5.10"
13+
},
14+
"devDependencies": {
15+
"angular-cli": "0.0.*",
16+
"angular-cli-github-pages": "^0.2.0",
17+
"ember-cli-inject-live-reload": "^1.3.0",
18+
"jasmine-core": "^2.3.4",
19+
"karma": "^0.13.15",
20+
"karma-chrome-launcher": "^0.2.1",
21+
"karma-jasmine": "^0.3.6"
22+
}
23+
}

src/app.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import {bootstrap} from 'angular2/platform/browser';
2+
import {AngularCliTestApp} from './app/angular-cli-test';
3+
4+
5+
bootstrap(AngularCliTestApp);

src/app/angular-cli-test.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
angular-cli-test Works!
3+
</p>

src/app/angular-cli-test.spec.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import {describe, it, expect, beforeEachProviders, inject} from 'angular2/testing';
2+
import {AngularCliTestApp} from '../app/angular-cli-test';
3+
4+
beforeEachProviders(() => [AngularCliTestApp]);
5+
6+
describe('App: AngularCliTest', () => {
7+
it('should have the `defaultMeaning` as 42', inject([AngularCliTestApp], (app) => {
8+
expect(app.defaultMeaning).toBe(42);
9+
}));
10+
11+
describe('#meaningOfLife', () => {
12+
it('should get the meaning of life', inject([AngularCliTestApp], (app) => {
13+
expect(app.meaningOfLife()).toBe('The meaning of life is 42');
14+
expect(app.meaningOfLife(22)).toBe('The meaning of life is 22');
15+
}));
16+
});
17+
});
18+

src/app/angular-cli-test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import {Component} from 'angular2/core';
2+
3+
4+
@Component({
5+
selector: 'angular-cli-test-app',
6+
providers: [],
7+
templateUrl: 'app/angular-cli-test.html',
8+
directives: [],
9+
pipes: []
10+
})
11+
export class AngularCliTestApp {
12+
defaultMeaning: number = 42;
13+
14+
meaningOfLife(meaning) {
15+
return `The meaning of life is ${meaning || this.defaultMeaning}`;
16+
}
17+
}

src/favicon.ico

5.3 KB
Binary file not shown.

src/index.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>AngularCliTest</title>
6+
<base href=".">
7+
<script src="vendor/angular2/bundles/angular2-polyfills.js"></script>
8+
{{content-for 'head'}}
9+
<link rel="icon" type="image/x-icon" href="favicon.ico">
10+
</head>
11+
<body>
12+
<angular-cli-test-app>Loading...</angular-cli-test-app>
13+
14+
<script src="vendor/systemjs/dist/system.src.js"></script>
15+
<script src="vendor/rxjs/bundles/Rx.js"></script>
16+
<script src="vendor/angular2/bundles/angular2.dev.js"></script>
17+
<script src="vendor/angular2/bundles/http.dev.js"></script>
18+
<script src="vendor/angular2/bundles/router.dev.js"></script>
19+
<script>
20+
System.config({
21+
packages: {
22+
app: {
23+
format: 'register',
24+
defaultExtension: 'js'
25+
}
26+
}
27+
});
28+
System.import('app.js').then(null, console.error.bind(console));
29+
</script>
30+
</body>
31+
</html>

src/tsconfig.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"declaration": false,
4+
"emitDecoratorMetadata": true,
5+
"experimentalDecorators": true,
6+
"mapRoot": "",
7+
"module": "system",
8+
"moduleResolution": "node",
9+
"noEmitOnError": true,
10+
"noImplicitAny": false,
11+
"rootDir": ".",
12+
"sourceMap": true,
13+
"sourceRoot": "/",
14+
"target": "es5"
15+
}
16+
}

0 commit comments

Comments
 (0)