Skip to content

Commit

Permalink
Fixing build and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
unional committed May 19, 2016
1 parent ca44c01 commit 4b51fbd
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
11 changes: 7 additions & 4 deletions generators/beta/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ module.exports = yeoman.Base.extend({
this.destinationPath('typings.json'),
{
name: this.props.sourceDeliveryPackageName,
main: this.props.sourceMain + '.d.ts',
main: this.props.sourceMain,
homepage: this.props.sourceHomepage,
version: this.props.sourceVersion
});
Expand Down Expand Up @@ -690,9 +690,12 @@ module.exports = yeoman.Base.extend({
this.destinationPath('source-test')
);

this.fs.copy(
this.templatePath('test/*'),
this.destinationPath('test')
this.fs.copyTpl(
this.templatePath('template/test_tsconfig.json`),
this.destinationPath('test/tsconfig.json'),
{
sourceMain: this.props.sourceMain
}
);

if (~this.props.sourceUsages.indexOf('commonjs')) {
Expand Down
2 changes: 1 addition & 1 deletion generators/beta/templates/template/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"build": "echo building... && typings bundle<%- ambient %> -o out/<%- sourceMain %>",
"build": "echo building... && typings bundle<%- ambient %> -o out/<%- sourceMain %>.d.ts",
"lint": "echo linting... && tslint \"**/*.ts\" -e \"source/**\" -e \"source-test/**\" -e \"out/**\" -e \"node_modules/**\" -e \"typings/**\"",
"browser-test": "echo running browser tests... && <%- browserTest %>",
"source-test": "echo running source tests... && <%- sourceTest %>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"moduleResolution": "node"
},
"files": [
"../typings/main.d.ts",
"../out/main.d.ts"
"../typings/index.d.ts",
"../out/<%- sourceMain %>.d.ts"
]
}
2 changes: 1 addition & 1 deletion generators/beta/templates/template/typings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "<%- name %>",
"main": "<%- main %>",
"main": "<%- main %>.d.ts",
"homepage": "<%- homepage %>",
"version": "<%- version %>"
}
6 changes: 3 additions & 3 deletions generators/beta/templates/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
},
"exclude": [
"node_modules",
"typings/browser",
"typings/browser.d.ts",
"out/browser.d.ts",
"typings/globals",
"typings/modules",
"out",
"source"
]
}
4 changes: 2 additions & 2 deletions generators/current/templates/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"exclude": [
"node_modules",
"typings/globals",
"typings/modules",
"typings/browser",
"typings/browser.d.ts",
"out",
"source"
]
Expand Down

0 comments on commit 4b51fbd

Please sign in to comment.