This repository has been archived by the owner on Aug 7, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 49
fix: avoid getting js
template in a ts
project
#717
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… `typescript` dependency in the templates anymore
MartoYankov
reviewed
Nov 20, 2018
sis0k0
suggested changes
Nov 20, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some bits in webpack.typescript.js
that are necessary only for TS projects and shouldn't be part of the webpack configuration of the JS projects. For example, the awesome-typescript-loader
-
loader: "awesome-typescript-loader", |
Maybe, we could think of another way to differentiate the TS and JS projects. Here are a few ways off the top of my head:
1). Check the extensions of the files in the app/ folder;
2). Check if the nativescript-dev-typescript
plugin is a dependency;
3). Add some key to the nsconfig that denotes the type of the template.
3604e24
to
64745cb
Compare
64745cb
to
e3b661b
Compare
sis0k0
approved these changes
Nov 21, 2018
vchimev
approved these changes
Nov 21, 2018
run ci |
2 similar comments
run ci |
run ci |
SvetoslavTsenov
approved these changes
Nov 22, 2018
dtopuzov
approved these changes
Dec 1, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
What is the current behavior?
We don't have the typescript dependency hardcoded in our templates anymore and we depend on the
nativescript-dev-typescript
postinstall script to generate it.It seems that
npm
is executing the postintalls script in alphabetical order and the nativescript-dev-typescript plugin is generating the typescript dependency before the postintall script of nativescript-dev-webpack. In this way, everything is working as expected.However, when the NativeScript CLI is used with
yarn
instead of npm, the postinstall scripts are run in parallell and thenativescript-dev-webpack
plugin is copying thejavascript
webpack.config instead of thetypescript
one because the typescript dependency is still missing.What is the new behavior?
We don't have a hidden dependency to the nativescript-dev-typescript plugin anymore because we depend on nativescript-dev-typescript dependency which is part of the templates.
Related to: #716