Build / commandline tools?

advanced-prototyping

#1

Greetings all,

I’m just getting into Axure, and so far it’s ability to output really usable HTML code is what’s got me pushing my company to adopt.

I’m wondering if anyone knows of any methods to interact with .rp files programatically. Ideally, I’d love a command-line tool that lets me export html prototypes, so I can create a prototype automated build pipeline. For example, a designer checks out a repo, works on an RP file, saves and runs a build command that adds our logging scripts to the top, and publishes to our static hosting folders. I’ve not looked at the structure of the rp file, but I wanted to get any relevant knowledge before looking into this further.

Thanks in advance

Richie


#2

I don’t know about existing command line tools but I’ve done a bit of research into options for integrating Axure with external tools. I last looked into a bit about 3 weeks ago (March 2024 for anyone looking at this in the future) so my information is fairly current, I plan to write a blog post some time soon summarizing my findings. Most of what I found out there is about making Axure prototypes and Javascript communicate back and forth. Very little about dealing with your own prototypes outside of the prototype player.

There is the pseudo-official option in the Technical Preview of an Axure RP9 API, I have not attempted to use it with RP10 - no idea if it even works. I did build a tool a year or so ago for a 24hr hackathon that took an rp file, turned it into xml, then created a react app that sort of documented the contents of the xml. Listing out pages, redrawing shapes and showing notes. There’s apparently an RP10 version coming “early 2024” last I heard, so that might prove useful.

The one thing third-party thing I did find that might be useful to you is winjeg/hamster, it’s an Axure Share server written in Go.

Now onto your question, I think if you were using the “Generate HTML Files…” in the Publish menu you could output a prototype to a folder and then have some app monitoring the folder to upload it, check it to a repo (not Axure Cloud) or whatever. Presumably, this app could also inject your logging scripts into the top and publish the static prototype files to your host. I don’t know Go, but perhaps hamster could be modified to do this part.

I imagine you can make everything after generating the prototype an automated process, but I can’t think of a way inside Axure to automate generating a prototype short of a tool that moves and clicks your mouse for you.

Your idea (and hamster) does sound somewhat related to one of my own ideas, which is a local private version of AxShare with better searching, automated screenshots and some other weird ideas. I think a major part of that system is something that monitors a folder for new prototype folders to add to the collection so I’ll be picking apart hamster myself so I’d be very interested in your progress with your own idea.