Skip to content

Commit 82c9c62

Browse files
committed
Add initial package content
1 parent 85277eb commit 82c9c62

File tree

21 files changed

+5922
-0
lines changed

21 files changed

+5922
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Disable automatic end-of-line conversion for all files
2+
* -text

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
on: [push, pull_request]
3+
4+
env:
5+
CARGO_TERM_COLOR: always
6+
7+
jobs:
8+
build_and_test:
9+
runs-on: ubuntu-24.04
10+
strategy:
11+
matrix:
12+
toolchain:
13+
- stable
14+
- beta
15+
- nightly
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Install Toolchain
19+
run: |
20+
rustup update ${{ matrix.toolchain }}
21+
rustup default ${{ matrix.toolchain }}
22+
- name: Build
23+
run: cargo build --verbose --features="fail-on-warnings"
24+
- name: Test
25+
run: cargo test --verbose --features="fail-on-warnings"
26+
- name: Docs
27+
run: cargo doc --no-deps --features="fail-on-warnings"
28+
29+
stylecheck:
30+
runs-on: ubuntu-24.04
31+
container: librepcb/librepcb-dev:devtools-4
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Stylecheck
35+
run: .github/workflows/stylecheck.sh
36+
- name: Cargo Clippy
37+
run: cargo clippy --features="fail-on-warnings"
38+
- name: Reuse Lint
39+
run: reuse --suppress-deprecation lint

.github/workflows/stylecheck.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
# set shell settings (see https://sipb.mit.edu/doc/safe-shell/)
4+
set -euv -o pipefail
5+
6+
# fix git error
7+
git config --global --add safe.directory $PWD
8+
9+
# check if all files have Unix line endings
10+
(git grep -Il $'\r' -- ':/') && exit 1
11+
12+
# check if no file contains trailing spaces
13+
(git grep -Il ' $' -- ':/') && exit 1
14+
15+
# check if no file contains tabulators (with some exceptions)
16+
(git grep -Il $'\t' -- ':/' ':!/LICENSES/') && exit 1
17+
18+
# check rust code formatting
19+
for f in $(git ls-files -- '*.rs'); do
20+
(rustfmt --check "$f") || exit 1
21+
done
22+
23+
# check formatting of .reuse/dep5
24+
(debian-copyright-sorter --iml -s casefold -o ".reuse/dep5" ".reuse/dep5") || exit 1
25+
(git diff --exit-code -- ".reuse/dep5") || exit 1

.reuse/dep5

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: interactive-html-bom-rs
3+
Source: https://github.com/LibrePCB/interactive-html-bom-rs
4+
5+
Files:
6+
.gitattributes
7+
.github/*
8+
.gitignore
9+
.rustfmt.toml
10+
Cargo.toml
11+
README.md
12+
src/**.rs
13+
src/web/version.txt
14+
tests/**.rs
15+
update_web_files.sh
16+
Copyright: LibrePCB Developers
17+
License: MIT
18+
19+
Files:
20+
src/web/ibom.css
21+
src/web/ibom.html
22+
src/web/ibom.js
23+
src/web/render.js
24+
src/web/table-util.js
25+
src/web/util.js
26+
Copyright: InteractiveHtmlBom
27+
License: MIT
28+
29+
Files: src/web/split.js
30+
Copyright: Split.js
31+
License: MIT
32+
33+
Files: src/web/pep.js
34+
Copyright: jQuery Foundation and other contributors
35+
License: MIT
36+
37+
Files: src/web/lz-string.js
38+
Copyright: 2013 Pieroxy <[email protected]>
39+
License: WTFPL

.rustfmt.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
edition = "2021"
2+
hard_tabs = false
3+
max_width = 80
4+
newline_style = "Unix"
5+
tab_spaces = 2

Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "interactive-html-bom"
3+
description = "Interactive HTML BOM Generator"
4+
keywords = ["pcb", "eda", "bom"]
5+
repository = "https://github.com/LibrePCB/interactive-html-bom-rs"
6+
readme = "README.md"
7+
license = "MIT"
8+
version = "0.1.0"
9+
edition = "2021"
10+
exclude = ["/.git*", "/.reuse/", "/LICENSES/", "/.rustfmt.toml"]
11+
12+
[features]
13+
fail-on-warnings = []
14+
15+
[dependencies]
16+
jzon = "0.12.5"
17+
lz-str = "0.2.1"

LICENSES/MIT.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 LibrePCB
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

LICENSES/WTFPL.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2+
Version 2, December 2004
3+
4+
Copyright (C) 2004 Sam Hocevar <[email protected]>
5+
6+
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
7+
8+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
9+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
10+
11+
0. You just DO WHAT THE FUCK YOU WANT TO.

0 commit comments

Comments
 (0)