~brenns10/sc-template

ref: 4d9ffd08da0603a4d4daacb71eb6ff522b187370 sc-template/README.md -rw-r--r-- 1.5 KiB
4d9ffd08Stephen Brennan Add a paragraph about sc libraries 1 year, 2 months ago

#sc-template

This serves as a template which I can use to quickly create a new "sc-" library. Copy and paste this directory (cp -PR sc-template DESTINATION) and update the following files:

  • README.md: replace this text with a description of the project
  • CHANGELOG.md: create a remark for version 0.0.0 and add the date
  • meson.build: replace the ALL CAPS contents with proper values

All remaining files need not be modified. Place C source directories into the src dir and public headers into include.

Commands for updating a repository:

TEMPLATE=path/to/sc-template
cd path/to/repo/to/update
cp $TEMPLATE/.gitignore .
cp $TEMPLATE/.pre-commit-config.yaml .
cp $TEMPLATE/.clang-format .
cp $TEMPLATE/LICENSE .
cp -P $TEMPLATE/compile_commands.json .

All text below this rule are recommended to be included within the final README:


This library is part of the "sc-" (Stephen's C) family of libraries. Each library is intended to be small and modular, built using the Meson build system for easy dependency management. For full examples of the use of this and other "sc-" libraries, see the sc-examples repository.

#Development

Run the following to create a build directory:

meson build

You may then compile (or re-compile) with:

ninja -C build

When you would like to commit your changes, please ensure that you have pre-commit hooks installed, so that automated checks can run on your code:

pre-commit install