Created
November 24, 2016 11:57
-
-
Save jordic/88550ab34c18a5611584572c540e278e to your computer and use it in GitHub Desktop.
Debug NG Build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// declare var ENV: string; | |
import 'reflect-metadata'; | |
import { enableProdMode } from '@angular/core'; | |
import { platformBrowser } from '@angular/platform-browser'; | |
import { AppModuleNgFactory } from './app/app.module.ngfactory'; | |
// if ('production' === ENV) { | |
// enableProdMode(); | |
// } | |
export function main() { | |
return platformBrowser().bootstrapModuleFactory(AppModuleNgFactory) | |
.catch(err => console.log(err)); | |
} | |
export function bootstrapDomReady() { | |
document.addEventListener('DOMContentLoaded', main); | |
} | |
bootstrapDomReady(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ramfs: | |
rm -r tmp | |
mkdir tmp | |
sudo mount -t tmpfs -o size=512m tmpfs ./tmp | |
clean: | |
rm -r tmp/* | |
rm dist/build.js | |
build: | |
cp -r src/* tmp/ | |
rm tmp/main.ts | |
cp tmp/main.aot.ts tmp/main.ts | |
node_modules/.bin/node-sass --include-path node_modules tmp/styles.scss > tmp/styles.css | |
rm tmp/styles.scss | |
rm -r tmp/scss | |
node_modules/.bin/node-sass tmp/ --output tmp --include-path node_modules | |
find tmp -name "*.scss" -type f -delete | |
find tmp -name "*.css" -exec rename 's/css/scss/' '{}' \; | |
node_modules/.bin/ngc -p tsconfig.aot.json | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"declaration": false, | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"allowSyntheticDefaultImports": true, | |
"lib": ["es5", "dom"], | |
"mapRoot": "./", | |
"module": "es6", | |
"moduleResolution": "node", | |
"outDir": "../dist/out-tsc", | |
"sourceMap": true, | |
"target": "es5", | |
"typeRoots": [ | |
"../node_modules/@types" | |
] | |
}, | |
"files": [ | |
"./main.ts", | |
"../typings/index.d.ts" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment