bridgetown-core 1.0.0.alpha9 → 1.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/bin/bridgetown +6 -1
- data/bridgetown-core.gemspec +4 -3
- data/lib/bridgetown-core/collection.rb +6 -6
- data/lib/bridgetown-core/commands/base.rb +18 -18
- data/lib/bridgetown-core/commands/build.rb +1 -1
- data/lib/bridgetown-core/commands/clean.rb +2 -2
- data/lib/bridgetown-core/commands/console.rb +1 -0
- data/lib/bridgetown-core/commands/esbuild/esbuild.config.js +27 -0
- data/lib/bridgetown-core/commands/esbuild/esbuild.defaults.js.erb +216 -0
- data/lib/bridgetown-core/commands/esbuild/migrate-from-webpack.rb +47 -0
- data/lib/bridgetown-core/commands/esbuild/setup.rb +4 -0
- data/lib/bridgetown-core/commands/esbuild/update.rb +4 -0
- data/lib/bridgetown-core/commands/esbuild.rb +83 -0
- data/lib/bridgetown-core/commands/new.rb +80 -10
- data/lib/bridgetown-core/commands/plugins.rb +1 -1
- data/lib/bridgetown-core/commands/webpack/enable-postcss.rb +1 -1
- data/lib/bridgetown-core/commands/webpack/update.rb +3 -3
- data/lib/bridgetown-core/commands/webpack/webpack.defaults.js.erb +1 -1
- data/lib/bridgetown-core/commands/webpack.rb +3 -3
- data/lib/bridgetown-core/component.rb +9 -3
- data/lib/bridgetown-core/concerns/site/configurable.rb +6 -0
- data/lib/bridgetown-core/concerns/site/content.rb +4 -4
- data/lib/bridgetown-core/concerns/site/extensible.rb +8 -0
- data/lib/bridgetown-core/concerns/site/processable.rb +23 -4
- data/lib/bridgetown-core/concerns/site/ssr.rb +2 -17
- data/lib/bridgetown-core/configurations/minitesting.rb +1 -1
- data/lib/bridgetown-core/configurations/purgecss.rb +2 -1
- data/lib/bridgetown-core/configurations/render/render.yaml.erb +3 -0
- data/lib/bridgetown-core/configurations/stimulus.rb +41 -12
- data/lib/bridgetown-core/configurations/tailwindcss/css_imports.css +5 -0
- data/lib/bridgetown-core/configurations/tailwindcss.rb +31 -2
- data/lib/bridgetown-core/configurations/turbo/turbo_transitions.js +48 -0
- data/lib/bridgetown-core/configurations/turbo.rb +15 -5
- data/lib/bridgetown-core/configurations/vercel/vercel.json +45 -0
- data/lib/bridgetown-core/configurations/vercel/vercel_url.rb +12 -0
- data/lib/bridgetown-core/configurations/vercel.rb +4 -0
- data/lib/bridgetown-core/converters/erb_templates.rb +7 -9
- data/lib/bridgetown-core/converters/ruby_templates.rb +1 -1
- data/lib/bridgetown-core/converters/serbea_templates.rb +5 -8
- data/lib/bridgetown-core/drops/drop.rb +1 -1
- data/lib/bridgetown-core/drops/resource_drop.rb +28 -5
- data/lib/bridgetown-core/errors.rb +21 -0
- data/lib/bridgetown-core/generators/prototype_generator.rb +3 -3
- data/lib/bridgetown-core/helpers.rb +3 -2
- data/lib/bridgetown-core/hooks.rb +51 -20
- data/lib/bridgetown-core/model/base.rb +24 -1
- data/lib/bridgetown-core/model/origin.rb +4 -6
- data/lib/bridgetown-core/model/repo_origin.rb +48 -0
- data/lib/bridgetown-core/rack/boot.rb +5 -9
- data/lib/bridgetown-core/rack/roda.rb +4 -5
- data/lib/bridgetown-core/rack/routes.rb +44 -10
- data/lib/bridgetown-core/rack/static_indexes.rb +2 -0
- data/lib/bridgetown-core/resource/base.rb +3 -1
- data/lib/bridgetown-core/ruby_template_view.rb +11 -0
- data/lib/bridgetown-core/site.rb +5 -0
- data/lib/bridgetown-core/tags/{webpack_path.rb → asset_path.rb} +7 -9
- data/lib/bridgetown-core/tasks/bridgetown_tasks.rake +2 -1
- data/lib/bridgetown-core/utils/loaders_manager.rb +17 -0
- data/lib/bridgetown-core/utils.rb +88 -30
- data/lib/bridgetown-core/version.rb +1 -1
- data/lib/bridgetown-core/watcher.rb +74 -70
- data/lib/bridgetown-core.rb +1 -0
- data/lib/site_template/Gemfile.erb +17 -11
- data/lib/site_template/README.md +2 -2
- data/lib/site_template/{Rakefile → Rakefile.erb} +15 -0
- data/lib/site_template/TEMPLATES/erb/_components/shared/navbar.erb +11 -0
- data/lib/site_template/TEMPLATES/erb/_components/shared/navbar.rb +5 -0
- data/lib/site_template/TEMPLATES/erb/_layouts/default.erb +15 -0
- data/lib/site_template/TEMPLATES/erb/_layouts/page.erb +7 -0
- data/lib/site_template/TEMPLATES/erb/_layouts/post.erb +7 -0
- data/lib/site_template/TEMPLATES/erb/_partials/_footer.erb +3 -0
- data/lib/site_template/TEMPLATES/erb/_partials/_head.erb +10 -0
- data/lib/site_template/{src → TEMPLATES/liquid}/_components/footer.liquid +0 -0
- data/lib/site_template/TEMPLATES/liquid/_components/head.liquid +10 -0
- data/lib/site_template/TEMPLATES/liquid/_components/navbar.liquid +11 -0
- data/lib/site_template/{src → TEMPLATES/liquid}/_layouts/default.liquid +2 -2
- data/lib/site_template/{src → TEMPLATES/liquid}/_layouts/page.liquid +0 -0
- data/lib/site_template/{src → TEMPLATES/liquid}/_layouts/post.liquid +0 -0
- data/lib/site_template/TEMPLATES/serbea/_components/shared/navbar.rb +5 -0
- data/lib/site_template/TEMPLATES/serbea/_components/shared/navbar.serb +11 -0
- data/lib/site_template/TEMPLATES/serbea/_layouts/default.serb +15 -0
- data/lib/site_template/TEMPLATES/serbea/_layouts/page.serb +7 -0
- data/lib/site_template/TEMPLATES/serbea/_layouts/post.serb +7 -0
- data/lib/site_template/TEMPLATES/serbea/_partials/_footer.serb +3 -0
- data/lib/site_template/TEMPLATES/serbea/_partials/_head.serb +10 -0
- data/lib/site_template/frontend/javascript/index.js.erb +7 -3
- data/lib/site_template/frontend/styles/index.css +71 -6
- data/lib/site_template/package.json.erb +24 -9
- data/lib/site_template/ruby-version.erb +1 -0
- data/lib/site_template/server/roda_app.rb +5 -3
- data/lib/site_template/server/routes/hello.rb.sample +1 -1
- data/lib/site_template/src/images/logo.svg +91 -0
- data/lib/site_template/src/index.md.erb +22 -0
- data/lib/site_template/src/posts.md.erb +28 -0
- metadata +70 -22
- data/lib/bridgetown-core/configurations/swup.rb +0 -37
- data/lib/site_template/frontend/styles/index.scss +0 -17
- data/lib/site_template/src/_components/head.liquid +0 -10
- data/lib/site_template/src/_components/navbar.liquid +0 -5
- data/lib/site_template/src/_layouts/home.liquid +0 -7
- data/lib/site_template/src/images/.keep +0 -1
- data/lib/site_template/src/index.md +0 -7
- data/lib/site_template/src/posts.md +0 -14
metadata
CHANGED
@@ -1,43 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '6.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '8.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '6.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '8.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: activesupport
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
39
|
version: '6.0'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '8.0'
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
|
-
- - "
|
47
|
+
- - ">="
|
39
48
|
- !ruby/object:Gem::Version
|
40
49
|
version: '6.0'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '8.0'
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
54
|
name: addressable
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +140,14 @@ dependencies:
|
|
128
140
|
requirements:
|
129
141
|
- - "~>"
|
130
142
|
- !ruby/object:Gem::Version
|
131
|
-
version: '1.
|
143
|
+
version: '1.2'
|
132
144
|
type: :runtime
|
133
145
|
prerelease: false
|
134
146
|
version_requirements: !ruby/object:Gem::Requirement
|
135
147
|
requirements:
|
136
148
|
- - "~>"
|
137
149
|
- !ruby/object:Gem::Version
|
138
|
-
version: '1.
|
150
|
+
version: '1.2'
|
139
151
|
- !ruby/object:Gem::Dependency
|
140
152
|
name: i18n
|
141
153
|
requirement: !ruby/object:Gem::Requirement
|
@@ -332,6 +344,20 @@ dependencies:
|
|
332
344
|
- - "~>"
|
333
345
|
- !ruby/object:Gem::Version
|
334
346
|
version: '1.7'
|
347
|
+
- !ruby/object:Gem::Dependency
|
348
|
+
name: zeitwerk
|
349
|
+
requirement: !ruby/object:Gem::Requirement
|
350
|
+
requirements:
|
351
|
+
- - "~>"
|
352
|
+
- !ruby/object:Gem::Version
|
353
|
+
version: '2.5'
|
354
|
+
type: :runtime
|
355
|
+
prerelease: false
|
356
|
+
version_requirements: !ruby/object:Gem::Requirement
|
357
|
+
requirements:
|
358
|
+
- - "~>"
|
359
|
+
- !ruby/object:Gem::Version
|
360
|
+
version: '2.5'
|
335
361
|
description: Bridgetown is a Webpack-aware, Ruby-powered static site generator for
|
336
362
|
the modern Jamstack era
|
337
363
|
email: maintainers@bridgetownrb.com
|
@@ -361,6 +387,12 @@ files:
|
|
361
387
|
- lib/bridgetown-core/commands/configure.rb
|
362
388
|
- lib/bridgetown-core/commands/console.rb
|
363
389
|
- lib/bridgetown-core/commands/doctor.rb
|
390
|
+
- lib/bridgetown-core/commands/esbuild.rb
|
391
|
+
- lib/bridgetown-core/commands/esbuild/esbuild.config.js
|
392
|
+
- lib/bridgetown-core/commands/esbuild/esbuild.defaults.js.erb
|
393
|
+
- lib/bridgetown-core/commands/esbuild/migrate-from-webpack.rb
|
394
|
+
- lib/bridgetown-core/commands/esbuild/setup.rb
|
395
|
+
- lib/bridgetown-core/commands/esbuild/update.rb
|
364
396
|
- lib/bridgetown-core/commands/new.rb
|
365
397
|
- lib/bridgetown-core/commands/plugins.rb
|
366
398
|
- lib/bridgetown-core/commands/registrations.rb
|
@@ -406,11 +438,14 @@ files:
|
|
406
438
|
- lib/bridgetown-core/configurations/render.rb
|
407
439
|
- lib/bridgetown-core/configurations/render/render.yaml.erb
|
408
440
|
- lib/bridgetown-core/configurations/stimulus.rb
|
409
|
-
- lib/bridgetown-core/configurations/swup.rb
|
410
441
|
- lib/bridgetown-core/configurations/tailwindcss.rb
|
411
442
|
- lib/bridgetown-core/configurations/tailwindcss/css_imports.css
|
412
443
|
- lib/bridgetown-core/configurations/tailwindcss/postcss.config.js
|
413
444
|
- lib/bridgetown-core/configurations/turbo.rb
|
445
|
+
- lib/bridgetown-core/configurations/turbo/turbo_transitions.js
|
446
|
+
- lib/bridgetown-core/configurations/vercel.rb
|
447
|
+
- lib/bridgetown-core/configurations/vercel/vercel.json
|
448
|
+
- lib/bridgetown-core/configurations/vercel/vercel_url.rb
|
414
449
|
- lib/bridgetown-core/converter.rb
|
415
450
|
- lib/bridgetown-core/converters/erb_templates.rb
|
416
451
|
- lib/bridgetown-core/converters/identity.rb
|
@@ -484,6 +519,7 @@ files:
|
|
484
519
|
- lib/bridgetown-core/ruby_template_view.rb
|
485
520
|
- lib/bridgetown-core/site.rb
|
486
521
|
- lib/bridgetown-core/static_file.rb
|
522
|
+
- lib/bridgetown-core/tags/asset_path.rb
|
487
523
|
- lib/bridgetown-core/tags/class_map.rb
|
488
524
|
- lib/bridgetown-core/tags/find.rb
|
489
525
|
- lib/bridgetown-core/tags/highlight.rb
|
@@ -492,7 +528,6 @@ files:
|
|
492
528
|
- lib/bridgetown-core/tags/post_url.rb
|
493
529
|
- lib/bridgetown-core/tags/render_content.rb
|
494
530
|
- lib/bridgetown-core/tags/t.rb
|
495
|
-
- lib/bridgetown-core/tags/webpack_path.rb
|
496
531
|
- lib/bridgetown-core/tags/with.rb
|
497
532
|
- lib/bridgetown-core/tasks/bridgetown_tasks.rake
|
498
533
|
- lib/bridgetown-core/url.rb
|
@@ -509,34 +544,47 @@ files:
|
|
509
544
|
- lib/site_template/.gitignore
|
510
545
|
- lib/site_template/Gemfile.erb
|
511
546
|
- lib/site_template/README.md
|
512
|
-
- lib/site_template/Rakefile
|
547
|
+
- lib/site_template/Rakefile.erb
|
548
|
+
- lib/site_template/TEMPLATES/erb/_components/shared/navbar.erb
|
549
|
+
- lib/site_template/TEMPLATES/erb/_components/shared/navbar.rb
|
550
|
+
- lib/site_template/TEMPLATES/erb/_layouts/default.erb
|
551
|
+
- lib/site_template/TEMPLATES/erb/_layouts/page.erb
|
552
|
+
- lib/site_template/TEMPLATES/erb/_layouts/post.erb
|
553
|
+
- lib/site_template/TEMPLATES/erb/_partials/_footer.erb
|
554
|
+
- lib/site_template/TEMPLATES/erb/_partials/_head.erb
|
555
|
+
- lib/site_template/TEMPLATES/liquid/_components/footer.liquid
|
556
|
+
- lib/site_template/TEMPLATES/liquid/_components/head.liquid
|
557
|
+
- lib/site_template/TEMPLATES/liquid/_components/navbar.liquid
|
558
|
+
- lib/site_template/TEMPLATES/liquid/_layouts/default.liquid
|
559
|
+
- lib/site_template/TEMPLATES/liquid/_layouts/page.liquid
|
560
|
+
- lib/site_template/TEMPLATES/liquid/_layouts/post.liquid
|
561
|
+
- lib/site_template/TEMPLATES/serbea/_components/shared/navbar.rb
|
562
|
+
- lib/site_template/TEMPLATES/serbea/_components/shared/navbar.serb
|
563
|
+
- lib/site_template/TEMPLATES/serbea/_layouts/default.serb
|
564
|
+
- lib/site_template/TEMPLATES/serbea/_layouts/page.serb
|
565
|
+
- lib/site_template/TEMPLATES/serbea/_layouts/post.serb
|
566
|
+
- lib/site_template/TEMPLATES/serbea/_partials/_footer.serb
|
567
|
+
- lib/site_template/TEMPLATES/serbea/_partials/_head.serb
|
513
568
|
- lib/site_template/bridgetown.config.yml
|
514
569
|
- lib/site_template/config.ru
|
515
570
|
- lib/site_template/config/puma.rb
|
516
571
|
- lib/site_template/frontend/javascript/index.js.erb
|
517
572
|
- lib/site_template/frontend/styles/index.css
|
518
|
-
- lib/site_template/frontend/styles/index.scss
|
519
573
|
- lib/site_template/package.json.erb
|
520
574
|
- lib/site_template/plugins/builders/.keep
|
521
575
|
- lib/site_template/plugins/site_builder.rb
|
522
576
|
- lib/site_template/postcss.config.js.erb
|
577
|
+
- lib/site_template/ruby-version.erb
|
523
578
|
- lib/site_template/server/roda_app.rb
|
524
579
|
- lib/site_template/server/routes/hello.rb.sample
|
525
580
|
- lib/site_template/src/404.html
|
526
|
-
- lib/site_template/src/_components/footer.liquid
|
527
|
-
- lib/site_template/src/_components/head.liquid
|
528
|
-
- lib/site_template/src/_components/navbar.liquid
|
529
581
|
- lib/site_template/src/_data/site_metadata.yml
|
530
|
-
- lib/site_template/src/_layouts/default.liquid
|
531
|
-
- lib/site_template/src/_layouts/home.liquid
|
532
|
-
- lib/site_template/src/_layouts/page.liquid
|
533
|
-
- lib/site_template/src/_layouts/post.liquid
|
534
582
|
- lib/site_template/src/_posts/0000-00-00-welcome-to-bridgetown.md.erb
|
535
583
|
- lib/site_template/src/about.md
|
536
584
|
- lib/site_template/src/favicon.ico
|
537
|
-
- lib/site_template/src/images
|
538
|
-
- lib/site_template/src/index.md
|
539
|
-
- lib/site_template/src/posts.md
|
585
|
+
- lib/site_template/src/images/logo.svg
|
586
|
+
- lib/site_template/src/index.md.erb
|
587
|
+
- lib/site_template/src/posts.md.erb
|
540
588
|
homepage: https://www.bridgetownrb.com
|
541
589
|
licenses:
|
542
590
|
- MIT
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# rubocop:disable all
|
4
|
-
|
5
|
-
packages = "swup @swup/body-class-plugin @swup/scroll-plugin @swup/fade-theme"
|
6
|
-
say_status :swup, "Adding the following yarn packages: #{packages}"
|
7
|
-
system("yarn add #{packages}")
|
8
|
-
|
9
|
-
javascript_import do
|
10
|
-
<<~JS
|
11
|
-
import Swup from "swup"
|
12
|
-
import SwupBodyClassPlugin from "@swup/body-class-plugin"
|
13
|
-
import SwupScrollPlugin from "@swup/scroll-plugin"
|
14
|
-
import SwupFadeTheme from "@swup/fade-theme"
|
15
|
-
const swup = new Swup({
|
16
|
-
plugins: [
|
17
|
-
new SwupBodyClassPlugin(),
|
18
|
-
new SwupScrollPlugin(),
|
19
|
-
new SwupFadeTheme(),
|
20
|
-
]
|
21
|
-
})
|
22
|
-
JS
|
23
|
-
end
|
24
|
-
|
25
|
-
css_index = File.exist?(File.expand_path("frontend/styles/index.scss", destination_root)) ? "frontend/styles/index.scss" : "frontend/styles/index.css"
|
26
|
-
append_to_file css_index do
|
27
|
-
<<~CSS
|
28
|
-
.swup-transition-main {
|
29
|
-
transition: opacity .2s;
|
30
|
-
}
|
31
|
-
CSS
|
32
|
-
end
|
33
|
-
|
34
|
-
say_status :swup, "All done! Edit .swup-transition-main in #{css_index} if you wish to adjust the transition animation"
|
35
|
-
say_status :swup, "Make sure you add id=\"swup\" to the primary container of your HTML layout (perhaps <main>)"
|
36
|
-
|
37
|
-
# rubocop:enable all
|
@@ -1,17 +0,0 @@
|
|
1
|
-
$body-background: #fafafa;
|
2
|
-
$body-color: #444;
|
3
|
-
|
4
|
-
body {
|
5
|
-
background: $body-background;
|
6
|
-
color: $body-color;
|
7
|
-
font-family: sans-serif;
|
8
|
-
}
|
9
|
-
|
10
|
-
h1, nav, footer {
|
11
|
-
text-align: center;
|
12
|
-
}
|
13
|
-
|
14
|
-
main {
|
15
|
-
margin: 4rem auto;
|
16
|
-
max-width: 60rem;
|
17
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<meta charset="utf-8" />
|
2
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
3
|
-
{% capture page_title %}{{ title | strip_html | strip_newlines }}{% endcapture %}
|
4
|
-
<title>{% if page_title != "Index" %}{{ page_title | escape }} | {{ metadata.title | escape }}{% else %}{{ metadata.title | escape }}: {{ metadata.tagline | escape }}{% endif %}</title>
|
5
|
-
|
6
|
-
<meta name="description" content="{{ metadata.description }}" />
|
7
|
-
|
8
|
-
<link rel="stylesheet" href="{% webpack_path css %}" />
|
9
|
-
<script src="{% webpack_path js %}" defer></script>
|
10
|
-
{% live_reload_dev_js %}
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1,14 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: page
|
3
|
-
title: Posts
|
4
|
-
---
|
5
|
-
|
6
|
-
<ul>
|
7
|
-
{% for post in collections.posts.resources %}
|
8
|
-
<li>
|
9
|
-
<a href="{{ post.relative_url }}">{{ post.title }}</a>
|
10
|
-
</li>
|
11
|
-
{% endfor %}
|
12
|
-
</ul>
|
13
|
-
|
14
|
-
If you have a lot of posts, you may want to consider adding [pagination](https://www.bridgetownrb.com/docs/content/pagination)!
|