Export .bsdesign to HTML/JS/CSS via command line

In order to automate the process a bit more, it would be great to be able to have an offline tool to convert BSS designs into HTML/JS/CSS via command line.

In this way, publishing process can be automated, testing becomes easier, etc.

That's what export button does isn't it?? can also be done offline

Or is this something else?

What I meant is a command line tool that can have the bsdesign file as an input and spit out the same result as the export button you mention.

I agree. This would be wonderful to have!

In other words without opening the BSS app, be able to extract the files from the design file? I admit that's an interesting idea if that's what you mean, but I see no real worth in it myself to be honest. BSS opens pretty quickly, you have to open the Command Line tool/app to do this so what's the difference which app you open to do it? I don't see this as something that would be overall helpful and seems to be a singular or very small population of users that would actually benefit from it. Just my opinion ... unless I'm misunderstanding what you mean of course. :)

It's incredibly useful from an automation standpoint. I'm needing it in a slightly different folder structure with some modifications, so if I had this functionality, I could automate the whole process.

As I said, I don't see a lot of need for this myself. Yes it would be "nice" to be able to structure our files to our own style of folder structuring rather than having it set for us, but it's not a necessity for most so far as what I've seen on the forums. I personally hated the structure when I first started working with BSS, but I've grown to see how useful it is for updating so that I put all my other files "outside" the Assets folder and that way will never accidentally delete any custom things I add outside of BSS such as galleries, forms and so on. Granted, I would still love to be able to manipulate my files how "I" want to organize them rather than a proprietary setup that I don't have control over, but ... I understand their need completely, it is what makes updating the Bootstrap versions doable and simpler for them, and that works for me.

Anyways, I digress, but the main point is, how necessary is it? You're the first person to ever ask for it in almost 2 years of being on the forums ....

Imagine a system where whenever a change is registered to have been made to the .bss file, the VCS automatically needs to redeploy the site.

The propietary .bss wouldn't be a problem for CI/CD purposes if we have a tool to export the site (shouldn't be too difficult since that functionality already exists in the desktop electron app).

Of course, it can be considered a nice to have, but to 'create component' (which is almost all the functionality we have available from the bstudio CLI) has also a workaround in the UI.

The proprietary .bss wouldn’t be a problem ...

... if, it wasn't proprietary and just used source native files. ;-)

@BSS_User, have you used a Bootstrap designer that only uses native files?! As an engineer, I understand that adds a tremendous amount of complexity, and you end up with a lot of software glitches as a result. I'm glad that Bootstrap Studio doesn't use native files.

I agree with @fer that even if it qualifies as a "nice to have", much of the supporting framework appears to already exist.

@MatthiasMiller , Pinegrow as one example uses native files while working with Bootstrap, can you be more specific on the complexities or glitches you speak of ?

I just commented on the developer's commit on Github: https://github.com/bootstrapstudio/bstudio/commit/8e66360324618b84eb453de9d3943c8ef42570c4

Great idea @fer!

Hey guys! To address the points raised:

  • Bootstrap Studio to use native files. We store your designs in proprietary .bssdesign files instead of HTML and CSS, because we don't actually store your code as big strings of HTML and CSS. Instead we store everything as a tree of objects and meta data. This is what enables drag & drop, and advanced features like component linking.
  • Controlling the app from the command line. As @fer has discovered, we have the bstudio cli app. There was near zero interest after we released it, and we put any plans to add further functionality on hold. If there is sufficient interest, we can add more features to it. I would be curious to read what ideas you have for it.

hey @martin! thank you very much for clarifying! I don't think to have a propietary files is an issue at all!

However, it would be lovely if the cli tool can run the export process a bssdesign project file under same configuration premises as expressed under options.

As an scenario sample for this possible headless functionality, imagine a CI/CD environment where I detect changes on my project.bssdesign placed on git. Therefore, we want Jenkins (or any other) to be able to redeploy the site every time that my bssdesign project file changes.

Possible additional feature for this cli tool: some deployment command where the user is directly able to deploy an export of the current website to some other service, ex: ec2, gh-pages or my preferred VPS). Maybe also possible to export to bss cloud when entering your user/license.

@Martin: I am pretty sure many dev folks would like to contribute freely if you open the product's api :)

@fer thanks for all the ideas! We will discuss these with the team :) The bstudio cli has one large drawback though - there needs to be a full Bootstrap Studio copy running on the local machine. This might make headless scenarios impossible.

hey @martin: absolutely right.. kinds of defeats the purpose of that cli functionality if we need to have a BSS instance running in order to be able to export.

Without knowing much about the insights of the product, cannot really help with a workaround or something :(

Don't hesitate to let us know what comes out after meeting your team, please! (and many thanks, you have an awesome product).

For what it's worth @martin, I'd still find value in the cli even if I need to have a BSS instance running, because it would still let me streamline my processes. However, I understand now why the cli didn't really take off.

Just thinking aloud and maybe not possible, but: what about making the actual app runnable from the command line? whenever parameters are passed, the app behaves as a cli.

@fer, this is likely non-trivial because of the way Windows handles cli and gui applications. I forget many of the details, but for example, the command prompt won't wait for gui applications to complete when run from the command line.

One approach is to allow the app to accept command line parameters, then just have a simple console-based app that serves as a wrapper, passing info back and forth with the app wait for the gui's exit code. This allows you to run the cli from the command prompt and have it feel native.

This is the approach we've used in other apps we've developed.