fuzzyworld

template / windows / files / main.go

Branch windows · default branch · all branches

main.go

Commits that changed this file, newest first · file

2022-11-159573ca0Adding tests, getting code coverage to be reasonable for most files (main.go is at 0%), and might be there for a bit.Pavel Safronov
2022-11-125e424f1Added a flag to use default config settings instead of loading from disk. Did a bit of reorg as well, to simplify. Creating subfiles' subfolders now.Pavel Safronov
2022-11-0752e9ad7Removed pwsh dependency from both the Makefile and the default profiles.Pavel Safronov
2022-11-0610676daA few minor changes: - added a way to have a disabled profile - added a few more tests - made the new name method more generic by supplying a validator functionPavel Safronov
2022-11-038c15a71Refactored a bit: - made list/get/reset into actual commands - reworked how command settings are parsed, so this can happen (mostly) in the same spot - added a few notes to the readme - test updates - added a new profile "therapy-open" that opens the therapy folderPavel Safronov
2022-11-02886f7faStarting to add logging, made a lot of reporting messages into debug logs.Pavel Safronov
2022-11-01ae89a42Lots of small-ish changes: - Added support for user template files. This setting is exposed through a new parameter that has a default value of "~/.template.user.yaml". This file is combined with the "global" config: same-name profiles in user config replace profiles in global config. That's the merge. - Added more config validation in more places. - Standardized the name of the error variable to `err` across the project - Added a `make all` target that builds, runs tests, then installs the project locally - Added more information when a profile doesn't work on the current system - Postscript output is now captured and logged - Removed the no longer used (and "overloaded") findProfile functionPavel Safronov
2022-10-30b1ded4bRewired main a bit, this improves organization.Pavel Safronov
2022-10-28687d562Lots of internal changes: - simplified the pattern data to be of two types: pre-generation, post-generation, and this simplified a lot of things - simplifications and testing - added a way to run the postscripts even if the generation failed (for the 'daily' profile, this just opens VSCode in the destination folder)Pavel Safronov
2022-10-268179bb1Doc updates.Pavel Safronov
2022-10-264ded421Removing TemplatePath. File templates are now loaded only from the config. Also made some simplifications and refactored where we calculate the full config path. Added a `reset` command (`template reset`) that will reset the config file to be the default config that's in the code.Pavel Safronov
2022-10-23dd78994Updated docs and removed all mentions of Dropbox. The default locations are now all directly under ~. Added support for passing arguments to make. Added disambiguation to one of the errors.Pavel Safronov
2022-10-1174f1d4fA few small changes: - moved default config to its own file - added extras error logic to handle cases when extras file doesn't exist - removed "--default-config" switch from VSCode launch tasks (doesn't seem to play well with others)Pavel Safronov
2022-10-0605f9e8eAdded more tests.Pavel Safronov
2022-10-0555c36f6Got extras working: - added support for "extra" template data being available from YAML - added tests for extras - added a flag to use the default config (this is a test-only setting) - added VSCode launch task to debug testsPavel Safronov
2022-10-04185f54eStarting development on extras project: provide a way to pass in more properties by way of a YAML file. This will allow further templating of content.Pavel Safronov
2022-09-24d1bc130Fixed issue with post script needing to be split up. Now everything works as expected. Changes: - added "slices" package to do basic array checks (contains in this case) - made all post scripts []string, instead of [][]string - lowercased errors, because that's apparently the style - added Description to each profile - Description gets displayed when "template list" is run - started forbidding profile names that clash with actionsPavel Safronov
2022-09-244a7759dChanged a few things: - added folder profile, which creates a versioned folder in current location - added "create-react-app" profile, that creates a versioned folder in current locaiton and installs "create-react-app" there - added ability to have multiple script executions - added "template list" method: it lists the known profiles - added "template get XYZ" method: it shows XYZ profile as YAMLPavel Safronov
2022-09-2355d96f9Added tests for findProfile, as well as: - profiles are no longer stored as a map, it's a list now, and we can have multiple profiles with the same name - started adding basic config validation - still trying to figure out how to do installation stuff, might need to start using Make or somethingPavel Safronov
2022-09-232bc4bd6Added support of labeling profiles with a particular OS.Pavel Safronov
2022-09-22ea896f4Added support for unique indexes. This is done by defining a special function, and checking if this function gets called. Other changes: - slight reformat - slight cleanup - added helpful VSCode tasks, like installing the app and removing its configPavel Safronov
2022-09-22319b8b3Got basic patterns working: - made IsDefault into a boolean property on the profiles. - if "extra" args are specified, use them as such: first arg is profileName, second arg is ProjectName - added some tasks to VSCode, including a cleanup taskPavel Safronov
2022-09-21230da3bGetting closer to working patterns.Pavel Safronov
2022-09-21d026838Starting work on patterns and generating new file/folder names.Pavel Safronov
2022-09-214a7361bAdded config type to the app, using this for creating a config file or reading a created one.Pavel Safronov
2022-09-21f819f80Current work: - using https://github.com/urfave/cli for cli stuff - implemented basic profile functionality - `template` - shows `profile: default` - `template work` - shows `profile: work` - `template --profile work` - shows `profile: work` - `template -p work` - shows `profile: work` - added a basic readmePavel Safronov