add other default project files

This commit is contained in:
Jesse Squires 2020-01-25 23:40:40 -08:00
parent e949a34601
commit 4bc36c41b0
No known key found for this signature in database
GPG Key ID: 153766AC1FA1A758
5 changed files with 124 additions and 0 deletions

32
build_docs.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
# Created by Jesse Squires
# https://www.jessesquires.com
#
# Copyright © 2020-present Jesse Squires
#
# Docs by jazzy
# https://github.com/realm/jazzy
# ------------------------------
PROJECT=""
if which jazzy >/dev/null; then
jazzy \
--clean \
--author "Jesse Squires" \
--author_url "https://jessesquires.com" \
--github_url "https://github.com/jessesquires/$PROJECT" \
--module "$PROJECT" \
--source-directory . \
--readme "README.md" \
--documentation "Guides/*.md" \
--output docs/
exit
else
echo "
Error: jazzy not installed! <https://github.com/realm/jazzy>
Install: gem install jazzy
"
exit 1
fi

36
lint.sh Executable file
View File

@ -0,0 +1,36 @@
#!/bin/bash
# Created by Jesse Squires
# https://www.jessesquires.com
#
# Copyright © 2020-present Jesse Squires
#
# SwiftLint
# https://github.com/realm/swiftlint
# ------------------------------
VERSION="0.35.0"
FOUND=$(swiftlint version)
if which swiftlint >/dev/null; then
swiftlint lint --config ./.swiftlint.yml
exit
else
echo "
Error: SwiftLint not installed!
Download from https://github.com/realm/SwiftLint,
or brew install swiftlint.
"
fi
if [ $(swiftlint version) != $VERSION ]; then
echo "
Warning: incorrect SwiftLint installed!
Expected: $VERSION
Found: $FOUND
Download from https://github.com/realm/SwiftLint,
or brew upgrade swiftlint.
"
fi
exit

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>FILEHEADER</key>
<string>
// Created by Jesse Squires
// https://www.jessesquires.com
//
// Documentation
// https://jessesquires.github.io/PROJECT_NAME
//
// GitHub
// https://github.com/jessesquires/PROJECT_NAME
//
// Copyright © YEAR-present Jesse Squires
// </string>
</dict>
</plist>

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Jesse Squires
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,16 @@
# Default project files
This directory contains miscellaneous default project files, like build scripts, etc.
These must be copied to new repositories, and updated with project-specific details.
## Contents
### Scripts
- `lint.sh`, swift lint script
- `build_docs.sh`, jazzy docs script
### Templates
- `IDETemplateMacros.plist` to [customize Xcode header comments](https://oleb.net/blog/2017/07/xcode-9-text-macros/). Must be placed in `<ProjectName>.xcodeproj/xcshareddata/IDETemplateMacros.plist` or `<WorkspaceName>.xcworkspace/xcshareddata/IDETemplateMacros.plist`.