Skip to content

Commit b42f5a1

Browse files
committed
initial commit
1 parent 0f166a0 commit b42f5a1

Some content is hidden

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

55 files changed

+894
-3
lines changed

.editorconfig

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

.gitignore

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Node
2+
node_modules/*
3+
npm-debug.log
4+
5+
# TypeScript
6+
src/*.js
7+
src/*.map
8+
src/*.d.ts
9+
10+
# JetBrains
11+
.idea
12+
.project
13+
.settings
14+
.idea/*
15+
*.iml
16+
17+
# VS Code
18+
.vscode/*
19+
20+
# Windows
21+
Thumbs.db
22+
Desktop.ini
23+
24+
# Mac
25+
.DS_Store
26+
**/.DS_Store
27+
28+
# Ngc generated files
29+
**/*.ngfactory.ts
30+
31+
# Build files
32+
dist/*
33+
34+
# Playground tmp files
35+
.playground
36+
/.tmp
37+
/build
38+
/dist
39+
/node_modules
40+
/.playground
41+
/dll
42+
/package-lock.json

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "tools"]
2+
path = tools
3+
url = git@github.com:Firestitch/component-tools.git

.npmignore

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Node
2+
node_modules/*
3+
npm-debug.log
4+
docs/*
5+
# DO NOT IGNORE TYPESCRIPT FILES FOR NPM
6+
# TypeScript
7+
# *.js
8+
# *.map
9+
# *.d.ts
10+
11+
# JetBrains
12+
.idea
13+
.project
14+
.settings
15+
.idea/*
16+
*.iml
17+
18+
# VS Code
19+
.vscode/*
20+
21+
# Windows
22+
Thumbs.db
23+
Desktop.ini
24+
25+
# Mac
26+
.DS_Store
27+
**/.DS_Store
28+
29+
# Ngc generated files
30+
**/*.ngfactory.ts
31+
32+
# Library files
33+
build/*
34+
dll/
35+
playground/
36+
37+

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ For create your own library just start coding into `./src` folder and test how i
1717
Folders in `src` folder must contain `index.ts` files which contain exports for all your components/services and etc. like in this example.
1818

1919
### Commands:
20-
- `npm run serve` - for start webpack developer server
20+
- `npm run serve` - Starts the playground web server
2121

22-
- `npm run lint` - for check before upload to NPM
22+
- `npm run lint` - Validates the package
2323

24-
- `npm run package` - for build your package for NPM
24+
- `npm run release` - Builds the release directory for publishing to NPM
2525

package.json

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"name": "@firestitch/fs-playground",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "release/index.js",
6+
"typings": "release/index.d.ts",
7+
"scripts": {
8+
"test": "echo \"Error: no test specified\" && exit 1",
9+
"clean:build": "rimraf build",
10+
"clean:release": "rimraf release",
11+
"copy:build": "cpx -v \"src/**/*\" \"build\"",
12+
"copy:styles": "cpx -v \"build/**/*.css\" \"release\"",
13+
"copy:templates": "cpx -v \"build/**/*.html\" \"release\"",
14+
"release": "npm-run-all -s clean:build clean:release copy:build build:sass release:replace-scss release:aot build:release copy:styles copy:templates release:minify clean:build",
15+
"release:aot": "ngc -p tsconfig.aot.json",
16+
"release:replace-scss": "node ./tools/replace-scss.js",
17+
"release:dev": "webpack --config=tools/webpack.dev.js --progress --profile --watch",
18+
"release:minify": "uglifyjs release/index.js --source-map --compress --mangle --screw-ie8 --output release/index.min.js",
19+
"build:release": "webpack --config=tools/webpack.release.js --progress --profile",
20+
"build:sass": "node-sass -r build/ -o build/ || true",
21+
"serve": "webpack-dev-server --config=tools/webpack.playground.js --progress --profile --watch",
22+
"lint": "tslint 'src/**/*.ts' -p ./tslint.json"
23+
},
24+
"repository": {
25+
"type": "git",
26+
"url": "git@github.com:Firestitch/fs-playground.git"
27+
},
28+
"author": "Eugene Kubesh",
29+
"license": "ISC",
30+
"dependencies": {
31+
"@angular/animations": "^5.2.0",
32+
"@angular/common": "^5.2.0",
33+
"@angular/compiler": "^5.2.0",
34+
"@angular/compiler-cli": "^5.2.0",
35+
"@angular/core": "^5.2.0",
36+
"@angular/forms": "^5.2.0",
37+
"@angular/material": "^5.0.4",
38+
"@angular/platform-browser": "^5.2.0",
39+
"@angular/platform-browser-dynamic": "^5.2.0",
40+
"core-js": "^2.5.3",
41+
"rxjs": "^5.5.6",
42+
"zone.js": "^0.8.20"
43+
},
44+
"devDependencies": {
45+
"@angular/animations": "^5.2.0",
46+
"@angular/common": "^5.2.0",
47+
"@angular/compiler": "^5.2.0",
48+
"@angular/compiler-cli": "^5.2.0",
49+
"@angular/core": "^5.2.0",
50+
"@angular/forms": "^5.2.0",
51+
"@angular/material": "^5.0.4",
52+
"@angular/platform-browser": "^5.2.0",
53+
"@angular/platform-browser-dynamic": "^5.2.0",
54+
"core-js": "^2.5.3",
55+
"rxjs": "^5.5.6",
56+
"zone.js": "^0.8.20",
57+
"@angular/cdk": "^5.0.4",
58+
"@types/node": "^9.3.0",
59+
"angular-router-loader": "^0.8.2",
60+
"angular2-template-loader": "^0.6.2",
61+
"autoprefixer": "^7.2.5",
62+
"awesome-typescript-loader": "^3.4.1",
63+
"clean-webpack-plugin": "^0.1.17",
64+
"codelyzer": "^4.0.2",
65+
"copy-webpack-plugin": "^4.3.1",
66+
"cpx": "^1.5.0",
67+
"css-loader": "^0.28.8",
68+
"css-to-string-loader": "^0.1.3",
69+
"extract-text-webpack-plugin": "^3.0.2",
70+
"file-loader": "^1.1.6",
71+
"html-webpack-plugin": "^2.30.1",
72+
"node-sass": "^4.7.2",
73+
"npm-run-all": "^4.1.2",
74+
"postcss-cssnext": "^3.0.2",
75+
"postcss-flexbugs-fixes": "^3.2.0",
76+
"postcss-loader": "^2.0.10",
77+
"pre-build-webpack": "^0.1.0",
78+
"raw-loader": "^0.5.1",
79+
"replace": "^0.3.0",
80+
"resolve-url-loader": "^2.2.1",
81+
"sass-loader": "^6.0.6",
82+
"string-replace-loader": "^1.3.0",
83+
"style-loader": "^0.19.1",
84+
"to-string-loader": "^1.1.5",
85+
"tslint": "^5.9.1",
86+
"typescript": "^2.5.1",
87+
"uglifyjs": "^2.4.11",
88+
"webpack": "^3.10.0",
89+
"webpack-dev-server": "^2.11.0",
90+
"webpack-dll-bundles-plugin": "^1.0.0-beta.5",
91+
"webpack-merge": "^4.1.1"
92+
}
93+
}

playground/app/app.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<fs-test-component></fs-test-component>

playground/app/app.component.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Component } from '@angular/core';
2+
import { FsTestService } from '../../src';
3+
4+
5+
@Component({
6+
selector: 'fs-app-root',
7+
templateUrl: 'app.component.html',
8+
styleUrls: [ '../styles/styles.scss' ]
9+
})
10+
export class AppComponent {
11+
12+
constructor(private _test: FsTestService) {
13+
_test.sayHello();
14+
}
15+
16+
}

playground/app/components/.gitkeep

Whitespace-only changes.

playground/assets/.gitkeep

Whitespace-only changes.

playground/index.html

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="x-ua-compatible" content="ie=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<title></title>
8+
<base href="/">
9+
</head>
10+
11+
<body>
12+
13+
<fs-app-root>
14+
Loading...
15+
</fs-app-root>
16+
17+
<!-- Scripts will be injected by webpack here -->
18+
</body>
19+
</html>

playground/main.ts

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { PlaygroundModule } from './playground.module';
2+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3+
import { enableDebugTools } from '@angular/platform-browser';
4+
import { ApplicationRef, NgModuleRef } from '@angular/core';
5+
6+
/**
7+
* Bootstrap our Angular app with a top level NgModule
8+
*/
9+
export function main() {
10+
platformBrowserDynamic()
11+
.bootstrapModule(PlaygroundModule)
12+
.then(decorateModuleRef)
13+
.catch((err) => console.error(err));
14+
}
15+
16+
17+
/**
18+
* Needed for hmr
19+
* in prod this is replace for document ready
20+
*/
21+
switch (document.readyState) {
22+
case 'loading':
23+
document.addEventListener('DOMContentLoaded', _domReadyHandler, false);
24+
break;
25+
case 'interactive':
26+
case 'complete':
27+
default:
28+
main();
29+
}
30+
31+
function _domReadyHandler() {
32+
document.removeEventListener('DOMContentLoaded', _domReadyHandler, false);
33+
main();
34+
}
35+
36+
function decorateModuleRef(modRef: NgModuleRef<any>) {
37+
const appRef = modRef.injector.get(ApplicationRef);
38+
const cmpRef = appRef.components[0];
39+
40+
let _ng = (<any>window).ng;
41+
enableDebugTools(cmpRef);
42+
(<any>window).ng.probe = _ng.probe;
43+
(<any>window).ng.coreTokens = _ng.coreTokens;
44+
return modRef;
45+
}

playground/playground.module.ts

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import './vendor.scss';
2+
3+
import { NgModule } from '@angular/core';
4+
import { AppComponent } from './app/app.component';
5+
import { BrowserModule } from '@angular/platform-browser';
6+
import { FsTestModule } from '../src';
7+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
8+
9+
@NgModule({
10+
bootstrap: [ AppComponent ],
11+
imports: [
12+
// Angular
13+
BrowserModule,
14+
FsTestModule,
15+
BrowserAnimationsModule,
16+
],
17+
entryComponents: [
18+
],
19+
declarations: [
20+
AppComponent
21+
],
22+
providers: [
23+
],
24+
})
25+
export class PlaygroundModule {
26+
}

playground/polyfills.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import 'core-js/es6/reflect';
2+
import 'core-js/es7/reflect';
3+
4+
5+
import 'zone.js/dist/zone';

playground/styles/styles.scss

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
p {
2+
font-weight: 600;
3+
}

playground/vendor.scss

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';

postcss.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: [
3+
require('postcss-cssnext')(),
4+
require('postcss-flexbugs-fixes')(),
5+
]
6+
};

release/assets/.gitkeep

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export declare class FsTestComponentComponent {
2+
constructor();
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p class="test-component">My test Component</p>

release/components/fs-test-component/fs-test-component.component.js

+27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/components/fs-test-component/fs-test-component.component.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"__symbolic":"module","version":4,"metadata":{"FsTestComponentComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"fs-test-component","templateUrl":"fs-test-component.component.html","styleUrls":["../../styles.css"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]}}}}]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './fs-test-component.component';

release/components/fs-test-component/index.js

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/components/fs-test-component/index.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./fs-test-component.component"}]}]

0 commit comments

Comments
 (0)