Skip to content

Commit

Permalink
Merge pull request #4 from flivni/transpile
Browse files Browse the repository at this point in the history
Transpile
  • Loading branch information
flivni authored Apr 15, 2017
2 parents d83045b + 4022675 commit bca04c3
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.idea/
node_modules/
npm-debug.log

js/
Empty file added .npmignore
Empty file.
7 changes: 0 additions & 7 deletions index.ts

This file was deleted.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"name": "ionic2-autosize",
"version": "1.0.2",
"version": "1.1.0",
"description": "Directive that automatically adjusts textarea height to fit content",
"repository": {
"type": "git",
"url": "git+https://github.com/flivni/ionic2-autosize.git"
},
"main": "js/index.js",
"typings": "js/index",
"scripts": {
"prepublish": "cd src && tsc"
},
"keywords": [
"ng2",
Expand All @@ -22,7 +25,6 @@
"Zeb Burke-Conte <zeb@zebburkeconte.com> (http://zebburkeconte.com)",
"Felix Livni <flivni@gmail.com>"
],
"main": "ionic2-autosize.ts",
"license": "MIT",
"devDependencies": {
"@angular/common": "2.0.0-rc.4",
Expand All @@ -34,6 +36,6 @@
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"rxjs": "5.0.0-beta.6",
"zone.js": "0.6.12",
"typescript": "^1.7.3"
"typescript": "^2.2.0"
}
}
8 changes: 8 additions & 0 deletions src/autosize.directive.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ElementRef, OnInit } from '@angular/core';
export declare class Autosize implements OnInit {
element: ElementRef;
onInput(textArea: HTMLTextAreaElement): void;
constructor(element: ElementRef);
ngOnInit(): void;
adjust(): void;
}
46 changes: 46 additions & 0 deletions src/autosize.directive.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/autosize.directive.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/autosize.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {ElementRef, HostListener, Directive, OnInit} from '@angular/core';
@Directive({
selector: 'ion-textarea[autosize]'
})

export class Autosize implements OnInit {
@HostListener('input', ['$event.target'])
onInput(textArea:HTMLTextAreaElement):void {
Expand Down
6 changes: 6 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Autosize } from './autosize.directive';
export * from './autosize.directive';
declare var _default: {
directives: typeof Autosize[];
};
export default _default;
9 changes: 9 additions & 0 deletions src/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {Autosize} from './autosize.directive';

export * from './autosize.directive';

export default {
directives: [Autosize]
}
10 changes: 7 additions & 3 deletions tsconfig.json → src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
"compilerOptions": {
"noImplicitAny": false,
"module": "commonjs",
"target": "ES5",
"target": "ES6",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"declaration": true
"declaration": true,
"outDir": "../js"
},
"exclude": ["node_modules"]
"filesGlob": [
"./**/*.ts",
"!./node_modules/**/*.ts"
]
}

0 comments on commit bca04c3

Please sign in to comment.