-
Notifications
You must be signed in to change notification settings - Fork 21
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
Typescript #102
Typescript #102
Conversation
Ah, now I see why :) Have you tried this:
|
Oh, you are right, the new version is not released yet. I'm dumb |
Ok, this works now |
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.
Perhaps you want to also add webpack configurations for typescript within this PR?
} | ||
} | ||
|
||
const replacements = { |
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.
Wouldn't make sense to just move replacements within template as the dependencies cofnig is not related to this?
@@ -2,10 +2,6 @@ const dependencies = { | |||
basics: [ | |||
'@cycle/[email protected]' | |||
], | |||
language: { |
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.
Are we sure there won't be any specific language dependency that we'll need to install? (I didn't know about typescript to much that's why i left this here)
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.
yes, but as this file is splitted you can add them to the basics array. We could split the file, so the basics, and stream lib stuff is common and there is an additional entry in the flavor.js
for language specific imports
I'll also avoid to use .jsx/.tsx extension (although supporting it in the webpack config) |
typescript will throw an error if you use tsx syntax in a ts file |
and i would rework the webpack configs. We should only maintain 1, not 4 |
All good, I left you some minor comments.
|
|
Let's move 3 into a separate pr and discuss it there? There are enough of both pro and cons to be discussed separately without having to block this PR. I would love to first have everything in and then see where make sense to add improvements or not, lets wait till we have the whole picture with tests ecc to decide about this. |
ok, but then i would not add the webpack config just now to prevent unneccesary work now. This wont be released anyway as long the webpack part is not decided |
for 3: #103 |
@@ -0,0 +1,24 @@ | |||
const dependencies = [] |
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.
Let's move this into the /configs/flavor.js
perhaps now we could simply rename it into dependencies.js
?
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.
Also can we simply use template/src/<template>
instead of having a whole seperate structure just for those files? as they are strictly related to the templates. Perhaps we could renane this file into templateStrings.js
?
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.
- thought it is cleaner to seperate it, dont mind really
- My reason is that it is not part of the template source and should not be copied over, we could however remove the structure, move the files one directory up and rename them to
<language>.js
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.
My rationaled on why I think they are part of template sources: Ones are precompiled template functions, the other are template strings (replacement), together they form the template sources.
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.
Noice!
Thanks a lot for this @jvanbruegge ! |
I'll give it a couple of tests and if all ok, merge it |
I got this when I try to run it:
|
9be47f8
to
278cdc2
Compare
forgot to edit the path after rename |
…-patch-1 Add dat-installer, cycle-hn and cycle-storageify to the list
I've added the typescript templates, but wasnt able to test them see #101 (comment)
fixes #92