Skip to content

Commit

Permalink
refactor(build): rename Export package to File-Export
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding-SE committed Apr 23, 2020
1 parent 356263c commit ad73b09
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ and that what is used to the test the UI portion. The Vanilla bundle is also use
The main packages structure is the following
- `@slickgrid-universal/common`: commonly used Formatters/Editors/Filters/Services/...
- this can then be used by any Framework (Angular, Aurelia, VanillaJS, ...)
- `@slickgrid-universal/excel-export`: export to Excel Service
- `@slickgrid-universal/export`: export to text file Service
- `@slickgrid-universal/excel-export`: export to Excel (xls/xlsx)
- `@slickgrid-universal/file-export`: export to text file (csv/txt)
- `@slickgrid-universal/vanilla-bundle`: a vanilla TypeScript/JavaScript implementation (framework-less)
- |
- Standalone Package
Expand Down
2 changes: 1 addition & 1 deletion packages/excel-export/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Excel Export Service
#### @slickgrid-universal/export
#### @slickgrid-universal/file-export

Simple Export to Excel Service that allows to exporting as ".xls" or ".xlsx".

Expand Down
1 change: 0 additions & 1 deletion packages/export/src/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Export Service (text file)
#### @slickgrid-universal/export
#### @slickgrid-universal/file-export

Simple Export to File Service that allows to export as CSV or Text, user can also choose which separator to use (comma, colon, semicolon, ...).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@slickgrid-universal/export",
"name": "@slickgrid-universal/file-export",
"version": "0.0.2",
"description": "Export to File (CSV/Txt) Service.",
"description": "Export to File (CSV/TXT) Service.",
"browser": "src/index.ts",
"main": "dist/commonjs/index.js",
"typings": "dist/commonjs/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExportService } from './export.service';
import { FileExportService } from './fileExport.service';
import {
Column,
DelimiterType,
Expand Down Expand Up @@ -61,7 +61,7 @@ const gridStub = {
};

describe('ExportService', () => {
let service: ExportService;
let service: FileExportService;
let translateService: TranslateServiceStub;
let mockColumns: Column[];
let mockExportCsvOptions;
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('ExportService', () => {
format: FileType.txt
};

service = new ExportService(pubSubServiceStub, translateService);
service = new FileExportService(pubSubServiceStub, translateService);
});

afterEach(() => {
Expand Down Expand Up @@ -965,7 +965,7 @@ describe('ExportService', () => {
describe('without I18N Service', () => {
beforeEach(() => {
translateService = null;
service = new ExportService(pubSubServiceStub, translateService);
service = new FileExportService(pubSubServiceStub, translateService);
});

it('should throw an error if "enableTranslate" is set but the I18N Service is null', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
TranslaterService,
} from '@slickgrid-universal/common';

export class ExportService {
export class FileExportService {
private _delimiter = ',';
private _exportQuoteWrapper = '';
private _exportOptions: ExportOption;
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions packages/file-export/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { FileExportService } from './fileExport.service';
File renamed without changes.
File renamed without changes.
Binary file not shown.
3 changes: 2 additions & 1 deletion packages/vanilla-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"dev": "webpack --env.development",
"dev:watch": "run-p build:watch",
"build": "cross-env tsc --build",
"postbuild": "npm-run-all bundle:commonjs",
"build:watch": "cross-env tsc --incremental --watch",
"bundle:commonjs": "tsc --project tsconfig.build.json --outDir dist/commonjs --module commonjs",
"bundle:es2020": "cross-env tsc --project tsconfig.build.json --outDir dist/es2020 --module es2015 --target es2020",
Expand Down Expand Up @@ -42,7 +43,7 @@
"dependencies": {
"@slickgrid-universal/common": "^0.0.2",
"@slickgrid-universal/excel-export": "^0.0.2",
"@slickgrid-universal/export": "^0.0.2"
"@slickgrid-universal/file-export": "^0.0.2"
},
"devDependencies": {
"@types/webpack": "^4.41.12",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ExportOption } from '@slickgrid-universal/common';
import { ExportService as UniversalExportService } from '@slickgrid-universal/export';
import { FileExportService as UniversalExportService } from '@slickgrid-universal/file-export';
import { EventPubSubService } from './eventPubSub.service';
import { TranslateService } from './translate.service';

export class ExportService extends UniversalExportService {
export class FileExportService extends UniversalExportService {
constructor(eventPubSubService: EventPubSubService, translateService: TranslateService) {
super(eventPubSubService, translateService);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vanilla-bundle/src/services/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './binding.service';
export * from './eventPubSub.service';
export * from './excelExport.service';
export * from './export.service';
export * from './fileExport.service';
export * from './footer.service';
export * from './translate.service';
6 changes: 3 additions & 3 deletions packages/vanilla-bundle/src/vanilla-grid-bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import {
convertParentChildArrayToHierarchicalView,
} from '@slickgrid-universal/common';

import { ExportService } from './services/export.service';
import { FileExportService } from './services/fileExport.service';
import { ExcelExportService } from './services/excelExport.service';
import { TranslateService } from './services/translate.service';
import { EventPubSubService } from './services/eventPubSub.service';
Expand Down Expand Up @@ -89,7 +89,7 @@ export class VanillaGridBundle {
checkboxExtension: CheckboxSelectorExtension;
draggableGroupingExtension: DraggableGroupingExtension;
excelExportService: ExcelExportService;
exportService: ExportService;
exportService: FileExportService;
gridMenuExtension: GridMenuExtension;
groupItemMetaProviderExtension: GroupItemMetaProviderExtension;
headerButtonExtension: HeaderButtonExtension;
Expand Down Expand Up @@ -164,7 +164,7 @@ export class VanillaGridBundle {
const slickgridConfig = new SlickgridConfig();
this.sharedService = new SharedService();
this.translateService = new TranslateService();
this.exportService = new ExportService(this._eventPubSubService, this.translateService);
this.exportService = new FileExportService(this._eventPubSubService, this.translateService);
this.excelExportService = new ExcelExportService(this._eventPubSubService, this.translateService);
this.collectionService = new CollectionService(this.translateService);
this.footerService = new FooterService(this.sharedService, this.translateService);
Expand Down
2 changes: 1 addition & 1 deletion packages/web-demo-vanilla-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@slickgrid-universal/common": "^0.0.2",
"@slickgrid-universal/excel-export": "^0.0.2",
"@slickgrid-universal/export": "^0.0.2",
"@slickgrid-universal/file-export": "^0.0.2",
"@slickgrid-universal/vanilla-bundle": "^0.0.2",
"bulma": "^0.8.2",
"moment-mini": "^2.24.0"
Expand Down

0 comments on commit ad73b09

Please sign in to comment.