Skip to content
This repository was archived by the owner on Feb 17, 2024. It is now read-only.

Commit 73e21d1

Browse files
committed
init
0 parents  commit 73e21d1

File tree

11 files changed

+348
-0
lines changed

11 files changed

+348
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/node_modules/
2+
/dist/
3+
/npm-debug.log
4+
/typings/
5+
specs.js

package.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "retain",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "webpack --config webpack.spec.ts --progress --color && karma start",
8+
"start": "webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 3000 --content-base src",
9+
"typings-install": "typings install",
10+
"postinstall": "npm run typings-install"
11+
},
12+
"author": "",
13+
"license": "ISC",
14+
"dependencies": {
15+
"@angular/common": "^2.0.0-rc.4",
16+
"@angular/compiler": "^2.0.0-rc.4",
17+
"@angular/core": "^2.0.0-rc.4",
18+
"@angular/forms": "^0.2.0",
19+
"@angular/http": "^2.0.0-rc.4",
20+
"@angular/platform-browser": "^2.0.0-rc.4",
21+
"@angular/platform-browser-dynamic": "^2.0.0-rc.4",
22+
"@angular/router": "^3.0.0-beta.2",
23+
"core-js": "^2.4.0",
24+
"lodash": "^4.13.1",
25+
"rxjs": "^5.0.0-beta.10",
26+
"zone.js": "^0.6.12"
27+
},
28+
"devDependencies": {
29+
"awesome-typescript-loader": "1.0",
30+
"css-loader": "^0.23.1",
31+
"jasmine-core": "^2.4.1",
32+
"karma": "^1.1.1",
33+
"karma-chrome-launcher": "^1.0.1",
34+
"karma-jasmine": "^1.0.2",
35+
"karma-mocha-reporter": "^2.0.4",
36+
"raw-loader": "^0.5.1",
37+
"to-string-loader": "^1.1.4",
38+
"ts-helpers": "^1.1.1",
39+
"typescript": "^1.8.10",
40+
"typescript-register": "^1.1.0",
41+
"webpack": "^2.1.0-beta.15",
42+
"webpack-dev-server": "^1.14.1"
43+
}
44+
}

src/global.css

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
@import url(https://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700);
2+
3+
* {
4+
box-sizing: border-box;
5+
}
6+
7+
body, html, main, .main, .app, app {
8+
min-height: 100%;
9+
height: 100%;
10+
background-color: #efefef;
11+
}
12+
13+
body {
14+
font-family: 'Roboto', sans-serif;
15+
}
16+
17+
.btn-light {
18+
border: none;
19+
outline: none;
20+
border-radius: 2px;
21+
min-width: 60px;
22+
color: rgba(0,0,0, 0.6);
23+
text-transform: uppercase;
24+
line-spacing: 1px;
25+
padding: 5px;
26+
text-align: center;
27+
background-color: transparent;
28+
cursor: pointer;
29+
}
30+
31+
.btn-light:hover {
32+
background-color: rgba(0,0,0, 0.2);
33+
}
34+
35+
.btn-light:disabled, .btn-light[disabled], .btn-light.disabled {
36+
cursor: not-allowed;
37+
background-color: rgba(0,0,0,.12);
38+
color: rgba(0,0,0,.26);
39+
}
40+
41+
input {
42+
border: none;
43+
background-color: transparent;
44+
outline: none;
45+
color: rgba(0,0,0,0.6);
46+
margin-bottom: 15px;
47+
}
48+
49+
.shadow-1 {
50+
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
51+
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
52+
}
53+
54+
.shadow-1:hover {
55+
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
56+
}
57+
58+
.shadow-2 {
59+
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
60+
}
61+
62+
.shadow-3 {
63+
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
64+
}
65+
66+
.shadow-4 {
67+
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
68+
}
69+
70+
.shadow-5 {
71+
box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
72+
}
73+

src/index.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset=UTF-8>
5+
<title>Retain</title>
6+
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<link href='https://cdnjs.cloudflare.com/ajax/libs/normalize/4.1.1/normalize.min.css' rel='stylesheet' type='text/css'>
9+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/flexboxgrid/6.3.0/flexboxgrid.min.css" type="text/css">
10+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
11+
rel="stylesheet">
12+
<link href="global.css" rel="stylesheet">
13+
<base href="/">
14+
</head>
15+
<body>
16+
17+
<app>
18+
Loading...
19+
</app>
20+
21+
<script src="polyfills.bundle.js"></script>
22+
<script src="vendor.bundle.js"></script>
23+
<script src="main.bundle.js"></script>
24+
25+
</body>
26+
</html>

src/main.ts

Whitespace-only changes.

src/polyfills.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import 'core-js/es6';
2+
import 'core-js/es7/reflect';
3+
import 'zone.js/dist/zone';
4+
import 'zone.js/dist/long-stack-trace-zone';

src/vendor.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Vendors
2+
3+
// Angular 2
4+
import '@angular/platform-browser-dynamic';
5+
import '@angular/platform-browser';
6+
import '@angular/core';
7+
import '@angular/http';
8+
import '@angular/router';
9+
10+
// RxJS 5
11+
import 'rxjs/add/operator/map';
12+
import 'rxjs/add/operator/catch';
13+
14+
import 'rxjs/add/observable/throw';
15+
import 'rxjs/Rx';

tsconfig.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"target": "es5",
5+
"outDir": "dist",
6+
"rootDir": ".",
7+
"sourceMap": true,
8+
"emitDecoratorMetadata": true,
9+
"experimentalDecorators": true,
10+
"moduleResolution": "node"
11+
},
12+
"exclude": [
13+
"typings/index.d.ts",
14+
"node_modules"
15+
],
16+
"compileOnSave": false,
17+
"buildOnSave": false,
18+
"atom": { "rewriteTsconfig": false }
19+
}

tslint.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"rules": {
3+
"class-name": true,
4+
"comment-format": [true, "check-space"],
5+
"class-name": false,
6+
"curly": true,
7+
"eofline": true,
8+
"forin": true,
9+
"indent": [true, "spaces"],
10+
"label-position": true,
11+
"label-undefined": true,
12+
"max-line-length": [true, 140],
13+
"no-arg": true,
14+
"no-bitwise": false,
15+
"no-console": [true,
16+
"debug",
17+
"info"
18+
],
19+
"no-construct": true,
20+
"no-debugger": false,
21+
"no-duplicate-key": true,
22+
"no-duplicate-variable": true,
23+
"no-empty": false,
24+
"no-eval": true,
25+
"no-string-literal": false,
26+
"no-switch-case-fall-through": true,
27+
"trailing-comma": true,
28+
"no-trailing-whitespace": false,
29+
"no-unused-expression": true,
30+
"no-unused-variable": false,
31+
"no-unreachable": true,
32+
"no-use-before-declare": true,
33+
"no-var-keyword": false,
34+
"one-line": [true,
35+
"check-open-brace",
36+
"check-catch",
37+
"check-else",
38+
"check-whitespace"
39+
],
40+
"quotemark": false,
41+
"radix": true,
42+
"semicolon": true,
43+
"object-literal-sort-keys": false,
44+
"triple-equals": [true, "allow-null-check"],
45+
"variable-name": false,
46+
"whitespace": [true,
47+
"check-branch",
48+
"check-decl",
49+
"check-operator",
50+
"check-separator",
51+
"check-type"
52+
]
53+
}
54+
}

typings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"globalDependencies": {
3+
"core-js": "registry:dt/core-js#0.0.0+20160602141332",
4+
"lodash": "registry:dt/lodash#3.10.0+20160619033623",
5+
"node": "registry:dt/node#6.0.0+20160709114037"
6+
}
7+
}

webpack.config.ts

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import * as path from 'path';
2+
const webpack = require('webpack');
3+
4+
const config: WebpackConfig = {
5+
cache: false,
6+
devtool: 'source-map',
7+
entry: {
8+
polyfills: './src/polyfills',
9+
vendor: './src/vendor',
10+
main: './src/main'
11+
},
12+
13+
output: {
14+
path: path.join(__dirname, 'dist'),
15+
filename: '[name].bundle.js',
16+
sourceMapFilename: '[name].map',
17+
chunkFilename: '[id].chunk.js'
18+
},
19+
module: {
20+
loaders: [
21+
{ test: /\.ts$/, loader: 'awesome-typescript-loader' },
22+
{ test: /\.json$/, loader: 'json-loader' },
23+
{ test: /\.html/, loader: 'raw-loader' },
24+
{ test: /\.css$/, loader: 'to-string-loader!css-loader' },
25+
]
26+
},
27+
28+
plugins: [
29+
new webpack.optimize.CommonsChunkPlugin({ name: ['polyfills', 'vendor', 'main'].reverse(), minChunks: Infinity }),
30+
],
31+
32+
resolve: {
33+
extensions: ['.ts', '.js', '.json'],
34+
},
35+
36+
devServer: {
37+
historyApiFallback: true,
38+
watchOptions: { aggregateTimeout: 300, poll: 1000 }
39+
},
40+
41+
node: {
42+
global: true,
43+
process: true,
44+
Buffer: false,
45+
crypto: 'empty',
46+
module: false,
47+
clearImmediate: false,
48+
setImmediate: false,
49+
clearTimeout: true,
50+
setTimeout: true
51+
}
52+
};
53+
module.exports = config;
54+
55+
56+
// Types
57+
type Entry = Array<string> | Object;
58+
59+
type Output = Array<string> | {
60+
path: string,
61+
filename: string
62+
};
63+
64+
type EnvOptions = any;
65+
66+
interface WebpackConfig {
67+
cache?: boolean;
68+
target?: string;
69+
devtool?: string;
70+
entry: Entry;
71+
output: any;
72+
module?: {
73+
loaders?: Array<any>
74+
};
75+
plugins?: Array<any>;
76+
resolve?: {
77+
extensions?: Array<string>;
78+
};
79+
devServer?: {
80+
contentBase?: string;
81+
port?: number;
82+
historyApiFallback?: boolean;
83+
hot?: boolean;
84+
inline?: boolean;
85+
watchOptions?: {
86+
aggregateTimeout?: number;
87+
poll?: number;
88+
}
89+
};
90+
node?: {
91+
process?: boolean;
92+
global?: boolean;
93+
Buffer?: boolean;
94+
crypto?: string | boolean;
95+
module?: boolean;
96+
clearImmediate?: boolean;
97+
setImmediate?: boolean
98+
clearTimeout?: boolean;
99+
setTimeout?: boolean
100+
};
101+
}

0 commit comments

Comments
 (0)