James Walker

James Walker

Web Developer

ipm dev blog, Part 5 – Nearly release ready!

Published on Thursday November 23 2017 at 18:43 in ipm dev blog

This week's work on ipm has been productive like last week and the project is now almost at the stage where it's ready for an initial release, with a limited feature set.

You can view my progress on the project by browsing the GitHub commits.

The bulk of the work since last week has focused on a few meta things, including implementing a build script to create Win32 and Linux code freezes, as well as the addition of some improved path handling code for full cross-platform compatibility.

The most significant work I've completed is to essentially implement the file command. There are a few rough edges and things left to be completed, but now ipm is capable of completing the task I'd originally envisioned it to handle: creating new source code files at a specified path, optionally using templates.

You can check the operation of the command by viewing the source. Essentially, it takes at least one argument, which defines the path to a file to create, relative to the working directory. It will create the entire directory tree to the file if required, and then create the empty file there.

The true power of the command comes when you provide a second argument, the name of a template file. Templates can be stored globally in the ipm user directory, added last week, or per-project. When you specify a template name, ipm will automatically try to find it in any of the paths it's aware of. Templates contain variables that are automatically populated from the project configuration, runtime environment variables or user input on-demand.

The populated template is then inserted into the file, making it much quicker to get up and running with a new project or file that requires a specific header/footer/contents each time it's used. Like I said, there's still some work to be done around the default template variables, but the command is essentially implemented and should be finished over the weekend. It'll then be possible to release ipm v0.1.0!

View the project on GitHub