create single scss pack and script

remove unnecessary file from pack
fix problem dev change style
fix theme picker
This commit is contained in:
Eugenio Romano
2017-11-18 11:49:23 +00:00
parent 4b76e6b4a9
commit bbe423759c
26 changed files with 567 additions and 211 deletions

View File

@@ -16,6 +16,10 @@ npm-debug.log
!**/*.d.ts
!**/adf-insights.js
**/*.scss
**/*.css
!**/_theming.scss
coverage/
demo/
dist/

View File

@@ -1,66 +0,0 @@
Error.stackTraceLimit = Infinity;
require('core-js/es6');
require('core-js/es7/reflect');
require('zone.js/dist/zone');
require('zone.js/dist/long-stack-trace-zone');
require('zone.js/dist/proxy');
require('zone.js/dist/sync-test');
require('zone.js/dist/jasmine-patch');
require('zone.js/dist/async-test');
require('zone.js/dist/fake-async-test');
jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000;
var appContext = require.context(".", true, /\.spec\.ts/);
appContext.keys().forEach(appContext);
const TestBed = require('@angular/core/testing').TestBed;
const browser = require('@angular/platform-browser-dynamic/testing');
const CoreModule = require('@alfresco/adf-core').CoreModule;
const AppConfigService = require('@alfresco/adf-core').AppConfigService;
const AppConfigServiceMock = require('@alfresco/adf-core').AppConfigServiceMock;
const TranslationService = require('@alfresco/adf-core').TranslationService;
const TranslationMock = require('@alfresco/adf-core').TranslationMock;
TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());
patchTestBedToDestroyFixturesAfterEveryTest(TestBed);
beforeEach(() => {
TestBed.configureTestingModule({
imports: [CoreModule],
providers: [
{provide: AppConfigService, useClass: AppConfigServiceMock},
{provide: TranslationService, useClass: TranslationMock}
]
});
});
afterEach(() => {
TestBed.resetTestingModule();
});
function patchTestBedToDestroyFixturesAfterEveryTest(testBed) {
// Original resetTestingModule function of the TestBed.
var _resetTestingModule = testBed.resetTestingModule;
// Monkey-patch the resetTestingModule to destroy fixtures outside of a try/catch block.
// With https://github.com/angular/angular/commit/2c5a67134198a090a24f6671dcdb7b102fea6eba
// errors when destroying components are no longer causing Jasmine to fail.
testBed.resetTestingModule = function() {
try {
if(this._activeFixtures) {
this._activeFixtures.forEach(function (fixture) {
fixture.destroy();
});
}
} finally {
this._activeFixtures = [];
// Regardless of errors or not, run the original reset testing module function.
_resetTestingModule.call(this);
}
};
};

View File

@@ -1,41 +0,0 @@
Error.stackTraceLimit = Infinity;
require('core-js/es6');
require('core-js/es7/reflect');
require('zone.js/dist/zone');
require('zone.js/dist/long-stack-trace-zone');
require('zone.js/dist/proxy');
require('zone.js/dist/sync-test');
require('zone.js/dist/jasmine-patch');
require('zone.js/dist/async-test');
require('zone.js/dist/fake-async-test');
jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000;
var appContext = require.context(".", true, /\.spec\.ts/);
appContext.keys().forEach(appContext);
const TestBed = require('@angular/core/testing').TestBed;
const browser = require('@angular/platform-browser-dynamic/testing');
const CoreModule = require('@alfresco/adf-core').CoreModule;
const AppConfigService = require('@alfresco/adf-core').AppConfigService;
const AppConfigServiceMock = require('@alfresco/adf-core').AppConfigServiceMock;
const TranslationService = require('@alfresco/adf-core').TranslationService;
const TranslationMock = require('@alfresco/adf-core').TranslationMock;
TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());
beforeEach(() => {
TestBed.configureTestingModule({
imports: [CoreModule],
providers: [
{provide: AppConfigService, useClass: AppConfigServiceMock},
{provide: TranslationService, useClass: TranslationMock}
]
});
});
afterEach(() => {
TestBed.resetTestingModule();
});

View File

@@ -1,79 +0,0 @@
"use strict";
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
var task_list_1 = require("../task-list");
exports.nonDeployedApps = [new task_list_1.AppDefinitionRepresentationModel({
id: '1',
name: '1',
icon: 'icon1'
}), new task_list_1.AppDefinitionRepresentationModel({
id: '1',
name: '2',
icon: 'icon2'
}), new task_list_1.AppDefinitionRepresentationModel({
id: '1',
name: '3',
icon: 'icon3'
})];
exports.deployedApps = [new task_list_1.AppDefinitionRepresentationModel({
id: 1,
name: 'App1',
icon: 'icon1',
deploymentId: '1',
defaultAppId: 'fake-app-1',
modelId: null,
tenantId: null
}), new task_list_1.AppDefinitionRepresentationModel({
id: 2,
name: 'App2',
icon: 'icon2',
deploymentId: '2',
modelId: null,
tenantId: null
}), new task_list_1.AppDefinitionRepresentationModel({
id: 3,
name: 'App3',
icon: 'icon3',
deploymentId: '3',
modelId: null,
tenantId: null
}), new task_list_1.AppDefinitionRepresentationModel({
id: 4,
name: 'App4',
icon: 'icon4',
deploymentId: '4',
modelId: 65,
tenantId: null
}), new task_list_1.AppDefinitionRepresentationModel({
id: 5,
name: 'App5',
icon: 'icon5',
deploymentId: '5',
modelId: 66,
tenantId: 9
}), new task_list_1.AppDefinitionRepresentationModel({
id: 6,
name: 'App6',
icon: 'icon6',
deploymentId: '6',
tenantId: 9,
modelId: 66
})];
exports.defaultApp = [new task_list_1.AppDefinitionRepresentationModel({
defaultAppId: 'tasks'
})];

View File

@@ -16,7 +16,7 @@
"noFallthroughCasesInSwitch": true,
"removeComments": true,
"declaration": true,
"outDir": "./dist",
"outDir": "./",
"baseUrl" : "./",
"paths": {
"@alfresco/adf-process-services": ["../process-services"],