This file contains hidden or 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
import * as nodePath from 'path'; | |
import paths from 'tsconfig-paths'; | |
import * as tsconfig from 'tsconfig-extends'; | |
import Project from 'ts-simple-ast'; | |
// use `tsconfig-extends` module cause it can recursively apply "extends" field | |
const compilerOptions = tsconfig.load_file_sync('./tsconfig.json'); | |
const absoluteBaseUrl = nodePath.join(process.cwd(), compilerOptions.baseUrl); | |
const matchPathFunc = paths.createMatchPath(absoluteBaseUrl, compilerOptions.paths || {}); | |
const project = new Project({ compilerOptions }); |
This file contains hidden or 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
// In case of Angular, this is the component that contains a view with a <RadSideDrawer> | |
export class MenuComponent implements AfterViewInit { | |
@ViewChild(RadSideDrawerComponent) public drawerComponent: RadSideDrawerComponent; | |
private _drawer: SideDrawerType; | |
ngAfterViewInit(): void { | |
this._drawer = this.drawerComponent.sideDrawer; | |
this._changeDetectionRef.detectChanges(); |
This file contains hidden or 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
// angular | |
import {Component} from '@angular/core'; | |
@Component({ | |
moduleId: module.id, | |
selector: 'app', | |
template: ` | |
<StackLayout> | |
<page-router-outlet></page-router-outlet> | |
</StackLayout> |
This file contains hidden or 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
var pkg = require('./package.json'); | |
var path = require('path'); | |
var Builder = require('systemjs-builder'); | |
var name = pkg.name; | |
var builder = new Builder(); | |
var config = { | |
baseURL: '.', | |
transpiler: 'typescript', | |
typescriptOptions: { |
This file contains hidden or 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
# Change YOUR_TOKEN to your prerender token | |
# Change http://example.com (at the end of the last RewriteRule) to your website url | |
<IfModule mod_headers.c> | |
RequestHeader set X-Prerender-Token "YOUR_TOKEN" | |
</IfModule> | |
<IfModule mod_rewrite.c> | |
RewriteEngine On |