mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1544] app config file management refactoring (#2331)
* application configuration service refactoring * fix demo shell * remove logging to console
This commit is contained in:
committed by
Eugenio Romano
parent
d9bd59833c
commit
e96f6aa481
@@ -70,18 +70,11 @@ import {
|
||||
WebscriptComponent
|
||||
} from './components/index';
|
||||
|
||||
let appConfigFile = 'app.config-dev.json';
|
||||
if (process.env.ENV === 'production') {
|
||||
appConfigFile = 'app.config-prod.json';
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule,
|
||||
routing,
|
||||
CoreModule.forRoot({
|
||||
appConfigFile: appConfigFile
|
||||
}),
|
||||
CoreModule,
|
||||
MaterialModule,
|
||||
LoginModule.forRoot(),
|
||||
SearchModule.forRoot(),
|
||||
|
@@ -21,7 +21,7 @@ import { AlfrescoAuthenticationService, AppConfigService, BpmProductVersionModel
|
||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||
|
||||
@Component({
|
||||
selector: 'about-page',
|
||||
selector: 'adf-about-page',
|
||||
templateUrl: './about.component.html',
|
||||
styleUrls: ['./about.component.css']
|
||||
})
|
||||
@@ -30,7 +30,7 @@ export class AboutComponent implements OnInit {
|
||||
data: ObjectDataTableAdapter;
|
||||
githubUrlCommitAlpha: string = 'https://github.com/Alfresco/alfresco-ng2-components/commits/';
|
||||
|
||||
configFile: string = '';
|
||||
configFile: string = 'app.config.json';
|
||||
ecmHost: string = '';
|
||||
bpmHost: string = '';
|
||||
|
||||
@@ -85,7 +85,6 @@ export class AboutComponent implements OnInit {
|
||||
]);
|
||||
});
|
||||
|
||||
this.configFile = this.appConfig.configFile;
|
||||
this.ecmHost = this.appConfig.get<string>('ecmHost');
|
||||
this.bpmHost = this.appConfig.get<string>('bpmHost');
|
||||
}
|
||||
|
@@ -98,12 +98,6 @@ module.exports = {
|
||||
from: '**/*.json',
|
||||
to: 'resources/i18n'
|
||||
},
|
||||
{
|
||||
from: 'app.config-dev.json'
|
||||
},
|
||||
{
|
||||
from: 'app.config-prod.json'
|
||||
},
|
||||
{
|
||||
from: 'favicon-96x96.png'
|
||||
},
|
||||
|
@@ -5,7 +5,7 @@ const commonConfig = require('./webpack.common.js');
|
||||
const helpers = require('./helpers');
|
||||
const path = require('path');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
var HappyPack = require('happypack');
|
||||
const HappyPack = require('happypack');
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
|
||||
const alfrescoLibs = [
|
||||
@@ -131,7 +131,11 @@ module.exports = webpackMerge(commonConfig, {
|
||||
from: '**/*',
|
||||
to: `assets/${lib}/i18n/`
|
||||
}
|
||||
})
|
||||
}),
|
||||
{
|
||||
from: 'app.config-dev.json',
|
||||
to: 'app.config.json'
|
||||
}
|
||||
]),
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
|
@@ -100,6 +100,10 @@ module.exports = webpackMerge(commonConfig, {
|
||||
context: `node_modules/ng2-alfresco-core/prebuilt-themes/`,
|
||||
from: '**/*.css',
|
||||
to: 'prebuilt-themes'
|
||||
},
|
||||
{
|
||||
from: 'app.config-prod.json',
|
||||
to: 'app.config.json'
|
||||
}
|
||||
]),
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
|
Reference in New Issue
Block a user