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
{ | |
"compilerOptions": { | |
"target": "es5", | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"sourceMap": true, | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"removeComments": false, | |
"noImplicitAny": false, |
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 '@angular/platform-browser'; | |
import '@angular/core'; | |
import '@angular/common'; | |
import '@angular/http'; | |
import '@angular/router'; | |
import '@angular/forms'; | |
// RxJS | |
import 'rxjs'; |
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
// boot-aot.ts | |
import {platformBrowser} from "@angular/platform-browser"; | |
import {AppModuleNgFactory} from "../aot/app/app.module.ngfactory"; | |
import { enableProdMode } from '@angular/core'; | |
declare var process; | |
if (process.env.ENV === 'production') { | |
console.log("PROD MODE"); | |
enableProdMode(); | |
} | |
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory); |
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
plugins: [ | |
new webpack.optimize.CommonsChunkPlugin({ | |
name: ['app', 'vendor', 'polyfills'] | |
}), | |
new HtmlWebpackPlugin({ | |
template: 'config/index.html' | |
}), | |
// minifies our code | |
new webpack.optimize.UglifyJsPlugin({ | |
beautify: false, |
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
const path = require('path'); | |
const webpack = require('webpack'); | |
const helpers = require('./helpers'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; | |
module.exports = { | |
entry: { | |
polyfills: './app/polyfills.ts', | |
vendor: './app/vendor.ts', | |
app: './app/boot.ts' |
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 webpack = require('webpack'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var helpers = require('./helpers'); | |
var path = require('path'); | |
module.exports = { | |
devtool: 'cheap-module-eval-source-map', | |
entry: { | |
'polyfills': './app/polyfills.ts', | |
'vendor': './app/vendor.ts', | |
'app': './app/boot.ts' |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es5", | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"sourceMap": true, | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"removeComments": false, | |
"noImplicitAny": false, |
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
// boot.ts | |
import {platformBrowserDynamic} from "@angular/platform-browser-dynamic"; | |
import {enableProdMode} from "@angular/core"; | |
import {AppModule} from "./app.module"; | |
declare var process; | |
if (process.env.ENV === 'production') { | |
enableProdMode(); | |
} | |
platformBrowserDynamic().bootstrapModule(AppModule); | |
// app.module.ts |
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 React, {Component} from "react"; | |
import {AgGridReact} from "ag-grid-react"; | |
import {connect} from "react-redux"; | |
class SimpleGridExample extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
columnDefs: this.createColumnDefs() | |
} | |
} |
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
// src/index.js | |
'use strict'; | |
import React from "react"; | |
import {render} from "react-dom"; | |
import {Provider} from "react-redux"; | |
import {createStore} from "redux"; | |
// pull in the ag-grid styles we're interested in | |
import "ag-grid-root/dist/styles/ag-grid.css"; | |
import "ag-grid-root/dist/styles/ag-theme-fresh.css"; | |
// only necessary if you're using ag-Grid-Enterprise features |