Skip to content

Commit

Permalink
feat: add typescript support
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-north committed Aug 23, 2018
1 parent 518c73b commit b5e1833
Show file tree
Hide file tree
Showing 5 changed files with 362 additions and 10 deletions.
18 changes: 15 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@
"test": "ember test",
"test:all": "ember try:each",
"semantic-release": "semantic-release",
"travis-deploy-once": "travis-deploy-once"
"travis-deploy-once": "travis-deploy-once",
"prepublishOnly": "ember ts:precompile",
"postpublish": "ember ts:clean"
},
"engines": {
"node": "6.* || 8.* || >= 10.*"
},
"homepage": "https://github.com/mike-north/ember-resize",
"devDependencies": {
"@mike-north/js-lib-semantic-release-config": "^0.0.0-development",
"@types/ember": "^2.8.32",
"@types/ember-qunit": "^3.0.3",
"@types/ember-test-helpers": "^0.7.1",
"@types/ember-testing-helpers": "^0.0.3",
"@types/ember__test-helpers": "^0.7.0",
"@types/qunit": "^2.5.2",
"@types/rsvp": "^4.0.2",
"broccoli-asset-rev": "^2.7.0",
"ember-cli": "^3.3.0",
"ember-cli-app-version": "^3.1.3",
Expand All @@ -28,12 +37,14 @@
"ember-cli-qunit": "^4.3.2",
"ember-cli-release": "1.0.0-beta.2",
"ember-cli-shims": "^1.2.0",
"ember-cli-typescript": "^1.4.0",
"ember-cli-uglify": "^2.0.0",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.1.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit-decorators": "^1.2.0",
"ember-resolver": "^4.5.0",
"ember-source": "~3.3.0",
"ember-source-channel-url": "^1.0.1",
Expand All @@ -43,7 +54,8 @@
"loader.js": "^4.2.3",
"qunit-dom": "^0.6.2",
"semantic-release": "^15.9.9",
"travis-deploy-once": "^5.0.2"
"travis-deploy-once": "^5.0.2",
"typescript": "^3.0.1"
},
"keywords": [
"ember-addon",
Expand All @@ -67,4 +79,4 @@
"release": {
"extends": "@mike-north/js-lib-semantic-release-config"
}
}
}
16 changes: 16 additions & 0 deletions tests/dummy/app/config/environment.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default config;

/**
* Type declarations for
* import config from './config/environment'
*
* For now these need to be managed by the developer
* since different ember addons can materialize new entries.
*/
declare const config: {
environment: any;
modulePrefix: string;
podModulePrefix: string;
locationType: string;
rootURL: string;
};
55 changes: 55 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"compilerOptions": {
"target": "es2017",
"allowJs": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"noImplicitAny": true,
"noImplicitThis": true,
"alwaysStrict": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noEmitOnError": false,
"noEmit": true,
"inlineSourceMap": true,
"inlineSources": true,
"baseUrl": ".",
"module": "es6",
"paths": {
"dummy/tests/*": [
"tests/*"
],
"dummy/*": [
"tests/dummy/app/*",
"app/*"
],
"ember-resize": [
"addon"
],
"ember-resize/*": [
"addon/*"
],
"ember-resize/test-support": [
"addon-test-support"
],
"ember-resize/test-support/*": [
"addon-test-support/*"
],
"*": [
"types/*"
]
}
},
"include": [
"app/**/*",
"addon/**/*",
"tests/**/*",
"types/**/*",
"test-support/**/*",
"addon-test-support/**/*"
]
}
1 change: 1 addition & 0 deletions types/dummy/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading

0 comments on commit b5e1833

Please sign in to comment.