Skip to content

Template-ify quickproject#14

Merged
xach merged 9 commits intoxach:masterfrom
inaimathi:master
Oct 27, 2017
Merged

Template-ify quickproject#14
xach merged 9 commits intoxach:masterfrom
inaimathi:master

Conversation

@inaimathi
Copy link
Contributor

@inaimathi inaimathi commented Oct 11, 2017

Hi!

Here's a PR that moves most of the previously code-defined logic in quickproject into a template directory. It's now possible to override a lot more of the default behavior without hacking on the project source code.

I've still got a few opinions on what the default-template should look like, but with the system as it is, this should be both a lot more flexible, and backwards compatible with the old way of doing things. (A README update might be in order too).

Also, as written, this should resolve #2 and #4

- README.txt is now README.md
- depends-on is now validated to be a list, and is passed to templates
- Some filenames are now forced to lower-case for naming compatibility reasons
- Provide default template directory complete with README and package
  file
- Output README and package files exclusively from the template
  directory instead of defining write-*-file functions in quickproject
- add .gitignore file
- undo some case changes for the moment
- Add optional copyright notice header/footer to all default template
  files
- Remove file-comment-header function (and add related stuff to each
  file)
- Remove write-system-file and write-application-file
- Add hooks to write .asd and initial .lisp file through the default
  template directory (and change their names as appropriate for output
  purposes so that we have files named <project>.asd and <project>.lisp)
@xach
Copy link
Owner

xach commented Oct 19, 2017

I like this idea! It looks like I may have introduced a conflict by merging an older PR from last year.

Also, it appears that the new code uses tabs instead of spaces. (If the current code uses tabs, that is a mistake, not by design.)

Can you take a look at resolving the conflict and using spaces rather than tabs?

@inaimathi
Copy link
Contributor Author

@xach: That should do it (tested locally; it generates the expected output with and without depends-on inputs)

@xach xach merged commit 7b8a62b into xach:master Oct 27, 2017
@xach
Copy link
Owner

xach commented Oct 27, 2017

Thanks!


(defun template-pathname->output-name (path)
(flet ((mk-path (name)
(make-pathname

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be changed to (make-pathname :name name :defaults path) instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow for user configurable templates.

3 participants