OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.38k stars 1.12k forks source link

TypeScript SDK must not be required to build Orchard #5078

Closed orchardbot closed 9 years ago

orchardbot commented 9 years ago

@bleroy created: https://orchard.codeplex.com/workitem/21249

From the very beginning, it has been a rule that we would not require any dependency other than ASP.NET MVC. We've gone to great length implementing that policy with databases for example.

It's unacceptable that compiling Orchard would require to install the TypeScript SDK. All dependencies must be deployable with the application, without additional installation. Especially as that particular dependency does not bring anything that couldn't be achieved otherwise.

I think this is a shipstopper.

orchardbot commented 9 years ago

vairamAtOutlook commented:

There is lot of leaning to say that TypeScript is being adopted mainstream than not. Also, TypeScript is included now part of VS this is a non-issue.

orchardbot commented 9 years ago

@jersiovic commented:

Is angular a dependency of the orchard core? If it is maybe typescript should also be a dependency ... http://blogs.msdn.com/b/somasegar/archive/2015/03/05/typescript-lt-3-angular.aspx

orchardbot commented 9 years ago

@netwavebe commented:

Isn't Orchard.Azure.MediaServices the only module where TypeScript is used in Orchard?

Personally I don't care if TypeScript is a requirement or not.

However, Orchard.Azure.MediaServices.csproj includes all .ts, .js and .js.map files. We use TFS, which marks these files as readonly. .ts files are compiled to .js as part of the msbuild process but because the .js files are readonly, the msbuild process fails. We solve this by removing the .js and .js.map files from the project.

So, to cut a long story short, shouldn't the project include either .ts or .js files, not certainly not both? How do others deal with this?

orchardbot commented 9 years ago

AimOrchard commented:

@NetWave

I have a prebuild setting to automatically checkout (try) the JS files before trying to 'compile'. Its a dirty hack but I'd like both TS and JS files on TFS and this was the only way (that works without having to manually check out things before compiling :/)

orchardbot commented 9 years ago

@BenedekFarkas commented:

@jersiovic

AngularJS is not a dependency of the Core, only two built-in modules (Layouts has AngularJS resources in Scripts/Lib and DynamicForms also uses it, which depends on Layouts).

@vairamAtOutlook

Yes, but you don't usually have VS on CI machines.

orchardbot commented 9 years ago

@sebastienros commented:

Remove the build action on the ts files. Include only js files in the released bits. Client tooling will be used to edit ts files.

Same logic for .less files when we use them.

orchardbot commented 9 years ago

@bleroy commented:

@vairamAtOutlook: VS is not a requirement, so yes, it's an issue.

This may help: https://msbuildtypescript.codeplex.com/ together with the exe file of the typescript compiler.

orchardbot commented 9 years ago

@DanielStolt commented:

Fixed in changeset 2d4c1c817d963f40505e981650bd5e7336ffe74c