Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/tsconfig playground paths #274

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions generators/app/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ const setupPlayground =
}
);

generator.fs.copy(
generator.templatePath('playground/tsconfig.json'),
generator.destinationPath('playground/tsconfig.json')
generator.fs.copyTpl(
generator.templatePath('playground/_tsconfig.json'),
generator.destinationPath('playground/tsconfig.json'),
{
props: generator.props
}
);

generator.fs.copy(
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint": "tslint --type-check --project tsconfig.json src/**/*.ts",
"lite": "lite-server",
"playground:build": "tsc -p playground -w",
"playground": "concurrently \"npm run build:watch\" \"npm run playground:build\" \"npm run lite\"",
"playground": "concurrently \"npm run playground:build\" \"npm run lite\"",
"test": "tsc && karma start"
},
"repository": {
Expand Down
3 changes: 1 addition & 2 deletions generators/app/templates/bs-config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"server": {
"baseDir": "src",
"routes": {
"/": "playground",
"/node_modules/": "node_modules",
"/dist/": "dist",
"/.playground": ".playground"
"/.playground": ".playground/playground"
}
}
}
4 changes: 2 additions & 2 deletions generators/app/templates/playground/_systemjs.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// other libraries
rxjs: 'npm:rxjs',
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
'<%= props.libraryName.kebabCase %>': '../dist'
'<%= props.libraryName.kebabCase %>': './.playground/src'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
Expand All @@ -43,7 +43,7 @@
defaultExtension: 'js'
},
'<%= props.libraryName.kebabCase %>': {
main: '<%= props.libraryName.kebabCase %>.umd.js',
main: 'index.js',
defaultExtension: 'js'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true
"suppressImplicitAnyIndexErrors": true,
"baseUrl": "../",
"paths": {
"<%= props.libraryName.kebabCase %>": ["./src"]
}
}
}