diff --git a/.editorconfig b/.editorconfig index 869ff6c5..f1cc3ad3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,3 @@ -# @AngularClass # http://editorconfig.org root = true diff --git a/.gitignore b/.gitignore index f6734a37..7717c3d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -# @AngularClass - # Logs logs *.log @@ -54,6 +52,8 @@ npm-debug.log .webpack.json /build /build/** +/compiled +/dll # Doc # /doc/ @@ -61,3 +61,9 @@ npm-debug.log # IDE # .idea/ *.swp + +# Angular # +*.ngfactory.ts +*.css.shim.ts +*.ngsummary.json +*.shim.ngstyle.ts diff --git a/config/helpers.js b/config/helpers.js index bf26f8fa..9082dd7a 100644 --- a/config/helpers.js +++ b/config/helpers.js @@ -1,6 +1,3 @@ -/** - * @author: @AngularClass - */ var path = require('path'); const EVENT = process.env.npm_lifecycle_event || ''; diff --git a/config/webpack.common.js b/config/webpack.common.js index 8b4fb21c..8ef3dded 100644 --- a/config/webpack.common.js +++ b/config/webpack.common.js @@ -90,17 +90,6 @@ module.exports = function (options) { module: { rules: [ - { - test: /\.ts$/, - loader: 'string-replace-loader', - query: { - search: /(System|SystemJS)(.*[\n\r]\s*\.|\.)import\((.+)\)/g, - replace: '$1.import($3).then(mod => (mod.__esModule && mod.default) ? mod.default : mod)' - }, - include: [helpers.root('src')], - enforce: 'pre' - }, - /* * Typescript loader support for .ts and Angular 2 async routes via .async.ts * Replace templateUrl and stylesUrl with require() @@ -114,7 +103,14 @@ module.exports = function (options) { '@angularclass/hmr-loader?pretty=' + !isProd + '&prod=' + isProd, 'awesome-typescript-loader?{configFileName: "tsconfig.webpack.json"}', 'angular2-template-loader', - 'angular-router-loader?loader=system&genDir=compiled/src/app&aot=' + AOT + { + loader: 'ng-router-loader', + options: { + loader: 'async-system', + genDir: 'compiled', + aot: AOT + } + } ], exclude: [/\.(spec|e2e)\.ts$/] }, @@ -130,13 +126,12 @@ module.exports = function (options) { }, /* - * to string and css loader support for *.css files + * to string and css loader support for *.css files (from Angular components) * Returns file content as string * */ { test: /\.css$/, - // loaders: ['to-string-loader', 'css-loader'] use: ['raw-loader'] }, @@ -188,10 +183,6 @@ module.exports = function (options) { ] }, - resolveLoader: { - moduleExtensions: ['-loader'] - }, - /* * Add additional plugins to the compiler. * @@ -227,9 +218,9 @@ module.exports = function (options) { }), // This enables tree shaking of the vendor modules new CommonsChunkPlugin({ - name: 'vendor', - chunks: ['main'], - minChunks: module => /node_modules\//.test(module.resource) + name: 'vendor', + chunks: ['main'], + minChunks: module => /node_modules\//.test(module.resource) }), // Specify the correct order the scripts will be injected in new CommonsChunkPlugin({ @@ -259,9 +250,9 @@ module.exports = function (options) { * See: https://www.npmjs.com/package/copy-webpack-plugin */ new CopyWebpackPlugin([ - { from: 'src/assets', to: 'assets' }, - { from: 'node_modules/ckeditor', to: 'ckeditor' }, - { from: 'src/meta'} + {from: 'src/assets', to: 'assets'}, + {from: 'node_modules/ckeditor', to: 'ckeditor'}, + {from: 'src/meta'} ]), /* @@ -365,11 +356,11 @@ module.exports = function (options) { helpers.root('node_modules/@angular/core/src/facade/math.js') ), - new ngcWebpack.NgcWebpackPlugin({ - disabled: !AOT, - tsConfig: helpers.root('tsconfig.webpack.json'), - resourceOverride: helpers.root('config/resource-override.js') - }) + new ngcWebpack.NgcWebpackPlugin({ + disabled: !AOT, + tsConfig: helpers.root('tsconfig.webpack.json'), + resourceOverride: helpers.root('config/resource-override.js') + }) ], /* diff --git a/config/webpack.dev.js b/config/webpack.dev.js index 2156a480..471358ab 100644 --- a/config/webpack.dev.js +++ b/config/webpack.dev.js @@ -1,11 +1,13 @@ const helpers = require('./helpers'); const path = require('path'); const webpackMerge = require('webpack-merge'); // used to merge webpack configs +const webpackMergeDll = webpackMerge.strategy({plugins: 'replace'}); const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev /** * Webpack Plugins */ +const AddAssetHtmlPlugin = require('add-asset-html-webpack-plugin'); const DefinePlugin = require('webpack/lib/DefinePlugin'); const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin'); const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin'); @@ -24,6 +26,8 @@ const METADATA = webpackMerge(commonConfig({env: ENV}).metadata, { HMR: HMR }); +const DllBundlesPlugin = require('webpack-dll-bundles-plugin').DllBundlesPlugin; + /** * Webpack configuration * @@ -103,6 +107,52 @@ module.exports = function (options) { } }), + new DllBundlesPlugin({ + bundles: { + polyfills: [ + 'core-js', + { + name: 'zone.js', + path: 'zone.js/dist/zone.js' + }, + { + name: 'zone.js', + path: 'zone.js/dist/long-stack-trace-zone.js' + }, + 'ts-helpers', + ], + vendor: [ + '@angular/platform-browser', + '@angular/platform-browser-dynamic', + '@angular/core', + '@angular/common', + '@angular/forms', + '@angular/http', + '@angular/router', + '@angularclass/hmr', + 'rxjs', + ] + }, + dllDir: helpers.root('dll'), + webpackConfig: webpackMergeDll(commonConfig({env: ENV}), { + devtool: 'cheap-module-source-map', + plugins: [] + }) + }), + + /** + * Plugin: AddAssetHtmlPlugin + * Description: Adds the given JS or CSS file to the files + * Webpack knows about, and put it into the list of assets + * html-webpack-plugin injects into the generated html. + * + * See: https://github.com/SimenB/add-asset-html-webpack-plugin + */ + new AddAssetHtmlPlugin([ + { filepath: helpers.root(`dll/${DllBundlesPlugin.resolveFile('polyfills')}`) }, + { filepath: helpers.root(`dll/${DllBundlesPlugin.resolveFile('vendor')}`) } + ]), + /** * Plugin: NamedModulesPlugin (experimental) * Description: Uses file names as module name. diff --git a/package.json b/package.json index 97067d1d..8f439747 100644 --- a/package.json +++ b/package.json @@ -6,33 +6,27 @@ "homepage": "http://akveo.github.io/ng2-admin/", "license": "MIT", "dependencies": { - - "@angular/common": "~2.4.1", - "@angular/compiler": "~2.4.1", - "@angular/core": "~2.4.1", - "@angular/forms": "~2.4.1", - "@angular/http": "~2.4.1", - "@angular/platform-browser": "~2.4.1", - "@angular/platform-browser-dynamic": "~2.4.1", - "@angular/platform-server": "~2.4.1", - "@angular/router": "~3.4.1", - + "@angular/common": "~2.4.3", + "@angular/compiler": "~2.4.3", + "@angular/core": "~2.4.3", + "@angular/forms": "~2.4.3", + "@angular/http": "~2.4.3", + "@angular/platform-browser": "~2.4.3", + "@angular/platform-browser-dynamic": "~2.4.3", + "@angular/platform-server": "~2.4.3", + "@angular/router": "~3.4.3", "@angularclass/conventions-loader": "^1.0.2", "@angularclass/hmr": "~1.2.2", "@angularclass/hmr-loader": "~3.0.2", - "amcharts3": "github:amcharts/amcharts3", "ammap3": "github:amcharts/ammap3", "animate.css": "^3.5.1", - "assets-webpack-plugin": "^3.4.0", "bootstrap": "4.0.0-alpha.4", - "bootstrap-loader": "2.0.0-beta.18", "chart.js": "^1.1.1", "chartist": "^0.9.7", "ckeditor": "4.6.0", "core-js": "^2.4.1", "easy-pie-chart": "^2.1.7", - "extract-text-webpack-plugin": "~2.0.0-beta.4", "font-awesome": "^4.6.3", "font-awesome-sass-loader": "^1.0.2", "fullcalendar": "^2.7.2", @@ -52,73 +46,74 @@ "ng2-tree": "^0.0.2-7", "ng2-uploader": "1.6.1", "normalize.css": "^4.1.1", - "postcss-loader": "^1.0.0", + "reflect-metadata": "^0.1.9", "rxjs": "~5.0.2", "tether": "^1.2.4", - "zone.js": "~0.7.4", - - "reflect-metadata": "^0.1.9" + "zone.js": "~0.7.4" }, "devDependencies": { - "@angular/compiler-cli": "~2.4.1", - "angular-router-loader": "^0.4.0", - "angular2-router-loader": "^0.3.4", - "angular2-template-loader": "^0.6.0", + "@angular/compiler-cli": "~2.4.3", "@types/electron": "^1.3.20", + "@types/fullcalendar": "^2.7.35", "@types/hammerjs": "^2.0.33", - "@types/jasmine": "^2.2.34", + "@types/jquery ": "^2.0.33", + "@types/jquery.slimscroll": "^1.3.30", + "@types/lodash": "0.0.28", "@types/node": "^6.0.38", "@types/source-map": "^0.1.27", "@types/uglify-js": "^2.0.27", "@types/webpack": "^2.0.0", - "@types/lodash": "0.0.28", - "@types/jquery ": "^2.0.33", - "@types/fullcalendar": "^2.7.35", - "@types/jquery.slimscroll": "^1.3.30", - "gh-pages": "^0.11.0", - "ngc-webpack": "1.1.0", - "npm-run-all": "^4.0.0", - "parse5": "^3.0.1", - "rimraf": "~2.5.4", - "script-ext-html-webpack-plugin": "^1.3.2", - "codelyzer": "~1.0.0-beta.4", - "tslint": "3.15.1", - "ts-helpers": "1.1.2", - "ts-node": "^2.0.0", - "typedoc": "^0.5.0", - "typescript": "2.0.10", - "awesome-typescript-loader": "~3.0.0-beta.17", - "tslint-loader": "^2.1.3", - "url-loader": "^0.5.7", - "style-loader": "^0.13.1", - "raw-loader": "0.5.1", - "source-map-loader": "^0.1.5", - "string-replace-loader": "1.0.5", - "imports-loader": "^0.7.0", - "json-loader": "^0.5.4", - "css-loader": "^0.25.0", - "exports-loader": "^0.6.3", - "expose-loader": "^0.7.1", - "file-loader": "^0.9.0", - "to-string-loader": "^1.1.4", - "sass-loader": "^4.1.1", - "resolve-url-loader": "^1.4.3", - "ng-router-loader": "^1.0.2", - "node-sass": "^4.1.1", - "html-webpack-plugin": "^2.21.0", - "copy-webpack-plugin": "^3.0.1", - "v8-lazy-parse-webpack-plugin": "^0.3.0", - "webpack": "2.2.0-rc.3", - "webpack-dashboard": "^0.1.8", - "webpack-dev-middleware": "^1.6.1", - "webpack-dev-server": "2.2.0-rc.0", - "webpack-md5-hash": "^0.0.5", - "webpack-merge": "^0.17.0", + "add-asset-html-webpack-plugin": "^1.0.2", + "angular2-template-loader": "^0.6.0", + "assets-webpack-plugin": "^3.5.1", + "awesome-typescript-loader": "~3.0.0-beta.18", + "bootstrap-loader": "2.0.0-beta.18", + "codelyzer": "~2.0.0-beta.4", "compression-webpack-plugin": "^0.3.1", + "copy-webpack-plugin": "^4.0.1", + "css-loader": "^0.26.1", + "electron": "^1.4.0", "es6-promise": "^3.1.2", "es6-shim": "^0.35.0", "es7-reflect-metadata": "^1.6.0", - "electron": "^1.4.0" + "exports-loader": "^0.6.3", + "expose-loader": "^0.7.1", + "extract-text-webpack-plugin": "~2.0.0-beta.5", + "file-loader": "^0.9.0", + "find-root": "^1.0.0", + "gh-pages": "^0.11.0", + "html-webpack-plugin": "^2.26.0", + "imports-loader": "^0.7.0", + "json-loader": "^0.5.4", + "ng-router-loader": "^1.0.2", + "ngc-webpack": "1.1.2", + "node-sass": "^4.3.0", + "npm-run-all": "^4.0.0", + "parse5": "^3.0.1", + "postcss-loader": "^1.0.0", + "raw-loader": "0.5.1", + "resolve-url-loader": "^1.4.3", + "rimraf": "~2.5.4", + "sass-loader": "^4.1.1", + "script-ext-html-webpack-plugin": "^1.5.0", + "source-map-loader": "^0.1.6", + "string-replace-loader": "1.0.5", + "style-loader": "^0.13.1", + "to-string-loader": "^1.1.4", + "ts-helpers": "1.1.2", + "ts-node": "^2.0.0", + "tslint": "~4.3.1", + "typedoc": "^0.5.3", + "typescript": "~2.1.5", + "url-loader": "^0.5.7", + "v8-lazy-parse-webpack-plugin": "^0.3.0", + "webpack": "2.2.0", + "webpack-dashboard": "0.2.1", + "webpack-dev-middleware": "1.9.0", + "webpack-dev-server": "2.2.0", + "webpack-dll-bundles-plugin": "^1.0.0-beta.5", + "webpack-md5-hash": "0.0.5", + "webpack-merge": "2.4.0" }, "scripts": { "rimraf": "rimraf", @@ -127,8 +122,9 @@ "webpack": "webpack --progress --profile --bail", "webpack-dev-server": "webpack-dev-server", "webdriver-manager": "webdriver-manager", - "clean": "npm cache clean && npm run rimraf -- node_modules doc coverage dist compiled", + "clean": "npm cache clean && npm run rimraf -- node_modules doc coverage dist compiled dll", "clean:dist": "npm run rimraf -- dist", + "clean:dll": "npm run rimraf -- dll", "clean:electron": "npm run rimraf -- build", "preclean:install": "npm run clean", "clean:install": "npm set progress=false && npm install", @@ -142,7 +138,7 @@ "prebuild:dev": "npm run clean:dist", "build:dev": " npm run clean:dist && npm run webpack -- --config config/webpack.dev.js", "prebuild:prod": "npm run clean:dist", - "build:prod": "npm run clean:dist && webpack --config config/webpack.prod.js --progress --profile --bail", + "build:prod": "npm run clean:dist && webpack --config config/webpack.prod.js --progress --profile", "server": "npm run server:dev", "server:dev": "webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/", "server:dev:hmr": "npm run server:dev -- --inline --hot", @@ -152,6 +148,7 @@ "webdriver:update": "npm run webdriver-manager update", "webdriver:start": "npm run webdriver-manager start", "lint": "npm run tslint \"src/**/*.ts\" --force", + "ngc": "./node_modules/.bin/ngc-w -p tsconfig.webpack.json", "pree2e": "npm run webdriver:update -- --standalone", "pretest": "npm run lint", "docs": "npm run typedoc -- --options typedoc.json --exclude '**/*.spec.ts' ./src/", @@ -167,8 +164,7 @@ "build:electron.renderer": "npm run webpack -- --config config/electron/webpack.renderer.prod.js", "build:electron.main": "npm run webpack -- --config config/electron/webpack.electron.prod.js", "electron:start": "electron build", - - "build:aot:prod": "npm run clean:dist && npm run clean:aot && webpack --config config/webpack.prod.js --progress --profile", + "build:aot:prod": "npm run clean:dist && npm run clean:aot && webpack --config config/webpack.prod.js --progress --profile --bail", "build:aot": "npm run build:aot:prod", "ci:aot": "npm run lint && npm run test && npm run build:aot && npm run e2e", "ci:jit": "npm run lint && npm run test && npm run build:prod && npm run e2e", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index d52a40fa..71eea2a4 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,6 +1,6 @@ import { Routes } from '@angular/router'; -import './app.loader.ts'; import { Component, ViewEncapsulation, ViewContainerRef } from '@angular/core'; + import { GlobalState } from './global.state'; import { BaImageLoaderService, BaThemePreloader, BaThemeSpinner } from './theme/services'; import { layoutPaths } from './theme/theme.constants'; @@ -9,7 +9,8 @@ import { BaMenuService } from './theme'; import { MENU } from './app.menu'; -import 'style!./app.scss'; +import 'style-loader!./app.scss'; +import 'style-loader!./theme/initial.scss'; /* * App Component diff --git a/src/app/pages/charts/components/chartistJs/chartistJs.component.ts b/src/app/pages/charts/components/chartistJs/chartistJs.component.ts index 88f48f14..577eadfc 100644 --- a/src/app/pages/charts/components/chartistJs/chartistJs.component.ts +++ b/src/app/pages/charts/components/chartistJs/chartistJs.component.ts @@ -1,7 +1,7 @@ import {Component, ViewEncapsulation} from '@angular/core'; import {ChartistJsService} from './chartistJs.service'; -import 'style!./chartistJs.scss'; +import 'style-loader!./chartistJs.scss'; @Component({ selector: 'chartist-js', diff --git a/src/app/pages/dashboard/calendar/calendar.component.ts b/src/app/pages/dashboard/calendar/calendar.component.ts index 857ac6d5..bc5cfaf2 100644 --- a/src/app/pages/dashboard/calendar/calendar.component.ts +++ b/src/app/pages/dashboard/calendar/calendar.component.ts @@ -1,7 +1,7 @@ import {Component, ViewEncapsulation} from '@angular/core'; import {CalendarService} from './calendar.service'; -import 'style!./calendar.scss'; +import 'style-loader!./calendar.scss'; @Component({ selector: 'calendar', diff --git a/src/app/pages/dashboard/lineChart/lineChart.component.ts b/src/app/pages/dashboard/lineChart/lineChart.component.ts index e38334d4..59479617 100644 --- a/src/app/pages/dashboard/lineChart/lineChart.component.ts +++ b/src/app/pages/dashboard/lineChart/lineChart.component.ts @@ -2,7 +2,7 @@ import {Component} from '@angular/core'; import {LineChartService} from './lineChart.service'; -import 'style!./lineChart.scss'; +import 'style-loader!./lineChart.scss'; @Component({ selector: 'line-chart', diff --git a/src/app/pages/dashboard/pieChart/pieChart.component.ts b/src/app/pages/dashboard/pieChart/pieChart.component.ts index 6071f6e7..5c165d36 100644 --- a/src/app/pages/dashboard/pieChart/pieChart.component.ts +++ b/src/app/pages/dashboard/pieChart/pieChart.component.ts @@ -3,7 +3,7 @@ import {Component, ViewEncapsulation} from '@angular/core'; import {PieChartService} from './pieChart.service'; import './pieChart.loader.ts'; -import 'style!./pieChart.scss'; +import 'style-loader!./pieChart.scss'; @Component({ selector: 'pie-chart', diff --git a/src/app/pages/dashboard/popularApp/popularApp.component.ts b/src/app/pages/dashboard/popularApp/popularApp.component.ts index 6b7015e4..5f2227e1 100644 --- a/src/app/pages/dashboard/popularApp/popularApp.component.ts +++ b/src/app/pages/dashboard/popularApp/popularApp.component.ts @@ -1,5 +1,5 @@ import {Component} from '@angular/core'; -import 'style!./popularApp.scss'; +import 'style-loader!./popularApp.scss'; @Component({ selector: 'popular-app', diff --git a/src/app/pages/dashboard/usersMap/usersMap.component.ts b/src/app/pages/dashboard/usersMap/usersMap.component.ts index e4dcc4ec..37a7f78a 100644 --- a/src/app/pages/dashboard/usersMap/usersMap.component.ts +++ b/src/app/pages/dashboard/usersMap/usersMap.component.ts @@ -1,7 +1,7 @@ import {Component} from '@angular/core'; import {UsersMapService} from './usersMap.service'; -import 'style!./usersMap.scss'; +import 'style-loader!./usersMap.scss'; @Component({ selector: 'users-map', diff --git a/src/app/pages/maps/components/bubbleMaps/bubbleMaps.component.ts b/src/app/pages/maps/components/bubbleMaps/bubbleMaps.component.ts index f325e9fb..6a9aa1cd 100644 --- a/src/app/pages/maps/components/bubbleMaps/bubbleMaps.component.ts +++ b/src/app/pages/maps/components/bubbleMaps/bubbleMaps.component.ts @@ -1,7 +1,7 @@ import {Component} from '@angular/core'; import {BubbleMapsService} from './bubbleMaps.service'; -import 'style!./bubbleMaps.scss'; +import 'style-loader!./bubbleMaps.scss'; @Component({ selector: 'bubble-maps', diff --git a/src/app/pages/maps/components/lineMaps/lineMaps.component.ts b/src/app/pages/maps/components/lineMaps/lineMaps.component.ts index 8b8bad02..81845a61 100644 --- a/src/app/pages/maps/components/lineMaps/lineMaps.component.ts +++ b/src/app/pages/maps/components/lineMaps/lineMaps.component.ts @@ -1,7 +1,7 @@ import {Component} from '@angular/core'; import {LineMapsService} from './lineMaps.service'; -import 'style!./lineMaps.scss'; +import 'style-loader!./lineMaps.scss'; @Component({ selector: 'line-maps', diff --git a/src/app/pages/pages.routing.ts b/src/app/pages/pages.routing.ts index 46e89c71..47ef831f 100644 --- a/src/app/pages/pages.routing.ts +++ b/src/app/pages/pages.routing.ts @@ -8,25 +8,24 @@ import { ModuleWithProviders } from '@angular/core'; export const routes: Routes = [ { path: 'login', - loadChildren: './pages/login/login.module#LoginModule' + loadChildren: 'app/pages/login/login.module#LoginModule' }, { path: 'register', - loadChildren: './pages/register/register.module#RegisterModule' + loadChildren: 'app/pages/register/register.module#RegisterModule' }, { path: 'pages', component: Pages, children: [ { path: '', redirectTo: 'dashboard', pathMatch: 'full' }, - { path: 'dashboard', loadChildren: './pages/dashboard/dashboard.module#DashboardModule' }, - { path: 'editors', loadChildren: './pages/editors/editors.module#EditorsModule' }, - // //{ path: 'components', loadChildren: './pages/components/components.module') } - { path: 'charts', loadChildren: './pages/charts/charts.module#ChartsModule' }, - { path: 'ui', loadChildren: './pages/ui/ui.module#UiModule' }, - { path: 'forms', loadChildren: './pages/forms/forms.module#FormsModule' }, - { path: 'tables', loadChildren: './pages/tables/tables.module#TablesModule' }, - { path: 'maps', loadChildren: './pages/maps/maps.module#MapsModule' } + { path: 'dashboard', loadChildren: 'app/pages/dashboard/dashboard.module#DashboardModule' }, + { path: 'editors', loadChildren: 'app/pages/editors/editors.module#EditorsModule' }, + { path: 'charts', loadChildren: 'app/pages/charts/charts.module#ChartsModule' }, + { path: 'ui', loadChildren: 'app/pages/ui/ui.module#UiModule' }, + { path: 'forms', loadChildren: 'app/pages/forms/forms.module#FormsModule' }, + { path: 'tables', loadChildren: 'app/pages/tables/tables.module#TablesModule' }, + { path: 'maps', loadChildren: 'app/pages/maps/maps.module#MapsModule' } ] } ]; diff --git a/src/app/theme/components/baChartistChart/baChartistChart.component.ts b/src/app/theme/components/baChartistChart/baChartistChart.component.ts index 1be83658..3d18f41c 100644 --- a/src/app/theme/components/baChartistChart/baChartistChart.component.ts +++ b/src/app/theme/components/baChartistChart/baChartistChart.component.ts @@ -8,7 +8,7 @@ import { } from '@angular/core'; import * as Chartist from 'chartist'; -import 'style!./baChartistChart.scss'; +import 'style-loader!./baChartistChart.scss'; @Component({ selector: 'ba-chartist-chart', @@ -24,7 +24,7 @@ export class BaChartistChart { @Input() baChartistChartClass:string; @Output() onChartReady = new EventEmitter(); - @ViewChild('baChartistChart') public _selector:ElementRef; + @ViewChild('baChartistChart') public _selector: ElementRef; private chart; diff --git a/src/app/theme/components/baSidebar/baSidebar.component.ts b/src/app/theme/components/baSidebar/baSidebar.component.ts index 2a5503ea..298641e8 100644 --- a/src/app/theme/components/baSidebar/baSidebar.component.ts +++ b/src/app/theme/components/baSidebar/baSidebar.component.ts @@ -2,7 +2,7 @@ import {Component, ElementRef, HostListener, ViewEncapsulation} from '@angular/c import {GlobalState} from '../../../global.state'; import {layoutSizes} from '../../../theme'; -import 'style!./baSidebar.scss'; +import 'style-loader!./baSidebar.scss'; @Component({ selector: 'ba-sidebar', diff --git a/tsconfig.json b/tsconfig.json index 625a72db..6e44b143 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,11 +17,12 @@ "dom", "es6" ], + "typeRoots": [ + "node_modules/@types" + ], "types": [ "hammerjs", - "jasmine", "node", - "selenium-webdriver", "source-map", "uglify-js", "webpack" diff --git a/tsconfig.webpack.json b/tsconfig.webpack.json index f4283679..2a1771f9 100644 --- a/tsconfig.webpack.json +++ b/tsconfig.webpack.json @@ -17,6 +17,9 @@ "es2015", "dom" ], + "typeRoots": [ + "node_modules/@types" + ], "types": [ "hammerjs", "node", diff --git a/tslint.json b/tslint.json index c11fdac3..a27066d7 100644 --- a/tslint.json +++ b/tslint.json @@ -50,7 +50,6 @@ ], "no-construct": true, "no-debugger": true, - "no-duplicate-key": true, "no-duplicate-variable": true, "no-empty": false, "no-eval": true, @@ -58,9 +57,7 @@ "no-shadowed-variable": true, "no-string-literal": false, "no-switch-case-fall-through": true, - "no-unreachable": true, "no-unused-expression": true, - "no-unused-variable": false, "no-use-before-declare": true, "no-var-keyword": true, "radix": true,