a11y-lint 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -0
- data/CHANGELOG.md +12 -0
- data/CLAUDE.md +1 -0
- data/docs/.gitignore +45 -0
- data/docs/.ruby-version +1 -0
- data/docs/Gemfile +42 -0
- data/docs/Gemfile.lock +174 -0
- data/docs/README.md +71 -0
- data/docs/Rakefile +49 -0
- data/docs/bin/bridgetown +27 -0
- data/docs/bin/bt +27 -0
- data/docs/config/esbuild.defaults.js +361 -0
- data/docs/config/initializers.rb +105 -0
- data/docs/config/puma.rb +34 -0
- data/docs/config.ru +7 -0
- data/docs/esbuild.config.js +44 -0
- data/docs/frontend/javascript/index.js +7 -0
- data/docs/frontend/styles/index.css +84 -0
- data/docs/frontend/styles/syntax-highlighting.css +77 -0
- data/docs/jsconfig.json +10 -0
- data/docs/package-lock.json +3344 -0
- data/docs/package.json +20 -0
- data/docs/plugins/builders/.keep +0 -0
- data/docs/plugins/site_builder.rb +4 -0
- data/docs/postcss.config.js +11 -0
- data/docs/server/roda_app.rb +17 -0
- data/docs/server/routes/hello.rb.sample +10 -0
- data/docs/src/404.html +10 -0
- data/docs/src/500.html +10 -0
- data/docs/src/CNAME +1 -0
- data/docs/src/_components/shared/navbar.erb +11 -0
- data/docs/src/_components/shared/navbar.rb +5 -0
- data/docs/src/_data/site_metadata.yml +11 -0
- data/docs/src/_layouts/default.erb +15 -0
- data/docs/src/_layouts/page.erb +7 -0
- data/docs/src/_layouts/post.erb +7 -0
- data/docs/src/_partials/_footer.erb +3 -0
- data/docs/src/_partials/_head.erb +10 -0
- data/docs/src/_posts/2026-04-28-welcome-to-bridgetown.md +26 -0
- data/docs/src/about.md +10 -0
- data/docs/src/favicon.ico +0 -0
- data/docs/src/images/logo.svg +91 -0
- data/docs/src/index.md +20 -0
- data/docs/src/posts.md +14 -0
- data/docs/src/rules/form-controls-need-accessible-names.md +88 -0
- data/docs/src/rules/images-need-alt-text.md +260 -0
- data/docs/tmp/pids/.keep +0 -0
- data/lib/a11y/lint/call_node.rb +41 -21
- data/lib/a11y/lint/cli.rb +6 -16
- data/lib/a11y/lint/configuration.rb +14 -0
- data/lib/a11y/lint/erb_element_node.rb +51 -6
- data/lib/a11y/lint/erb_runner.rb +51 -7
- data/lib/a11y/lint/phlex_node.rb +24 -5
- data/lib/a11y/lint/phlex_runner.rb +31 -7
- data/lib/a11y/lint/ruby_code.rb +29 -0
- data/lib/a11y/lint/rules/robust/simple_form_select_missing_accessible_name.rb +63 -0
- data/lib/a11y/lint/slim_node.rb +57 -3
- data/lib/a11y/lint/slim_runner.rb +5 -4
- data/lib/a11y/lint/version.rb +1 -1
- metadata +46 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c17375bf978e252c281fec08a28a33d0fc22642e49d8aeb5af721454dc967f1
|
|
4
|
+
data.tar.gz: 9c89ac25d4163cb4807b31c396114bac42a153ecd7309effb4c77fd19c292c91
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 637000bab2f93eacb3a7a799a22e8844c450f7a0da6226cada99866c57accc4bb60a4dfc36bbf7355fa35aaaf155a88bf593caef26c159d8451b0053b83f5105
|
|
7
|
+
data.tar.gz: ae04ef4e64f360df93fae63aaa502f08462958f29c3fa5e1f9afe89b263dd0d1a8ec2f0212e35507bb30ddfab7804ae50f88e9278b3e565ca591c889beb739dd
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.13.0] - 2026-04-28
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `SimpleFormSelectMissingAccessibleName` rule: detects Simple Form `form.input` calls rendering a select (via `collection:` or `as: :select`) with `label: false`/`label: ""` and no `aria-label` or `aria-labelledby` in `input_html` (WCAG 4.1.2). Slim and ERB only; no-op in Phlex by design
|
|
15
|
+
|
|
16
|
+
## [0.12.0] - 2026-04-27
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- `.a11y-lint.yml` now supports a top-level `hidden_wrapper_classes` list; content inside elements whose class matches is treated as hidden from assistive technology when the four accessible-name rules (`AnchorMissingAccessibleName`, `ButtonMissingAccessibleName`, `LinkToMissingAccessibleName`, `ButtonTagMissingAccessibleName`) determine whether a button/link has an accessible name. Opt-in; default is no filtering
|
|
21
|
+
|
|
10
22
|
## [0.11.0] - 2026-04-21
|
|
11
23
|
|
|
12
24
|
### Added
|
data/CLAUDE.md
CHANGED
|
@@ -31,6 +31,7 @@ a11y-lint is a Ruby gem (v0.1.0) for accessibility linting. It uses the `A11y::L
|
|
|
31
31
|
- **Type signatures (RBS):** `sig/a11y/lint.rbs`
|
|
32
32
|
- **Tests:** `test/` directory using Minitest; test helper at `test/test_helper.rb`
|
|
33
33
|
- **Dummy app:** `test/fixtures/dummy_app/` — a fixture app with Slim/ERB/Phlex templates for end-to-end smoke testing before releases (`bundle exec a11y-lint test/fixtures/dummy_app`)
|
|
34
|
+
- **Documentation site:** `docs/` — Bridgetown site deployed to https://a11y-lint.guidedrails.com via `.github/workflows/docs.yml` on push to `main`. Has its own `Gemfile`, `package.json`, and Ruby version, and is excluded from the gem's RuboCop config. Rule reference pages live in `docs/src/rules/` (one page per WCAG concept; individual rule classes are anchor sections, e.g. `/rules/images-need-alt-text/#img-missing-alt`). Run locally with `cd docs && bin/bridgetown start`.
|
|
34
35
|
|
|
35
36
|
## Rule Scoping Convention
|
|
36
37
|
|
data/docs/.gitignore
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Bridgetown
|
|
2
|
+
output
|
|
3
|
+
.bridgetown-cache
|
|
4
|
+
.bridgetown-metadata
|
|
5
|
+
.routes.json
|
|
6
|
+
|
|
7
|
+
# Dependency folders
|
|
8
|
+
node_modules
|
|
9
|
+
|
|
10
|
+
# Lockfile is committed for reproducible builds (overrides global gitignore)
|
|
11
|
+
!package-lock.json
|
|
12
|
+
|
|
13
|
+
# Caches
|
|
14
|
+
.sass-cache
|
|
15
|
+
.npm
|
|
16
|
+
.node_repl_history
|
|
17
|
+
|
|
18
|
+
# Ignore bundler config.
|
|
19
|
+
/.bundle
|
|
20
|
+
|
|
21
|
+
# Ignore Byebug command history file.
|
|
22
|
+
.byebug_history
|
|
23
|
+
|
|
24
|
+
# dotenv environment variables file
|
|
25
|
+
.env
|
|
26
|
+
|
|
27
|
+
# Mac files
|
|
28
|
+
.DS_Store
|
|
29
|
+
|
|
30
|
+
# Yarn
|
|
31
|
+
yarn-error.log
|
|
32
|
+
yarn-debug.log*
|
|
33
|
+
.pnp/
|
|
34
|
+
.pnp.js
|
|
35
|
+
# Yarn Integrity file
|
|
36
|
+
.yarn-integrity
|
|
37
|
+
|
|
38
|
+
# Ignore all tempfiles.
|
|
39
|
+
/tmp/*
|
|
40
|
+
!/tmp/.keep
|
|
41
|
+
|
|
42
|
+
# Ignore pidfiles, but keep the directory.
|
|
43
|
+
/tmp/pids/*
|
|
44
|
+
!/tmp/pids/
|
|
45
|
+
!/tmp/pids/.keep
|
data/docs/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby-3.4.7
|
data/docs/Gemfile
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
####
|
|
2
|
+
# Welcome to your project's Gemfile, used by Rubygems & Bundler.
|
|
3
|
+
#
|
|
4
|
+
# To install a plugin, run:
|
|
5
|
+
#
|
|
6
|
+
# bundle add new-plugin-name
|
|
7
|
+
#
|
|
8
|
+
# and add a relevant init comment to your config/initializers.rb file.
|
|
9
|
+
#
|
|
10
|
+
# When you run Bridgetown commands, we recommend using a binstub like so:
|
|
11
|
+
#
|
|
12
|
+
# bin/bridgetown start (or console, etc.)
|
|
13
|
+
#
|
|
14
|
+
# This will help ensure the proper Bridgetown version is running.
|
|
15
|
+
####
|
|
16
|
+
|
|
17
|
+
# Gems source:
|
|
18
|
+
source "https://rubygems.org"
|
|
19
|
+
# Or you can switch the above to an alternate community-led server:
|
|
20
|
+
# source "https://gem.coop"
|
|
21
|
+
|
|
22
|
+
# Git-based sources:
|
|
23
|
+
git_source(:github) { "https://github.com/#{_1}.git" }
|
|
24
|
+
git_source(:codeberg) { "https://codeberg.org/#{_1}.git" }
|
|
25
|
+
|
|
26
|
+
# If you need to upgrade/switch Bridgetown versions, change the line below
|
|
27
|
+
# and then run `bundle update bridgetown`
|
|
28
|
+
gem "bridgetown", "~> 2.1.2"
|
|
29
|
+
|
|
30
|
+
# Uncomment to add file-based dynamic routing to your project:
|
|
31
|
+
# gem "bridgetown-routes", "~> 2.1.2"
|
|
32
|
+
|
|
33
|
+
# Puma is the Rack-compatible web server used by Bridgetown
|
|
34
|
+
# (you can optionally limit this to the "development" group)
|
|
35
|
+
gem "puma", "< 8"
|
|
36
|
+
|
|
37
|
+
# Uncomment to use the Inspectors API to manipulate the output
|
|
38
|
+
# of your HTML or XML resources:
|
|
39
|
+
# gem "nokogiri", "~> 1.18"
|
|
40
|
+
|
|
41
|
+
# Or for faster parsing of HTML-only resources via Inspectors, use Nokolexbor:
|
|
42
|
+
# gem "nokolexbor", "~> 0.6"
|
data/docs/Gemfile.lock
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: https://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
addressable (2.9.0)
|
|
5
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
6
|
+
amazing_print (1.8.1)
|
|
7
|
+
base64 (0.3.0)
|
|
8
|
+
bigdecimal (4.1.2)
|
|
9
|
+
bridgetown (2.1.2)
|
|
10
|
+
bridgetown-builder (= 2.1.2)
|
|
11
|
+
bridgetown-core (= 2.1.2)
|
|
12
|
+
bridgetown-foundation (= 2.1.2)
|
|
13
|
+
bridgetown-paginate (= 2.1.2)
|
|
14
|
+
bridgetown-builder (2.1.2)
|
|
15
|
+
bridgetown-core (= 2.1.2)
|
|
16
|
+
bridgetown-core (2.1.2)
|
|
17
|
+
addressable (~> 2.4)
|
|
18
|
+
amazing_print (~> 1.2)
|
|
19
|
+
base64 (>= 0.3)
|
|
20
|
+
bigdecimal (>= 3.2)
|
|
21
|
+
bridgetown-foundation (= 2.1.2)
|
|
22
|
+
csv (~> 3.2)
|
|
23
|
+
erubi (~> 1.9)
|
|
24
|
+
faraday (~> 2.0)
|
|
25
|
+
faraday-follow_redirects (~> 0.3)
|
|
26
|
+
freyia (>= 0.5)
|
|
27
|
+
i18n (~> 1.0)
|
|
28
|
+
irb (>= 1.14)
|
|
29
|
+
kramdown (~> 2.1)
|
|
30
|
+
kramdown-parser-gfm (~> 1.0)
|
|
31
|
+
liquid (>= 5.0, < 5.5)
|
|
32
|
+
listen (~> 3.0)
|
|
33
|
+
rack (>= 3.0)
|
|
34
|
+
rackup (~> 2.0)
|
|
35
|
+
rake (>= 13.0)
|
|
36
|
+
roda (~> 3.46)
|
|
37
|
+
rouge (>= 3.0, < 5.0)
|
|
38
|
+
samovar (>= 2.4)
|
|
39
|
+
securerandom (~> 0.4)
|
|
40
|
+
serbea (>= 2.4.1)
|
|
41
|
+
signalize (~> 1.3)
|
|
42
|
+
streamlined (>= 0.6.0)
|
|
43
|
+
tilt (~> 2.0)
|
|
44
|
+
zeitwerk (>= 2.7.3)
|
|
45
|
+
bridgetown-foundation (2.1.2)
|
|
46
|
+
dry-inflector (>= 1.0)
|
|
47
|
+
hash_with_dot_access (~> 2.0)
|
|
48
|
+
inclusive (~> 1.0)
|
|
49
|
+
zeitwerk (~> 2.5)
|
|
50
|
+
bridgetown-paginate (2.1.2)
|
|
51
|
+
bridgetown-core (= 2.1.2)
|
|
52
|
+
concurrent-ruby (1.3.6)
|
|
53
|
+
console (1.34.3)
|
|
54
|
+
fiber-annotation
|
|
55
|
+
fiber-local (~> 1.1)
|
|
56
|
+
json
|
|
57
|
+
csv (3.3.5)
|
|
58
|
+
date (3.5.1)
|
|
59
|
+
dry-inflector (1.3.1)
|
|
60
|
+
erb (6.0.4)
|
|
61
|
+
erubi (1.13.1)
|
|
62
|
+
faraday (2.14.1)
|
|
63
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
64
|
+
json
|
|
65
|
+
logger
|
|
66
|
+
faraday-follow_redirects (0.5.0)
|
|
67
|
+
faraday (>= 1, < 3)
|
|
68
|
+
faraday-net_http (3.4.2)
|
|
69
|
+
net-http (~> 0.5)
|
|
70
|
+
ffi (1.17.4)
|
|
71
|
+
ffi (1.17.4-aarch64-linux-gnu)
|
|
72
|
+
ffi (1.17.4-aarch64-linux-musl)
|
|
73
|
+
ffi (1.17.4-arm-linux-gnu)
|
|
74
|
+
ffi (1.17.4-arm-linux-musl)
|
|
75
|
+
ffi (1.17.4-arm64-darwin)
|
|
76
|
+
ffi (1.17.4-x86-linux-gnu)
|
|
77
|
+
ffi (1.17.4-x86-linux-musl)
|
|
78
|
+
ffi (1.17.4-x86_64-darwin)
|
|
79
|
+
ffi (1.17.4-x86_64-linux-gnu)
|
|
80
|
+
ffi (1.17.4-x86_64-linux-musl)
|
|
81
|
+
fiber-annotation (0.2.0)
|
|
82
|
+
fiber-local (1.1.0)
|
|
83
|
+
fiber-storage
|
|
84
|
+
fiber-storage (1.0.1)
|
|
85
|
+
freyia (0.6.2)
|
|
86
|
+
hash_with_dot_access (2.2.0)
|
|
87
|
+
i18n (1.14.8)
|
|
88
|
+
concurrent-ruby (~> 1.0)
|
|
89
|
+
inclusive (1.1.0)
|
|
90
|
+
io-console (0.8.2)
|
|
91
|
+
irb (1.18.0)
|
|
92
|
+
pp (>= 0.6.0)
|
|
93
|
+
prism (>= 1.3.0)
|
|
94
|
+
rdoc (>= 4.0.0)
|
|
95
|
+
reline (>= 0.4.2)
|
|
96
|
+
json (2.19.4)
|
|
97
|
+
kramdown (2.5.2)
|
|
98
|
+
rexml (>= 3.4.4)
|
|
99
|
+
kramdown-parser-gfm (1.1.0)
|
|
100
|
+
kramdown (~> 2.0)
|
|
101
|
+
liquid (5.4.0)
|
|
102
|
+
listen (3.10.0)
|
|
103
|
+
logger
|
|
104
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
105
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
|
106
|
+
logger (1.7.0)
|
|
107
|
+
mapping (1.1.3)
|
|
108
|
+
net-http (0.9.1)
|
|
109
|
+
uri (>= 0.11.1)
|
|
110
|
+
nio4r (2.7.5)
|
|
111
|
+
pp (0.6.3)
|
|
112
|
+
prettyprint
|
|
113
|
+
prettyprint (0.2.0)
|
|
114
|
+
prism (1.9.0)
|
|
115
|
+
psych (5.3.1)
|
|
116
|
+
date
|
|
117
|
+
stringio
|
|
118
|
+
public_suffix (7.0.5)
|
|
119
|
+
puma (7.2.0)
|
|
120
|
+
nio4r (~> 2.0)
|
|
121
|
+
rack (3.2.6)
|
|
122
|
+
rackup (2.3.1)
|
|
123
|
+
rack (>= 3)
|
|
124
|
+
rake (13.4.2)
|
|
125
|
+
rb-fsevent (0.11.2)
|
|
126
|
+
rb-inotify (0.11.1)
|
|
127
|
+
ffi (~> 1.0)
|
|
128
|
+
rdoc (7.2.0)
|
|
129
|
+
erb
|
|
130
|
+
psych (>= 4.0.0)
|
|
131
|
+
tsort
|
|
132
|
+
reline (0.6.3)
|
|
133
|
+
io-console (~> 0.5)
|
|
134
|
+
rexml (3.4.4)
|
|
135
|
+
roda (3.103.0)
|
|
136
|
+
rack
|
|
137
|
+
rouge (4.7.0)
|
|
138
|
+
samovar (2.4.1)
|
|
139
|
+
console (~> 1.0)
|
|
140
|
+
mapping (~> 1.0)
|
|
141
|
+
securerandom (0.4.1)
|
|
142
|
+
serbea (2.4.1)
|
|
143
|
+
erubi (>= 1.13)
|
|
144
|
+
tilt (>= 2.6)
|
|
145
|
+
signalize (1.3.1)
|
|
146
|
+
concurrent-ruby (~> 1.2)
|
|
147
|
+
streamlined (0.6.2)
|
|
148
|
+
serbea (>= 2.1)
|
|
149
|
+
zeitwerk (~> 2.5)
|
|
150
|
+
stringio (3.2.0)
|
|
151
|
+
tilt (2.7.0)
|
|
152
|
+
tsort (0.2.0)
|
|
153
|
+
uri (1.1.1)
|
|
154
|
+
zeitwerk (2.7.5)
|
|
155
|
+
|
|
156
|
+
PLATFORMS
|
|
157
|
+
aarch64-linux-gnu
|
|
158
|
+
aarch64-linux-musl
|
|
159
|
+
arm-linux-gnu
|
|
160
|
+
arm-linux-musl
|
|
161
|
+
arm64-darwin
|
|
162
|
+
ruby
|
|
163
|
+
x86-linux-gnu
|
|
164
|
+
x86-linux-musl
|
|
165
|
+
x86_64-darwin
|
|
166
|
+
x86_64-linux-gnu
|
|
167
|
+
x86_64-linux-musl
|
|
168
|
+
|
|
169
|
+
DEPENDENCIES
|
|
170
|
+
bridgetown (~> 2.1.2)
|
|
171
|
+
puma (< 8)
|
|
172
|
+
|
|
173
|
+
BUNDLED WITH
|
|
174
|
+
2.6.9
|
data/docs/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Bridgetown Website README
|
|
2
|
+
|
|
3
|
+
Welcome to your new Bridgetown website! You can update this README file to provide additional context and setup information for yourself or other contributors.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Bridgetown Website README](#bridgetown-website-readme)
|
|
8
|
+
- [Table of Contents](#table-of-contents)
|
|
9
|
+
- [Prerequisites](#prerequisites)
|
|
10
|
+
- [Install](#install)
|
|
11
|
+
- [Development](#development)
|
|
12
|
+
- [Commands](#commands)
|
|
13
|
+
- [Deployment](#deployment)
|
|
14
|
+
- [Contributing](#contributing)
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
- [GCC](https://gcc.gnu.org/install/)
|
|
19
|
+
- [Make](https://www.gnu.org/software/make/)
|
|
20
|
+
- [Ruby](https://www.ruby-lang.org/en/downloads/)
|
|
21
|
+
- `>= 3.2`
|
|
22
|
+
- [Bridgetown Gem](https://rubygems.org/gems/bridgetown)
|
|
23
|
+
- `gem install bridgetown -N`
|
|
24
|
+
- [Node](https://nodejs.org)
|
|
25
|
+
- `>= 20`
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
cd bridgetown-site-folder
|
|
31
|
+
bundle install && npm install
|
|
32
|
+
```
|
|
33
|
+
> Learn more: [Bridgetown Getting Started Documentation](https://www.bridgetownrb.com/docs/).
|
|
34
|
+
|
|
35
|
+
## Development
|
|
36
|
+
|
|
37
|
+
To start your site in development mode, run `bin/bridgetown start` and navigate to [localhost:4000](https://localhost:4000/)!
|
|
38
|
+
|
|
39
|
+
Use a [theme](https://github.com/topics/bridgetown-theme) or add some [plugins](https://www.bridgetownrb.com/plugins/) to get started quickly.
|
|
40
|
+
|
|
41
|
+
### Commands
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
# running locally
|
|
45
|
+
bin/bridgetown start
|
|
46
|
+
|
|
47
|
+
# build & deploy to production
|
|
48
|
+
bin/bridgetown deploy
|
|
49
|
+
|
|
50
|
+
# load the site up within a Ruby console (IRB)
|
|
51
|
+
bin/bridgetown console
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
> Learn more: [Bridgetown CLI Documentation](https://www.bridgetownrb.com/docs/command-line-usage)
|
|
55
|
+
|
|
56
|
+
## Deployment
|
|
57
|
+
|
|
58
|
+
You can deploy Bridgetown sites on hosts like statichost.eu and Render as well as traditional web servers by simply building and copying the output folder to your HTML root.
|
|
59
|
+
|
|
60
|
+
> Read the [Bridgetown Deployment Documentation](https://www.bridgetownrb.com/docs/deployment) for more information.
|
|
61
|
+
|
|
62
|
+
## Contributing
|
|
63
|
+
|
|
64
|
+
If repo is on GitHub:
|
|
65
|
+
|
|
66
|
+
1. Fork it
|
|
67
|
+
2. Clone the fork using `git clone` to your local development machine.
|
|
68
|
+
3. Create your feature branch (`git checkout -b my-new-feature`)
|
|
69
|
+
4. Commit your changes (`git commit -am 'Add some feature'`)
|
|
70
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
|
71
|
+
6. Create a new Pull Request
|
data/docs/Rakefile
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
require "bridgetown"
|
|
2
|
+
|
|
3
|
+
Bridgetown.load_tasks
|
|
4
|
+
|
|
5
|
+
# Run rake without specifying any command to execute a deploy build by default.
|
|
6
|
+
task default: :deploy
|
|
7
|
+
|
|
8
|
+
#
|
|
9
|
+
# Standard set of tasks, which you can customize if you wish:
|
|
10
|
+
#
|
|
11
|
+
desc "Build the Bridgetown site for deployment"
|
|
12
|
+
task :deploy => [:clean, "frontend:build"] do
|
|
13
|
+
Bridgetown::Commands::Build.start
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
desc "Build the site in a test environment"
|
|
17
|
+
task :test do
|
|
18
|
+
ENV["BRIDGETOWN_ENV"] = "test"
|
|
19
|
+
Bridgetown::Commands::Build.start
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
desc "Runs the clean command"
|
|
23
|
+
task :clean do
|
|
24
|
+
Bridgetown::Commands::Clean.start
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
namespace :frontend do
|
|
28
|
+
desc "Build the frontend with esbuild for deployment"
|
|
29
|
+
task :build do
|
|
30
|
+
sh "npm run esbuild"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
desc "Watch the frontend with esbuild during development"
|
|
34
|
+
task :dev do
|
|
35
|
+
sh "npm run esbuild-dev"
|
|
36
|
+
rescue Interrupt
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
#
|
|
41
|
+
# Add your own Rake tasks here! You can use `environment` as a prerequisite
|
|
42
|
+
# in order to write automations or other commands requiring a loaded site.
|
|
43
|
+
#
|
|
44
|
+
# task :my_task => :environment do
|
|
45
|
+
# puts site.root_dir
|
|
46
|
+
# automation do
|
|
47
|
+
# say_status :rake, "I'm a Rake tast =) #{site.config.url}"
|
|
48
|
+
# end
|
|
49
|
+
# end
|
data/docs/bin/bridgetown
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'bridgetown' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
bundle_binstub = File.expand_path("bundle", __dir__)
|
|
14
|
+
|
|
15
|
+
if File.file?(bundle_binstub)
|
|
16
|
+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
|
|
17
|
+
load(bundle_binstub)
|
|
18
|
+
else
|
|
19
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
20
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
require "rubygems"
|
|
25
|
+
require "bundler/setup"
|
|
26
|
+
|
|
27
|
+
load Gem.bin_path("bridgetown-core", "bridgetown")
|
data/docs/bin/bt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'bt' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
bundle_binstub = File.expand_path("bundle", __dir__)
|
|
14
|
+
|
|
15
|
+
if File.file?(bundle_binstub)
|
|
16
|
+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
|
|
17
|
+
load(bundle_binstub)
|
|
18
|
+
else
|
|
19
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
20
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
require "rubygems"
|
|
25
|
+
require "bundler/setup"
|
|
26
|
+
|
|
27
|
+
load Gem.bin_path("bridgetown-core", "bt")
|