This is a migrated thread and some comments may be shown as answers.

a few questions on using the new TypeScript projects

8 Answers 163 Views
AppBuilder extension for Visual Studio
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jaja
Top achievements
Rank 1
Jaja asked on 13 Jun 2014, 06:08 PM
1) In regular typescript projects I don't need to do the ///reference for kendo and jquery because VS scans for all ts files but yet I'm having to do that within AppBuilder's typescript.  Am I overlooking a configuration setting or something?

2) Even after placing in the ///reference calls I get an error stating "cannot compile external modules unless --module flag is provided".  Usually thats fixed by setting the project properties to use AMD as the module system but I don't see that setting under the project properties anywhere.

3) In solution explorer it shows the related .js, and .js.map for every .ts file which makes things kind of crowded.  Is there a way to configuration settings to tell solution explorer to only display the .ts file as VS normally does?

4) I'm guessing that there is no support for nuget at all since I don't see a menu item for it in the right-click menu, is that correct?

8 Answers, 1 is accepted

Sort by
0
Jaja
Top achievements
Rank 1
answered on 13 Jun 2014, 06:20 PM
In regards to #3, I think this just may be from where I copied over source code from another project and then did the "include in project" and it brought along the .js and .js.map files for the ride.   My bad :-D
0
Svetlozar
Telerik team
answered on 16 Jun 2014, 02:55 PM
Hello,

Thank you for your interest in our TypeScript support!

Here are the answers to your questions:

1. In Visual Studio, all files that have build action “TypeScript Compile” implicitly reference each other. If you change the build action of your ts and declarations files to “TypeScript Compile” you should have intellisense without adding /// references. We will improve our project templates to have the TypeScript Compile build action set by default.
2. You are correct, we haven’t exposed the TypeScript build properties yet. We are still looking for the best way to handle that.
3. Visual Studio just doesn’t include the JavaScript file. You can remove the JavaScript file from the project if you would like (compiling will continue to work), but we prefer having the JavaScript file in the project by default. Nesting the JavaScript file under the corresponding TypeScript file definitely makes sense, so we will most probably implement it in the future.
4. The NuGet UI works with known project types. Unfortunately, the AppBuilder project type is unknown to NuGet, so the commands for managing packages are unavailable. The good news is that the Package Manager Console works and you can install packages using “Install-Package”. In fact, Python and Node.js have the very same problem and we are monitoring how the NuGet team will handle the pull request for adding these project types as known projects.

If you have any other questions or suggestions, please don't hesitate to write back!

Regards,
Svetlozar
Telerik
 

Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

 
0
Mike Graham
Top achievements
Rank 1
answered on 27 Jun 2014, 09:26 AM
I added a feature request with the following - i'm including it here in case that gives it extra weight ;)

----------------------

love the direction you are taking with mobile projects supporting typescript.

please, please, please add a project property for specifying the typescript module system (or even a way to manually edit the iceproj file) so this flag gets added to the typescript compile.

i was very excited with the new appbuilder typescript support, but then disappointed because without a way to specify the typescript module system, i can't leverage typescript in my appbuilder mobile projects. i use amd to load everything.

the workaround for now is to build the typescript files in a separate website project and manually add the resulting js files to the mobile project. this works for now.

ultimately, in a perfect world, i would like to have a single project that generates my website and my mobile apps for all platforms (seems like a lot to ask, but you guys rock, so i'm asking)
0
Kaloyan
Telerik team
answered on 02 Jul 2014, 06:59 AM
Hello Mike,

Thank you for the feature request and all the feedback about our product. We will definitely have it in mind for our future releases.

Further, here is the reply from a colleague of mine:
"... in our Windows Client the setting is exposed in Options | General | Text Editor | TypeScript | Compilation Settings.
Visual Studio also has settings for that (although it slightly depends on how you've setup your project). Our In-Browser Client doesn't expose that particular setting yet, but we will add it."


I hope this helps. Please, let me know if there is anything else you want to ask.

Regards,
Kaloyan
Telerik
 

Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

 
0
Mike Graham
Top achievements
Rank 1
answered on 02 Jul 2014, 09:22 AM
If you could provide more detailed information from your colleague, that would be helpful.  I am simply creating the default Kendo Mobile project in Visual Studio.  I've checked Project-Properties and don't see any option for setting the TypeScript module system.  I've also trolled through the Visual Studio - Tools - Options and don't see any settings there.
0
Svetlozar
Telerik team
answered on 02 Jul 2014, 12:41 PM
Hello,

I tried to give some more details about our VS story here - http://feedback.telerik.com/Project/129/Feedback/Details/132208-typescript-amd-typescript-module-system-option-in-compiler

We are still looking for the best way to handle all scenarios. Meanwhile, I suggest you compile your TypeScript files on save using VS Tools – Options – Text Editor – TypeScript – Project – Compile On Save – Automatically compile TypeScript files which are not part of a project.

If you have any questions or suggestions, please don't hesitate to write back.

Regards,
Svetlozar
Telerik
 

Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

 
0
Adam
Top achievements
Rank 1
answered on 12 May 2015, 06:54 AM

There is another way.... but you guys may not like it :)

 

   <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <TypeScriptRemoveComments>false</TypeScriptRemoveComments>
    <TypeScriptSourceMap>False</TypeScriptSourceMap>
    <TypeScriptTarget>ES5</TypeScriptTarget>
    <TypeScriptModuleKind>amd</TypeScriptModuleKind>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)' == 'Release'">
    <TypeScriptRemoveComments>true</TypeScriptRemoveComments>
    <TypeScriptSourceMap>false</TypeScriptSourceMap>
    <TypeScriptTarget>ES5</TypeScriptTarget>
    <TypeScriptModuleKind>amd</TypeScriptModuleKind>
  </PropertyGroup>

 if you add the code above to your .iceproj file right above the typescript imports at the bottom of the file you can use typescript they way you want to.

 I have web essentials installed as well so that may also have something to do with why this works for me, I am guessing that the typescript files are being built locally rather than at compile on the server as I have also noticed that I must ensure my duplicate js files are included in the project or I get errors.

I hope this helps someone 

0
Kaloyan
Telerik team
answered on 14 May 2015, 12:16 PM
Hi Adam,

Thank you for sharing this with the community.

Regards,
Kaloyan
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
AppBuilder extension for Visual Studio
Asked by
Jaja
Top achievements
Rank 1
Answers by
Jaja
Top achievements
Rank 1
Svetlozar
Telerik team
Mike Graham
Top achievements
Rank 1
Kaloyan
Telerik team
Adam
Top achievements
Rank 1
Share this question
or