Skip to content

Commit

Permalink
Merge pull request #111 from maxisam/fix/new-packaging2
Browse files Browse the repository at this point in the history
fix: #100 packaging issue
  • Loading branch information
maxisam authored Jan 21, 2018
2 parents 8fa0305 + e6c5fbd commit 6a73bf3
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion index.ts → ngx-clipboard.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { ClipboardModule, ClipboardDirective, ClipboardService } from './src/index';
export { ClipboardModule, ClipboardDirective, ClipboardService } from './src/ngx-clipboard';
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "ngx-clipboard",
"description": "angular 2 clipboard",
"main": "./dist/bundles/ngxClipboard.umd.min.js",
"module": "./dist/index.js",
"module": "./dist/ngx-clipboard.js",
"typings": "./dist/ngx-clipboard.d.ts",
"version": "0.0.0",
"author": {
"name": "Sam Lin",
Expand Down Expand Up @@ -95,11 +96,11 @@
"README.md",
"dist",
"src",
"index.ts"
"ngx-clipboard.ts"
],
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
entry: './dist/index.js',
entry: './dist/ngx-clipboard.js',
dest: './dist/bundles/ngxClipboard.umd.js',
format: 'umd',
// Global namespace.
Expand Down
6 changes: 3 additions & 3 deletions src/clipboard.directive.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClipboardService } from './clipboard.service';
import { ClipboardModule } from './index';
import { ClipboardModule } from './ngx-clipboard';
import { Component } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
Expand Down Expand Up @@ -49,7 +49,7 @@ describe('Directive: clipboard', () => {
fixture = createTestComponent(template);
clipboardService = fixture.debugElement.injector.get(ClipboardService);
// Setup spy on the `copyText` method, somehow document.execCommand('copy') doesn't work in Karma
spy = spyOn(clipboardService, 'copyText' as keyof(ClipboardService));
spy = spyOn(clipboardService, 'copyText' as keyof (ClipboardService));
fixture.detectChanges();
button = fixture.debugElement.nativeElement.querySelector('button');
});
Expand Down Expand Up @@ -103,7 +103,7 @@ describe('Directive: clipboard', () => {
fixture = createTestComponent(template);
clipboardService = fixture.debugElement.injector.get(ClipboardService);
// Setup spy on the `copyText` method, somehow document.execCommand('copy') doesn't work in Karma
spy = spyOn(clipboardService, 'copyText' as keyof(ClipboardService));
spy = spyOn(clipboardService, 'copyText' as keyof (ClipboardService));
fixture.detectChanges();
button = fixture.debugElement.nativeElement.querySelector('button');
input = fixture.debugElement.nativeElement.querySelector('input');
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dom"
],
"baseUrl": "./node_modules",

"module": "es2015",
"moduleResolution": "node",
"noEmitOnError": false,
Expand All @@ -24,7 +24,7 @@
"exclude": [
"node_modules",
"demo",
"index.d.ts",
"ngx-clipboard.d.ts",
"dist",
"**/*.ngfactory.ts"
],
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
],
"mapRoot": "",
"baseUrl": "./node_modules",

"module": "es2015",
"moduleResolution": "node",
"noEmitOnError": false,
Expand All @@ -26,7 +25,7 @@
"exclude": [
"node_modules",
"demo",
"index.d.ts",
"ngx-clipboard.d.ts",
"dist",
"**/*.ngfactory.ts"
],
Expand Down

0 comments on commit 6a73bf3

Please sign in to comment.