question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simple fs -> js solution?

See original GitHub issue

Description

Recently I wrote some VSTS-Build-Tasks with typescript (https://github.com/matthid/Paket.TeamBuildCredentials/blob/master/SetPaketCredentialProvider.dev/setCredentialManager.ts). The primary reason to use typescript was that it was so easy to get started:

Basically npm install <> && tsc file.js is everything you need to do in order to get out of the “javascript misery”. The problem especially for build-tasks is that it feels like using fable is more overhead than just writing the task in javascript/typescript.

My question now is: Can we already do the same for fable and I just missed it? What is currently the most minimal way to write such a build task in f#?

Feel free to point me to some existing samples/documentation maybe I have just missed them.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
alfonsogarciacarocommented, Nov 27, 2018

fable-splitter 2.1 (currently in beta, so you need to install it with npm i fable-splitter@next fable-compiler@next but the stable version will be released soon) it’s close to this. You can just do npx fable-splitter src -o build. Please check the README for more information.

Note that .fsx scripts are not supported at the moment because there’s no standard solution yet to add package references, so for now it’s easier to use .fsproj. But we can revisit it when .fsx can contain nuget/paket references and we get them resolved by the F# compiler or Dotnet.ProjInfo.

2reactions
TheAngryByrdcommented, Apr 13, 2018

Had to give it a good cleaning before I showed it to anyone 😸

https://github.com/TheAngryByrd/fantasy

can try it with

./build.sh
cd dist && node fantasy ../examples/hello.fsx
Read more comments on GitHub >

github_iconTop Results From Across the Web

fagbokforlaget/simple-fs: Handles files on indexeddb like ...
A minimal, extensible and promise based filesystem layer for modern browsers. Live Demo. Supported storage backend. Simple-fs provides two storage backend. It's ...
Read more >
How To Work with Files using the fs Module in Node.js
With Node.js, you can programmatically manipulate files with the built-in fs module. The name is short for “file system,” and the module ...
Read more >
Introduction to the fs Module in Node.js
The simplest solution I've found has been an npm package called rimraf, so let's install that quickly. $ npm i rimraf. Copy. The...
Read more >
creationix/simple-fs
A node.js implementation of the simple-stream and continuable based fs interface for js-git. File System Interface. This module implements the following ...
Read more >
Node.js File System
js file system : To handle file operations like creating, reading, deleting, etc., Node.js provides an inbuilt module called FS (File System).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found