microsoft / workbooks

Workbooks is an interactive programming environment that’s perfect for experimentation, learning, and documentation: an educational tool for learning the myriad of .NET platforms, APIs, and libraries.
MIT License
466 stars 79 forks source link

Add option to save as simple file instead of folder #500

Open slodge opened 5 years ago

slodge commented 5 years ago

I've experienced some problems with the "folder"/"archive" models for workbooks.

My setup is that I'm using workbooks for tutorials.

As part of this I would like several workbooks to share a shared.csx script

However, when I use #load "shared.csx" then Xamarin workbooks insists on making a folder and taking a local copy of shared.csx - which means that the script is not longer really shared.

Is there any way to prevent this from happening?

If not, would you accept a PR that added "flat file" an option in this list:

image

(maybe linked to my hopefully-soon-to-come PR for #189?)

sandyarmstrong commented 5 years ago

Any time you reference a resource (be it image, csx, dll, whatever) with a relative path, Workbooks tries to package it up. It might only be if the file is alongside the .workbook file, though.

I think an option to save as a flat file would be ok, but we would need to warn the user that they are responsible for keeping their resources accessible to the workbook somehow.