Compile App.fs with Fable 3 and the output file will be App.fs.js (extension .fs.js). Specify an output directory with --outDir and the output file will be App.js (extension .js). I think the file name should be consistent and not depend on the output directory.
Actually, this was somewhat intended. The .fs.js extension is meant to be easy to add to .gitignore, but when using an output directory, this is usually already ignored so we can just use .js. But I understand your point. @ncave implemented the --outDir feature, do you have any thoughts on this?
IMO both have merits as @alfonsogarciacaro explained, but to eliminate confusion we can make the --extension parameter work consistently in both cases (if defined), then we can discuss sensible defaults if --extension is not provided. I can take a crack at that.
--extension compiler option has been improved in beta-005 and above.--outDir) by passing the --extension compiler option.--extension option, the default extension will be .fs.js without --outDir and .js with --outDir,--typescript is also defined, the default extension will be .fs.ts without --outDir and .ts with --outDir.Personally I think the defaults make sense for reasons stated above, as long as they're documented, but other opinions are welcome.
Sounds reasonable! IMHO this issue can be closed :).
Thanks @bklop! Ok, let's close the issue for now and we can revisit later if necessary when getting feedback from other Fable 3 users :+1:
Most helpful comment
--extensioncompiler option has been improved inbeta-005and above.--outDir) by passing the--extensioncompiler option.--extensionoption, the default extension will be.fs.jswithout--outDirand.jswith--outDir,or if
--typescriptis also defined, the default extension will be.fs.tswithout--outDirand.tswith--outDir.Personally I think the defaults make sense for reasons stated above, as long as they're documented, but other opinions are welcome.