electricessence / TypeScript.NET

A JavaScript-Friendly .NET Based TypeScript Library (Moved)
https://github.com/electricessence/TypeScript.NET-Core
Other
251 stars 36 forks source link

Minimal setup? #28

Closed markushaslinger closed 8 years ago

markushaslinger commented 8 years ago

I'm starting a new project and would like to include TypeScript.NET.

What's the minimal setup needed to use it? The NuGet package installed source and dist folders. I would like to just have it sit under Scripts in a single folder. What things do I have to delete and move to use the full library with a minimal number of files?

electricessence commented 8 years ago

I want to be sure this process for you is as easy as possible, so please keep in contact until this is resolved.

TypeScript.NET has many files and inner dependencies that you may or may not need in your project. Originally it was built as monoliths, but after a time, modularity became necessary. Please read and comment here too: https://github.com/electricessence/TypeScript.NET/issues/25

TypeScript.NET is best used with TypeScript. You can use the compiler to the compile the source into a single file including only the files you used. Or even better, you can use your favorite module loader to import them at run-time. If you need to bundle files, it's recommended to use r.js optimizer.

If you are using only JavaScript and want to use the library without types, then the dist folder is there for that purpose. In a web project, using RequireJS and dist/amd will work very well.

Please let me know if you still have questions.

electricessence commented 8 years ago

I have yet to try browserify, but many people use that.

electricessence commented 8 years ago

@marce155, feel free to reopen if you want to discuss more.