set up a first draft of the angular2 scaffold
This commit is contained in:
parent
325b361a15
commit
4fa442e262
7 changed files with 111 additions and 13 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -3,3 +3,6 @@
|
||||||
*.iml
|
*.iml
|
||||||
atlassian-ide-plugin.xml
|
atlassian-ide-plugin.xml
|
||||||
node_modules/
|
node_modules/
|
||||||
|
typings/
|
||||||
|
app/**/*.js
|
||||||
|
app/**/*.js.map
|
11
app/app.component.ts
Normal file
11
app/app.component.ts
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
"selector":"dencode-app",
|
||||||
|
"template": `
|
||||||
|
<h1>dencode.org</h1>
|
||||||
|
`
|
||||||
|
})
|
||||||
|
export class AppComponent {
|
||||||
|
|
||||||
|
}
|
5
app/main.ts
Normal file
5
app/main.ts
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import {bootstrap} from "@angular/platform-browser-dynamic";
|
||||||
|
|
||||||
|
import {AppComponent} from "./app.component";
|
||||||
|
|
||||||
|
bootstrap(AppComponent);
|
33
index.html
33
index.html
|
@ -1,19 +1,32 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8"/>
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
|
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/>
|
||||||
<title>Decode? Encode? DENcode!</title>
|
<title>Decode? Encode? DENcode!</title>
|
||||||
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
|
<link rel="stylesheet" type="text/css" href="dencode.css"/>
|
||||||
<script type="text/javascript" src="utf8.js"></script>
|
<!--<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>-->
|
||||||
<script type="text/javascript" src="quoted-printable.js"></script>
|
<!--<script type="text/javascript" src="utf8.js"></script>-->
|
||||||
<script type="text/javascript" src="dencode.js"></script>
|
<!--<script type="text/javascript" src="quoted-printable.js"></script>-->
|
||||||
<link rel="stylesheet" type="text/css" href="dencode.css" />
|
<!--<script type="text/javascript" src="dencode.js"></script>-->
|
||||||
|
<script type="text/javascript" src="node_modules/core-js/client/shim.js"></script>
|
||||||
|
<script type="text/javascript" src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
|
<script type="text/javascript" src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
|
<script type="text/javascript" src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="systemjs.config.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
System.import("app").catch(function (err) {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Decode? Encode? DENcode!</h1>
|
<h1>Decode? Encode? DENcode!</h1>
|
||||||
<noscript>This webpage lets you decode and encode data and text to and from various formats. But
|
<noscript>This webpage lets you decode and encode data and text to and from various formats. But
|
||||||
it requires you to <strong>enable Javascript</strong> to do so. So please turn it on in your
|
it requires you to <strong>enable Javascript</strong> to do so. So please turn it on in your
|
||||||
Browser. You won't regret it!</noscript>
|
Browser. You won't regret it!
|
||||||
|
</noscript>
|
||||||
|
<dencode-app>Please hold on, we're starting the turbines ...</dencode-app>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
47
systemjs.config.js
Normal file
47
systemjs.config.js
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
/**
|
||||||
|
* System configuration for Angular 2 samples
|
||||||
|
* Adjust as necessary for your application needs.
|
||||||
|
*/
|
||||||
|
(function(global) {
|
||||||
|
// map tells the System loader where to look for things
|
||||||
|
var map = {
|
||||||
|
'app': 'app', // 'dist',
|
||||||
|
'@angular': 'node_modules/@angular',
|
||||||
|
// 'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
||||||
|
'rxjs': 'node_modules/rxjs'
|
||||||
|
};
|
||||||
|
// packages tells the System loader how to load when no filename and/or no extension
|
||||||
|
var packages = {
|
||||||
|
'app': { main: 'main.js', defaultExtension: 'js' },
|
||||||
|
'rxjs': { defaultExtension: 'js' },
|
||||||
|
// 'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
||||||
|
};
|
||||||
|
var ngPackageNames = [
|
||||||
|
'common',
|
||||||
|
'compiler',
|
||||||
|
'core',
|
||||||
|
'http',
|
||||||
|
'platform-browser',
|
||||||
|
'platform-browser-dynamic',
|
||||||
|
'router',
|
||||||
|
'router-deprecated',
|
||||||
|
'upgrade',
|
||||||
|
];
|
||||||
|
// Individual files (~300 requests):
|
||||||
|
function packIndex(pkgName) {
|
||||||
|
packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
||||||
|
}
|
||||||
|
// Bundled (~40 requests):
|
||||||
|
function packUmd(pkgName) {
|
||||||
|
packages['@angular/'+pkgName] = { main: pkgName + '.umd.js', defaultExtension: 'js' };
|
||||||
|
};
|
||||||
|
// Most environments should use UMD; some (Karma) need the individual index files
|
||||||
|
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
|
||||||
|
// Add package entries for angular packages
|
||||||
|
ngPackageNames.forEach(setPackageConfig);
|
||||||
|
var config = {
|
||||||
|
map: map,
|
||||||
|
packages: packages
|
||||||
|
}
|
||||||
|
System.config(config);
|
||||||
|
})(this);
|
12
tsconfig.json
Normal file
12
tsconfig.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5",
|
||||||
|
"module": "commonjs",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"sourceMap": true,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"removeComments": false,
|
||||||
|
"noImplicitAny": false
|
||||||
|
}
|
||||||
|
}
|
7
typings.json
Normal file
7
typings.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"globalDependencies": {
|
||||||
|
"core-js": "registry:dt/core-js#0.0.0+20160317120654",
|
||||||
|
"jasmine": "registry:dt/jasmine#2.2.0+20160505161446",
|
||||||
|
"node": "registry:dt/node#4.0.0+20160509154515"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue