-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: initial commit from angular-cli
_ _ _ __ _ _ __ __ _ _ _| | __ _ _ __ ___| (_) / _ | _ \ / _ | | | | |/ _ | __|____ / __| | | | (_| | | | | (_| | |_| | | (_| | | |_____| (__| | | \____|_| |_|\__ |\____|_|\____|_| \___|_|_| |___/
- Loading branch information
1 parent
b71bd88
commit 908d9d9
Showing
32 changed files
with
563 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Language: JavaScript | ||
BasedOnStyle: Google | ||
ColumnLimit: 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = 0 | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist | ||
/tmp | ||
|
||
# dependencies | ||
/node_modules | ||
/bower_components | ||
|
||
# IDEs and editors | ||
/.idea | ||
|
||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage/* | ||
/libpeerconnection.log | ||
npm-debug.log | ||
testem.log | ||
/typings | ||
|
||
# e2e | ||
/e2e/*.js | ||
/e2e/*.map | ||
|
||
#System Files | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* global require, module */ | ||
|
||
var Angular2App = require('angular-cli/lib/broccoli/angular2-app'); | ||
|
||
module.exports = function(defaults) { | ||
return new Angular2App(defaults, { | ||
vendorNpmFiles: [ | ||
'systemjs/dist/system-polyfills.js', | ||
'systemjs/dist/system.src.js', | ||
'zone.js/dist/*.js', | ||
'es6-shim/es6-shim.js', | ||
'reflect-metadata/*.js', | ||
'rxjs/**/*.js', | ||
'@angular/**/*.js' | ||
] | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"project": { | ||
"version": "1.0.0-beta.1", | ||
"name": "periscope" | ||
}, | ||
"apps": [ | ||
{"main": "src/main.ts", "tsconfig": "src/tsconfig.json"} | ||
], | ||
"addons": [], | ||
"packages": [], | ||
"e2e": { | ||
"protractor": { | ||
"config": "config/protractor.conf.js" | ||
} | ||
}, | ||
"test": { | ||
"karma": { | ||
"config": "config/karma.conf.js" | ||
} | ||
}, | ||
"defaults": { | ||
"prefix": "app", | ||
"sourceDir": "src" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const environment = { | ||
production: false | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* jshint node: true */ | ||
|
||
module.exports = function(environment) { | ||
return { | ||
environment: environment, | ||
baseURL: '/', | ||
locationType: 'auto' | ||
}; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const environment = { | ||
production: true | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/*global jasmine, __karma__, window*/ | ||
Error.stackTraceLimit = Infinity; | ||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; | ||
|
||
__karma__.loaded = function () { | ||
}; | ||
|
||
var distPath = '/base/dist/'; | ||
var appPath = distPath + 'app/'; | ||
|
||
function isJsFile(path) { | ||
return path.slice(-3) == '.js'; | ||
} | ||
|
||
function isSpecFile(path) { | ||
return path.slice(-8) == '.spec.js'; | ||
} | ||
|
||
function isAppFile(path) { | ||
return isJsFile(path) && (path.substr(0, appPath.length) == appPath); | ||
} | ||
|
||
var allSpecFiles = Object.keys(window.__karma__.files) | ||
.filter(isSpecFile) | ||
.filter(isAppFile); | ||
|
||
// Load our SystemJS configuration. | ||
System.config({ | ||
baseURL: distPath | ||
}); | ||
|
||
System.import('system-config.js').then(function() { | ||
// Load and configure the TestComponentBuilder. | ||
return Promise.all([ | ||
System.import('@angular/core/testing'), | ||
System.import('@angular/platform-browser-dynamic/testing') | ||
]).then(function (providers) { | ||
var testing = providers[0]; | ||
var testingBrowser = providers[1]; | ||
|
||
testing.setBaseTestProviders(testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, | ||
testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS); | ||
}); | ||
}).then(function() { | ||
// Finally, load all spec files. | ||
// This will run the tests directly. | ||
return Promise.all( | ||
allSpecFiles.map(function (moduleName) { | ||
return System.import(moduleName); | ||
})); | ||
}).then(__karma__.start, __karma__.error); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '..', | ||
frameworks: ['jasmine'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher') | ||
], | ||
customLaunchers: { | ||
// chrome setup for travis CI using chromium | ||
Chrome_travis_ci: { | ||
base: 'Chrome', | ||
flags: ['--no-sandbox'] | ||
} | ||
}, | ||
files: [ | ||
{ pattern: 'dist/vendor/es6-shim/es6-shim.js', included: true, watched: false }, | ||
{ pattern: 'dist/vendor/zone.js/dist/zone.js', included: true, watched: false }, | ||
{ pattern: 'dist/vendor/reflect-metadata/Reflect.js', included: true, watched: false }, | ||
{ pattern: 'dist/vendor/systemjs/dist/system-polyfills.js', included: true, watched: false }, | ||
{ pattern: 'dist/vendor/systemjs/dist/system.src.js', included: true, watched: false }, | ||
{ pattern: 'dist/vendor/zone.js/dist/async-test.js', included: true, watched: false }, | ||
|
||
{ pattern: 'config/karma-test-shim.js', included: true, watched: true }, | ||
|
||
// Distribution folder. | ||
{ pattern: 'dist/**/*', included: false, watched: true } | ||
], | ||
exclude: [ | ||
// Vendor packages might include spec files. We don't want to use those. | ||
'dist/vendor/**/*.spec.js' | ||
], | ||
preprocessors: {}, | ||
reporters: ['progress'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['Chrome'], | ||
singleRun: false | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/*global jasmine */ | ||
var SpecReporter = require('jasmine-spec-reporter'); | ||
|
||
exports.config = { | ||
allScriptsTimeout: 11000, | ||
specs: [ | ||
'../e2e/**/*.e2e.ts' | ||
], | ||
capabilities: { | ||
'browserName': 'chrome' | ||
}, | ||
directConnect: true, | ||
baseUrl: 'http://localhost:4200/', | ||
framework: 'jasmine', | ||
jasmineNodeOpts: { | ||
showColors: true, | ||
defaultTimeoutInterval: 30000, | ||
print: function() {} | ||
}, | ||
useAllAngular2AppRoots: true, | ||
beforeLaunch: function() { | ||
require('ts-node').register({ | ||
project: 'e2e' | ||
}); | ||
}, | ||
onPrepare: function() { | ||
jasmine.getEnv().addReporter(new SpecReporter()); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { PeriscopePage } from './app.po'; | ||
|
||
describe('periscope App', function() { | ||
let page: PeriscopePage; | ||
|
||
beforeEach(() => { | ||
page = new PeriscopePage(); | ||
}) | ||
|
||
it('should display message saying app works', () => { | ||
page.navigateTo(); | ||
expect(page.getParagraphText()).toEqual('periscope works!'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export class PeriscopePage { | ||
navigateTo() { | ||
return browser.get('/'); | ||
} | ||
|
||
getParagraphText() { | ||
return element(by.css('periscope-app h1')).getText(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compileOnSave": false, | ||
"compilerOptions": { | ||
"declaration": false, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"mapRoot": "", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"noEmitOnError": true, | ||
"noImplicitAny": false, | ||
"rootDir": ".", | ||
"sourceMap": true, | ||
"sourceRoot": "/", | ||
"target": "es5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference path="../typings/main.d.ts" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "periscope", | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"angular-cli": {}, | ||
"scripts": { | ||
"start": "ng server", | ||
"postinstall": "typings install", | ||
"lint": "tslint \"src/**/*.ts\"", | ||
"format": "clang-format -i -style=file --glob=src/**/*.ts", | ||
"pree2e": "webdriver-manager update", | ||
"e2e": "protractor" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"@angular/common": "2.0.0-rc.1", | ||
"@angular/compiler": "2.0.0-rc.1", | ||
"@angular/core": "2.0.0-rc.1", | ||
"@angular/platform-browser": "2.0.0-rc.1", | ||
"@angular/platform-browser-dynamic": "2.0.0-rc.1", | ||
"@angular/router": "2.0.0-rc.1", | ||
"es6-shim": "^0.35.0", | ||
"reflect-metadata": "0.1.3", | ||
"rxjs": "5.0.0-beta.6", | ||
"systemjs": "0.19.26", | ||
"zone.js": "^0.6.12" | ||
}, | ||
"devDependencies": { | ||
"angular-cli": "^1.0.0-beta.0", | ||
"clang-format": "^1.0.35", | ||
"codelyzer": "0.0.14", | ||
"ember-cli-inject-live-reload": "^1.4.0", | ||
"jasmine-core": "^2.4.1", | ||
"jasmine-spec-reporter": "^2.4.0", | ||
"karma": "^0.13.15", | ||
"karma-chrome-launcher": "^0.2.3", | ||
"karma-jasmine": "^0.3.8", | ||
"protractor": "^3.3.0", | ||
"ts-node": "^0.5.5", | ||
"tslint": "^3.6.0", | ||
"typescript": "^1.8.10", | ||
"typings": "^0.8.1" | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// The file for the current environment will overwrite this one during build | ||
// Different environments can be found in config/environment.{dev|prod}.ts | ||
// The build system defaults to the dev environment | ||
|
||
export const environment = { | ||
production: false | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export {environment} from './environment'; | ||
export {PeriscopeAppComponent} from './periscope.component'; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h1> | ||
{{title}} | ||
</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { | ||
beforeEachProviders, | ||
describe, | ||
expect, | ||
it, | ||
inject | ||
} from '@angular/core/testing'; | ||
import { PeriscopeAppComponent } from '../app/periscope.component'; | ||
|
||
beforeEachProviders(() => [PeriscopeAppComponent]); | ||
|
||
describe('App: Periscope', () => { | ||
it('should create the app', | ||
inject([PeriscopeAppComponent], (app: PeriscopeAppComponent) => { | ||
expect(app).toBeTruthy(); | ||
})); | ||
|
||
it('should have as title \'periscope works!\'', | ||
inject([PeriscopeAppComponent], (app: PeriscopeAppComponent) => { | ||
expect(app.title).toEqual('periscope works!'); | ||
})); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
moduleId: module.id, | ||
selector: 'periscope-app', | ||
templateUrl: 'periscope.component.html', | ||
styleUrls: ['periscope.component.css'] | ||
}) | ||
export class PeriscopeAppComponent { | ||
title = 'periscope works!'; | ||
} |
Empty file.
Binary file not shown.
Oops, something went wrong.