Skip to content
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

Compilation of Js Files #4826

Closed
wants to merge 78 commits into from
Closed

Compilation of Js Files #4826

wants to merge 78 commits into from

Conversation

sheetalkamat
Copy link
Member

Compiler treats javascript files like declaration files and does not emit any output corresponding to them. Here are the list of work this PR supports:

  • Allow javascript files to be compiled on command line or through references/imports
  • tsconfig.json can take javascript files as file names to be compiled
  • If filenames are not specified in tsconfig.json, javascript files in the folder and not part of compilation
  • compiler options now have a flag named "consumeJsFiles" which when true will pick up javascript files in the folder for compilation if tscconfig.json doesn't supply file name list
  • Moved reporting of usage of typescript syntax in javascript file from services to compiler
  • Reports error if output is overwriting any of the input files
  • Reports error if output is not unique location and multiple input files overwrite same output file
  • It is error to reference .js file in a typescript file when generating declaration file.
  • .ts, .tsx and .d.ts files take precedence over .js files when creating list of files for compilation
  • Project runner options cleanup
  • Project runner to accept tsconfig.json tests
  • Instead of consumeJsFiles option, support jsExtensions that allows user to specify comma separated list of extensions that are to be treated like javascript files
  • Bundle js files into --out and copy into --outDir

…sent and tsconfig doesnt specify any filenames
- Command line now takes --jsExtension multiple times or comma separated list of extensions
- tsconfig accepts array of extension strings
* @param s
* @param existingValue
*/
function parseMultiValueStringArray(s: string, existingValue: string[]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between this and the built-in split ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could use split but then I would need to iterate over result again to make sure the strings are non empty and are correct.

@sheetalkamat sheetalkamat mentioned this pull request Oct 20, 2015
14 tasks
@sheetalkamat
Copy link
Member Author

This is now handled in #5345

@mhegazy mhegazy deleted the tscJsFiles branch November 2, 2017 21:02
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants