Skip to content

Instantly share code, notes, and snippets.

View cyrilletuzi's full-sized avatar

Cyrille Tuzi cyrilletuzi

View GitHub Profile
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
@NgModule({
imports: [CommonModule]
})
export class AmazingModule {}
import { NgModule } from '@angular/core';
import { PrivateComponent } from './private.component';
import { PublicComponent } from './public.component';
@NgModule({
declarations: [
PrivateComponent,
PublicComponent
],
export { AmazingModule } from './amazing.module';
export { AmazingComponent } from './amazing.component';
export { AmazingService } from './amazing.service';
{
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"stripInternal": true,
"experimentalDecorators": true,
"strictNullChecks": true,
"noImplicitAny": true,
"module": "es2015",
"moduleResolution": "node",
export default {
entry: 'dist/index.js',
dest: 'dist/bundles/amazing.umd.js',
sourceMap: false,
format: 'umd',
moduleName: 'ng.amazing',
globals: {
'@angular/core': 'ng.core',
'rxjs/Observable': 'Rx',
'rxjs/ReplaySubject': 'Rx',
{
"scripts": {
"transpile": "ngc",
"package": "rollup -c",
"minify": "uglifyjs dist/bundles/amazing.umd.js --screw-ie8 --compress --mangle --comments --output dist/bundles/amazing.umd.min.js",
"build": "npm run transpile && npm run package && npm run minify"
}
}
{
"name": "angular-amazing",
"version": "1.0.0",
"description": "An amazing module for Angular.",
"main": "bundles/amazing.umd.js",
"module": "index.js",
"typings": "index.d.ts",
"keywords": [
"angular",
"angular2",
<!doctype html>
<!-- Bad structure -->
<div>Logo (on the left)</div>
<div>Menu (on the right)</div>
<div>Article 1</div>
<div>Article 2</div>
<div>Sidebar</div>
<div>Footer</div>
<meta charset="utf-8">