Skip to content

Commit a4ebe4a

Browse files
committed
Add current source of pages
1 parent 003ef0b commit a4ebe4a

File tree

103 files changed

+3116
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+3116
-0
lines changed

.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# @AngularClass
2+
# http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_style = space
9+
indent_size = 2
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
insert_final_newline = false
16+
trim_trailing_whitespace = false

.github/CONTRIBUTING.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Read and contribute to the Wiki
2+
3+
Make sure you read the [Wiki](https://github.com/AngularClass/angular2-webpack-starter/wiki).
4+
5+
## Submitting Pull Requests
6+
7+
If you're changing the structure of the repository please create an issue first.
8+
9+
## Submitting bug reports
10+
11+
Make sure you are on latest changes and that you ran this command `npm run clean:install` after updating your local repository. If you can, please provide more information about your environment such as browser, operating system, node version, and npm version.

.github/ISSUE_TEMPLATE.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
**Note: for support questions, please use one of these channels:** [Chat: AngularClass.slack](http://angularclass.com/member-join/) or [Twitter: @AngularClass](https://twitter.com/AngularClass)
2+
3+
* **I'm submitting a ...**
4+
[ ] bug report
5+
[ ] feature request
6+
[ ] question about the decisions made in the repository
7+
8+
* **Do you want to request a *feature* or report a *bug*?**
9+
10+
11+
12+
* **What is the current behavior?**
13+
14+
15+
16+
* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem** via
17+
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
18+
19+
20+
21+
* **What is the expected behavior?**
22+
23+
24+
25+
* **What is the motivation / use case for changing the behavior?**
26+
27+
28+
29+
* **Please tell us about your environment:**
30+
31+
- Angular version: 2.0.0-beta.X
32+
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
33+
34+
35+
36+
* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

.github/PULL_REQUEST_TEMPLATE.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
2+
3+
4+
5+
* **What is the current behavior?** (You can also link to an open issue here)
6+
7+
8+
9+
* **What is the new behavior (if this is a feature change)?**
10+
11+
12+
13+
* **Other information**:

.gitignore

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# @AngularClass
2+
3+
# Logs
4+
logs
5+
*.log
6+
7+
# Runtime data
8+
pids
9+
*.pid
10+
*.seed
11+
12+
# Directory for instrumented libs generated by jscoverage/JSCover
13+
lib-cov
14+
15+
# Coverage directory used by tools like istanbul
16+
coverage
17+
18+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
19+
.grunt
20+
21+
# Compiled binary addons (http://nodejs.org/api/addons.html)
22+
build/Release
23+
24+
# Users Environment Variables
25+
.lock-wscript
26+
27+
# OS generated files #
28+
.DS_Store
29+
ehthumbs.db
30+
Icon?
31+
Thumbs.db
32+
33+
# Node Files #
34+
/node_modules
35+
/bower_components
36+
npm-debug.log
37+
38+
# Coverage #
39+
/coverage/
40+
41+
# Typing #
42+
/src/typings/tsd/
43+
/typings/
44+
/tsd_typings/
45+
46+
# Dist #
47+
/dist
48+
/public/__build__/
49+
/src/*/__build__/
50+
/__build__/**
51+
/public/dist/
52+
/src/*/dist/
53+
/dist/**
54+
.webpack.json
55+
56+
# Doc #
57+
/doc/
58+
59+
# IDE #
60+
.idea/
61+
*.swp

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: node_js
2+
node_js:
3+
- "4"
4+
- "5"
5+
- "node"
6+
7+
sudo: false

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015-2016 AngularClass LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

config/github-deploy/index.js

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
const helpers = require('../helpers');
2+
const execSync = require('child_process').execSync;
3+
4+
const REPO_NAME_RE = /Push URL: https:\/\/github\.com\/.*\/(.*)\.git/;
5+
6+
function getWebpackConfigModule() {
7+
if (helpers.hasProcessFlag('github-dev')) {
8+
return require('../webpack.dev.js');
9+
} else if (helpers.hasProcessFlag('github-prod')) {
10+
return require('../webpack.prod.js');
11+
} else {
12+
throw new Error('Invalid compile option.');
13+
}
14+
}
15+
16+
function getRepoName(remoteName) {
17+
remoteName = remoteName || 'origin';
18+
19+
var stdout = execSync('git remote show ' + remoteName),
20+
match = REPO_NAME_RE.exec(stdout);
21+
22+
if (!match) {
23+
throw new Error('Could not find a repository on remote ' + remoteName);
24+
} else {
25+
return match[1];
26+
}
27+
}
28+
29+
function stripTrailing(str, char) {
30+
31+
if (str[0] === char) {
32+
str = str.substr(1);
33+
}
34+
35+
if(str.substr(-1) === char) {
36+
str = str.substr(0, str.length - 1);
37+
}
38+
39+
return str;
40+
}
41+
42+
/**
43+
* Given a string remove trailing slashes and adds 1 slash at the end of the string.
44+
*
45+
* Example:
46+
* safeUrl('/value/')
47+
* // 'value/'
48+
*
49+
* @param url
50+
* @returns {string}
51+
*/
52+
function safeUrl(url) {
53+
const stripped = stripTrailing(url || '', '/');
54+
return stripped ? stripped + '/' : ''
55+
}
56+
57+
exports.getWebpackConfigModule = getWebpackConfigModule;
58+
exports.getRepoName = getRepoName;
59+
exports.safeUrl = safeUrl;

config/head-config.common.js

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* Configuration for head elements added during the creation of index.html.
3+
*
4+
* All href attributes are added the publicPath (if exists) by default.
5+
* You can explicitly hint to prefix a publicPath by setting a boolean value to a key that has
6+
* the same name as the attribute you want to operate on, but prefix with =
7+
*
8+
* Example:
9+
* { name: "msapplication-TileImage", content: "/assets/icon/ms-icon-144x144.png", "=content": true },
10+
* Will prefix the publicPath to content.
11+
*
12+
* { rel: "apple-touch-icon", sizes: "57x57", href: "/assets/icon/apple-icon-57x57.png", "=href": false },
13+
* Will not prefix the publicPath on href (href attributes are added by default
14+
*
15+
*/
16+
module.exports = {
17+
link: [
18+
/** <link> tags for "apple-touch-icon" (AKA Web Clips). **/
19+
{ rel: "apple-touch-icon", sizes: "57x57", href: "/assets/icon/apple-icon-57x57.png" },
20+
{ rel: "apple-touch-icon", sizes: "60x60", href: "/assets/icon/apple-icon-60x60.png" },
21+
{ rel: "apple-touch-icon", sizes: "72x72", href: "/assets/icon/apple-icon-72x72.png" },
22+
{ rel: "apple-touch-icon", sizes: "76x76", href: "/assets/icon/apple-icon-76x76.png" },
23+
{ rel: "apple-touch-icon", sizes: "114x114", href: "/assets/icon/apple-icon-114x114.png" },
24+
{ rel: "apple-touch-icon", sizes: "120x120", href: "/assets/icon/apple-icon-120x120.png" },
25+
{ rel: "apple-touch-icon", sizes: "144x144", href: "/assets/icon/apple-icon-144x144.png" },
26+
{ rel: "apple-touch-icon", sizes: "152x152", href: "/assets/icon/apple-icon-152x152.png" },
27+
{ rel: "apple-touch-icon", sizes: "180x180", href: "/assets/icon/apple-icon-180x180.png" },
28+
29+
/** <link> tags for android web app icons **/
30+
{ rel: "icon", type: "image/png", sizes: "192x192", href: "/assets/icon/android-icon-192x192.png" },
31+
32+
/** <link> tags for favicons **/
33+
{ rel: "icon", type: "image/png", sizes: "32x32", href: "/assets/icon/favicon-32x32.png" },
34+
{ rel: "icon", type: "image/png", sizes: "96x96", href: "/assets/icon/favicon-96x96.png" },
35+
{ rel: "icon", type: "image/png", sizes: "16x16", href: "/assets/icon/favicon-16x16.png" },
36+
37+
/** <link> tags for a Web App Manifest **/
38+
{ rel: "manifest", href: "/assets/manifest.json" }
39+
],
40+
meta: [
41+
{ name: "msapplication-TileColor", content: "#00bcd4" },
42+
{ name: "msapplication-TileImage", content: "/assets/icon/ms-icon-144x144.png", "=content": true },
43+
{ name: "theme-color", content: "#00bcd4" }
44+
]
45+
};

config/helpers.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* @author: @AngularClass
3+
*/
4+
var path = require('path');
5+
6+
// Helper functions
7+
var ROOT = path.resolve(__dirname, '..');
8+
9+
function hasProcessFlag(flag) {
10+
return process.argv.join('').indexOf(flag) > -1;
11+
}
12+
13+
function isWebpackDevServer() {
14+
return process.argv[1] && !! (/webpack-dev-server$/.exec(process.argv[1]));
15+
}
16+
17+
function root(args) {
18+
args = Array.prototype.slice.call(arguments, 0);
19+
return path.join.apply(path, [ROOT].concat(args));
20+
}
21+
22+
function checkNodeImport(context, request, cb) {
23+
if (!path.isAbsolute(request) && request.charAt(0) !== '.') {
24+
cb(null, 'commonjs ' + request); return;
25+
}
26+
cb();
27+
}
28+
29+
exports.hasProcessFlag = hasProcessFlag;
30+
exports.isWebpackDevServer = isWebpackDevServer;
31+
exports.root = root;
32+
exports.checkNodeImport = checkNodeImport;

0 commit comments

Comments
 (0)