Skip to content

Commit 74416d2

Browse files
committed
feat: initial commit
0 parents  commit 74416d2

File tree

19 files changed

+980
-0
lines changed

19 files changed

+980
-0
lines changed

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
github: sbertix
4+
custom: ['https://www.paypal.me/sbertix']
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Report things behaving unexpectedly requiring a fix. Use the new Discussions
4+
section for requests and support.
5+
title: ''
6+
labels: bug
7+
assignees: sbertix
8+
9+
---
10+
11+
- [ ] I've searched past issues and I couldn't find reference to this.
12+
13+
**DropView version**
14+
e.g. `0.1.0`, etc.
15+
16+
**Describe the bug**
17+
A clear and concise description of what the bug is.
18+
19+
**To reproduce**
20+
Steps to reproduce the behavior:
21+
1. Go to '...'
22+
2. Click on '....'
23+
3. Scroll down to '....'
24+
4. See error
25+
26+
**Expected behavior**
27+
A clear and concise description of what you expected to happen.
28+
29+
**Additional context**
30+
Add any other context about the problem here.
31+
32+
**Device and system**
33+
e.g. iPhone Simulator 13.5.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Critical bug report
3+
about: Report crashes and other exceptions rendering Swiftagram unusable.
4+
title: ''
5+
labels: critical
6+
assignees: sbertix
7+
8+
---
9+
10+
- [ ] I've searched past issues and I couldn't find reference to this.
11+
12+
**DropView version**
13+
e.g. `0.1.0`, etc.
14+
15+
**Describe the bug**
16+
A clear and concise description of what the bug is.
17+
18+
**To reproduce**
19+
Steps to reproduce the behavior:
20+
1. Go to '...'
21+
2. Click on '....'
22+
3. Scroll down to '....'
23+
4. See error
24+
25+
**Expected behavior**
26+
A clear and concise description of what you expected to happen.
27+
28+
**Additional context**
29+
Add any other context about the problem here.
30+
31+
**Device and system**
32+
e.g. iPhone Simulator 13.5.

.github/workflows/push.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: checks
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
- reopened
10+
push:
11+
branches:
12+
- main
13+
14+
jobs:
15+
# validate commits.
16+
validate-commits:
17+
name: Conventional Commits
18+
runs-on: ubuntu-latest
19+
if: ${{ github.event.number }}
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
- name: Commisery
25+
uses: KevinDeJong-TomTom/commisery-action@master
26+
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
pull_request: ${{ github.event.number }}
29+
30+
# lint code.
31+
lint:
32+
name: Lint
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
- uses: dorny/paths-filter@v2
39+
id: changes
40+
with:
41+
base: ${{ github.event.pull_request.base.sha || github.event.push.before }}
42+
ref: ${{ github.event.pull_request.head.sha || github.event.push.head }}
43+
filters: |
44+
src:
45+
- '**/*.swift'
46+
- name: Lint
47+
if: steps.changes.outputs.src == 'true'
48+
uses: norio-nomura/[email protected]
49+
with:
50+
args: --strict
51+
52+
# build the library.
53+
build:
54+
name: Build
55+
needs: lint
56+
runs-on: macos-latest
57+
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v2
61+
- uses: dorny/paths-filter@v2
62+
id: changes
63+
with:
64+
base: ${{ github.event.pull_request.base.sha || github.event.push.before }}
65+
ref: ${{ github.event.pull_request.head.sha || github.event.push.head }}
66+
filters: |
67+
src:
68+
- '**/*.swift'
69+
- name: Build
70+
if: steps.changes.outputs.src == 'true'
71+
run: swift build

.github/workflows/release.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
# release a new version.
10+
release:
11+
name: Release
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
# checkout `main`.
16+
- name: Checkout
17+
id: checkout
18+
uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
ref: main
23+
# create the changelog.
24+
- name: Changelog
25+
id: changelog
26+
uses: TriPSs/conventional-changelog-action@v3
27+
with:
28+
git-message: "chore(release): relase \'v{version}\'"
29+
git-user-name: "github-actions"
30+
git-user-email: "41898282+github-actions[bot]@users.noreply.github.com"
31+
github-token: ${{ secrets.GITHUB_TOKEN }}
32+
tag-prefix: ''
33+
output-file: 'false'
34+
skip-commit: 'true'
35+
skip-version-file: 'true'
36+
# release the new version.
37+
- name: Release
38+
id: release
39+
uses: actions/create-release@v1
40+
if: ${{ steps.changelog.outputs.skipped == 'false' }}
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
tag_name: ${{ steps.changelog.outputs.tag }}
45+
release_name: v${{ steps.changelog.outputs.tag }}
46+
body: ${{ steps.changelog.outputs.clean_changelog }}
47+
48+
# create docs.
49+
docs:
50+
name: Docs
51+
needs: release
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
# checkout the `main` branch.
56+
- name: Checkout
57+
id: checkout
58+
uses: actions/checkout@v2
59+
with:
60+
token: ${{ secrets.GITHUB_TOKEN }}
61+
ref: main
62+
# create documentation
63+
- name: Docs
64+
uses: SwiftDocOrg/swift-doc@master
65+
with:
66+
base-url: "https://sbertix.github.io/DropView"
67+
format: "html"
68+
inputs: "Sources"
69+
module-name: DropView
70+
output: docs/DropView
71+
# update permissions.
72+
- name: Update Permissions
73+
run: 'sudo chown --recursive $USER docs'
74+
# publish to GitHub pages.
75+
- name: Publish
76+
uses: JamesIves/github-pages-deploy-action@releases/v3
77+
with:
78+
ACCESS_TOKEN: ${{ secrets.CHATOPS_PAT }}
79+
BRANCH: gh-pages
80+
FOLDER: docs

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
6+
DerivedData/
7+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

.swiftlint.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
disabled_rules:
2+
- operator_whitespace
3+
- multiple_closures_with_trailing_closure
4+
5+
opt_in_rules:
6+
- array_init
7+
- class_delegate_protocol
8+
- collection_alignment
9+
- contains_over_first_not_nil
10+
- empty_count
11+
- empty_string
12+
- fallthrough
13+
- fatal_error_message
14+
- first_where
15+
- for_where
16+
- last_where
17+
- legacy_multiple
18+
- legacy_random
19+
- multiline_arguments
20+
- multiline_parameters
21+
- reduce_into
22+
- sorted_first_last
23+
- sorted_imports
24+
- static_operator
25+
- toggle_bool
26+
- unavailable_function
27+
- vertical_parameter_alignment_on_call
28+
- yoda_condition
29+
30+
included:
31+
- Examples
32+
- Sources
33+
- Tests
34+
35+
analyzer_rules:
36+
- explicit_self
37+
38+
array_init: error
39+
class_delegate_protocol: error
40+
contains_over_first_not_nil: error
41+
empty_string: error
42+
fatal_error_message: error
43+
first_where: error
44+
for_where: error
45+
last_where: error
46+
legacy_multiple: error
47+
legacy_random: error
48+
multiline_parameters: error
49+
sorted_first_last: error
50+
static_operator: error
51+
unavailable_function: error
52+
vertical_parameter_alignment_on_call: error
53+
54+
nesting:
55+
type_level:
56+
warning: 2
57+
58+
cyclomatic_complexity:
59+
warning: 12
60+
error: 15
61+
62+
file_length:
63+
warning: 1000
64+
error: 1500
65+
66+
type_body_length:
67+
warning: 600
68+
error: 1000
69+
70+
function_body_length:
71+
warning: 180
72+
error: 200
73+
74+
line_length:
75+
warning: 150
76+
error: 150
77+
78+
identifier_name:
79+
max_length:
80+
warning: 45
81+
error: 50
82+
min_length:
83+
warning: 3
84+
error: 1
85+
excluded:
86+
- x
87+
- y
88+
- z
89+
- ok # it might be removed in the future.
90+
- id # prefer identifier for non `Identifiable` conformacies.
91+
- iv
92+
- pk
93+
- fr
94+
- in
95+
- me
96+
- tv
97+
- URL
98+
- url
99+
100+
type_name:
101+
min_length:
102+
warning: 3
103+
error: 1
104+
excluded:
105+
- LG
106+
107+
function_parameter_count:
108+
warning: 10
109+
error: 15
110+
111+
reporter: "xcode"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Package.swift

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// swift-tools-version:5.3
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "DropView",
8+
platforms: [
9+
.iOS(.v13)
10+
],
11+
products: [
12+
// Products define the executables and libraries a package produces, and make them visible to other packages.
13+
.library(
14+
name: "DropView",
15+
targets: ["DropView"]),
16+
],
17+
dependencies: [
18+
// Dependencies declare other packages that this package depends on.
19+
// .package(url: /* package url */, from: "1.0.0"),
20+
],
21+
targets: [
22+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
23+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
24+
.target(
25+
name: "DropView",
26+
dependencies: [])
27+
]
28+
)

Resources/header.png

83.2 KB
Loading

0 commit comments

Comments
 (0)