Skip to content
Snippets Groups Projects
Commit 6584afc2 authored by Xiao Gui's avatar Xiao Gui
Browse files

changes to config for aot

parent 1be2ee0c
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ export class ReadmoreComponent implements OnChanges{
}
private toggle(event:MouseEvent){
public toggle(event:MouseEvent){
this.show = !this.show
event.stopPropagation()
event.preventDefault()
......
import { Component } from "@angular/core";
@Component({
selector : `examples`,
templateUrl : './examples.template.html',
styleUrls : [
`./examples.style.css`
]
})
export class Examples{
}
\ No newline at end of file
layouts-example
{
width:100%;
}
\ No newline at end of file
<layouts-example>
</layouts-example>
\ No newline at end of file
import 'zone.js'
import { ComponentsModule } from './components/components.module'
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
import { MainModule } from './main.module';
platformBrowserDynamic().bootstrapModule(ComponentsModule)
\ No newline at end of file
platformBrowserDynamic().bootstrapModule(MainModule)
\ No newline at end of file
......@@ -22,6 +22,7 @@ import { ModalUnit } from "./atlasViewer/modalUnit/modalUnit.component";
import { AtlasViewerURLService } from "./atlasViewer/atlasViewer.urlService.service";
import { ToastComponent } from "./components/toast/toast.component";
import { GetFilenameFromPathnamePipe } from "./util/pipes/getFileNameFromPathName.pipe";
import { FilterNameBySearch } from "./util/pipes/filterNameBySearch.pipe";
@NgModule({
imports : [
......@@ -59,7 +60,8 @@ import { GetFilenameFromPathnamePipe } from "./util/pipes/getFileNameFromPathNam
/* pipes */
GetNamesPipe,
GetNamePipe,
GetFilenameFromPathnamePipe
GetFilenameFromPathnamePipe,
FilterNameBySearch
],
entryComponents : [
WidgetUnit,
......
......@@ -239,6 +239,7 @@ export interface File{
url? : string
data? : any
targetParcellation : string
properties : any
}
export interface Property{
......
......@@ -50,7 +50,8 @@ import { SafeStylePipe } from "../util/pipes/safeStyle.pipe";
CopyPropertyPipe,
GetUniqueProperty,
FilterDataEntriesbyType,
SafeStylePipe
SafeStylePipe,
],
entryComponents : [
......
import { Pipe, PipeTransform } from "@angular/core";
import { DataEntry } from "../../services/stateStore.service";
@Pipe({
name : 'filterDatasetSearchResult'
})
export class FilterDatasetSearchResult implements PipeTransform{
public transform(datasets:DataEntry[],filterArr:{name:string,enabled:boolean}[]):DataEntry[]{
return datasets.filter(dataset=>{
const filter = filterArr.find(obj=>obj.name == dataset.type)
return filter ? filter.enabled : false
})
}
}
\ No newline at end of file
......@@ -8,7 +8,6 @@ const ClosureCompilerPlugin = require('webpack-closure-compiler')
module.exports = {
entry : './src/main-aot.ts',
mode : "development",
output : {
filename : 'main.js',
path : path.resolve(__dirname,'dist/aot')
......@@ -24,15 +23,6 @@ module.exports = {
}
}
},
{
test : /export_nehuba.*?.css$/,
use : {
loader : 'file-loader',
options: {
name : '[name].[ext]'
}
}
},
{
test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
// test : /\.ts$/,
......@@ -49,18 +39,12 @@ module.exports = {
]
},
plugins : [
new ClosureCompilerPlugin({
compiler : {
compilation_level : 'whitespace_only'
},
concurrency : 4
}),
new HtmlWebpackPlugin({
template : 'src/index.html'
}),
new AngularCompilerPlugin({
tsConfigPath: 'tsconfig-aot.json',
entryModule: 'src/components/components.module#ComponentsModule'
entryModule: 'src/main.module#MainModule'
})
],
resolve : {
......
......@@ -3,9 +3,9 @@ const merge = require('webpack-merge')
const Uglify = require('uglifyjs-webpack-plugin')
const path = require('path')
const ClosureCompilerPlugin = require('webpack-closure-compiler')
const ngAssets = require('./webpack.ngassets')
module.exports = merge(common,{
mode : 'production',
module.exports = merge(common,ngAssets,{
entry : './src/main.ts',
output : {
filename : 'main.js',
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment