bridgetown-core 2.0.4 → 2.1.0.beta1

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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -2
  3. data/bin/bridgetown +19 -7
  4. data/bridgetown-core.gemspec +8 -6
  5. data/lib/bridgetown-core/collection.rb +4 -3
  6. data/lib/bridgetown-core/command.rb +97 -0
  7. data/lib/bridgetown-core/commands/application.rb +208 -0
  8. data/lib/bridgetown-core/commands/apply.rb +17 -29
  9. data/lib/bridgetown-core/commands/build.rb +9 -16
  10. data/lib/bridgetown-core/commands/clean.rb +7 -10
  11. data/lib/bridgetown-core/commands/concerns/{actions.rb → automations.rb} +103 -17
  12. data/lib/bridgetown-core/commands/concerns/build_options.rb +24 -60
  13. data/lib/bridgetown-core/commands/concerns/configuration_overridable.rb +2 -4
  14. data/lib/bridgetown-core/commands/configure.rb +24 -24
  15. data/lib/bridgetown-core/commands/console.rb +38 -34
  16. data/lib/bridgetown-core/commands/esbuild.rb +14 -24
  17. data/lib/bridgetown-core/commands/help.rb +24 -0
  18. data/lib/bridgetown-core/commands/new.rb +38 -60
  19. data/lib/bridgetown-core/commands/plugins.rb +237 -211
  20. data/lib/bridgetown-core/commands/registrations.rb +10 -1
  21. data/lib/bridgetown-core/commands/start.rb +23 -31
  22. data/lib/bridgetown-core/commands/thor_shim.rb +94 -0
  23. data/lib/bridgetown-core/component.rb +4 -4
  24. data/lib/bridgetown-core/concerns/publishable.rb +1 -3
  25. data/lib/bridgetown-core/concerns/site/localizable.rb +2 -0
  26. data/lib/bridgetown-core/configuration/configuration_dsl.rb +2 -2
  27. data/lib/bridgetown-core/configuration.rb +27 -7
  28. data/lib/bridgetown-core/converters/erb_templates.rb +31 -21
  29. data/lib/bridgetown-core/converters/ruby_templates.rb +14 -13
  30. data/lib/bridgetown-core/converters/serbea_templates.rb +5 -2
  31. data/lib/bridgetown-core/entry_filter.rb +1 -4
  32. data/lib/bridgetown-core/front_matter/defaults.rb +1 -1
  33. data/lib/bridgetown-core/front_matter/importer.rb +7 -1
  34. data/lib/bridgetown-core/front_matter/loaders.rb +1 -1
  35. data/lib/bridgetown-core/front_matter/ruby.rb +3 -9
  36. data/lib/bridgetown-core/generated_page.rb +2 -2
  37. data/lib/bridgetown-core/generators/prototype_generator.rb +1 -1
  38. data/lib/bridgetown-core/helpers.rb +10 -11
  39. data/lib/bridgetown-core/hooks.rb +2 -3
  40. data/lib/bridgetown-core/locale/en.yml +30 -0
  41. data/lib/bridgetown-core/model/base.rb +5 -5
  42. data/lib/bridgetown-core/model/builder_origin.rb +1 -1
  43. data/lib/bridgetown-core/model/origin.rb +5 -1
  44. data/lib/bridgetown-core/model/plugin_origin.rb +3 -1
  45. data/lib/bridgetown-core/model/repo_origin.rb +3 -1
  46. data/lib/bridgetown-core/rack/routes.rb +1 -1
  47. data/lib/bridgetown-core/reader.rb +2 -2
  48. data/lib/bridgetown-core/readers/plugin_content_reader.rb +31 -7
  49. data/lib/bridgetown-core/resource/base.rb +16 -7
  50. data/lib/bridgetown-core/resource/destination.rb +1 -1
  51. data/lib/bridgetown-core/resource/permalink_processor.rb +4 -4
  52. data/lib/bridgetown-core/static_file.rb +1 -1
  53. data/lib/bridgetown-core/tags/class_map.rb +0 -2
  54. data/lib/bridgetown-core/tasks/bridgetown_tasks.rake +8 -11
  55. data/lib/bridgetown-core/{ruby_template_view.rb → template_view.rb} +108 -4
  56. data/lib/bridgetown-core/utils/initializers.rb +28 -1
  57. data/lib/bridgetown-core/utils/loaders_manager.rb +2 -1
  58. data/lib/bridgetown-core/utils.rb +19 -1
  59. data/lib/bridgetown-core/watcher.rb +16 -8
  60. data/lib/bridgetown-core.rb +5 -10
  61. data/lib/roda/plugins/bridgetown_server.rb +1 -1
  62. data/lib/site_template/README.md +10 -8
  63. metadata +84 -70
  64. data/lib/bridgetown-core/commands/base.rb +0 -123
  65. data/lib/bridgetown-core/commands/concerns/summarizable.rb +0 -13
  66. data/lib/bridgetown-core/configurations/.keep +0 -0
  67. data/lib/bridgetown-core/configurations/stimulus.rb +0 -59
  68. data/lib/bridgetown-core/configurations/turbo/turbo_transitions.js +0 -48
  69. data/lib/bridgetown-core/configurations/turbo.rb +0 -35
  70. data/lib/bridgetown-core/configurations/vercel/vercel.json +0 -45
  71. data/lib/bridgetown-core/configurations/vercel/vercel_url.rb +0 -12
  72. data/lib/bridgetown-core/configurations/vercel.rb +0 -4
  73. data/lib/bridgetown-core/inflector.rb +0 -40
@@ -26,7 +26,6 @@ require "time"
26
26
  require "English"
27
27
  require "pathname"
28
28
  require "logger"
29
- require "set"
30
29
  require "csv"
31
30
  require "json"
32
31
  require "yaml"
@@ -35,10 +34,6 @@ require "yaml"
35
34
  require "bridgetown-foundation"
36
35
 
37
36
  # 3rd party
38
- require "active_support" # TODO: remove by the end of 2025
39
- require "active_support/core_ext/object/blank"
40
- require "active_support/core_ext/string/inflections"
41
- require "active_support/core_ext/string/output_safety"
42
37
  require "addressable/uri"
43
38
  require "liquid"
44
39
  require "listen"
@@ -46,8 +41,8 @@ require "kramdown"
46
41
  require "i18n"
47
42
  require "i18n/backend/fallbacks"
48
43
  require "faraday"
44
+ require "samovar"
49
45
  require "signalize"
50
- require "thor"
51
46
 
52
47
  # Ensure we can set up fallbacks so the default locale gets used
53
48
  I18n::Backend::Simple.include I18n::Backend::Fallbacks
@@ -73,6 +68,7 @@ module Bridgetown
73
68
  autoload :Current, "bridgetown-core/current"
74
69
  autoload :Cleaner, "bridgetown-core/cleaner"
75
70
  autoload :Collection, "bridgetown-core/collection"
71
+ autoload :Command, "bridgetown-core/command"
76
72
  autoload :Component, "bridgetown-core/component"
77
73
  autoload :DefaultsReader, "bridgetown-core/readers/defaults_reader"
78
74
  autoload :Deprecator, "bridgetown-core/deprecator"
@@ -81,7 +77,6 @@ module Bridgetown
81
77
  autoload :FrontMatter, "bridgetown-core/front_matter"
82
78
  autoload :GeneratedPage, "bridgetown-core/generated_page"
83
79
  autoload :Hooks, "bridgetown-core/hooks"
84
- autoload :Inflector, "bridgetown-core/inflector"
85
80
  autoload :Layout, "bridgetown-core/layout"
86
81
  autoload :LayoutPlaceable, "bridgetown-core/concerns/layout_placeable"
87
82
  autoload :LayoutReader, "bridgetown-core/readers/layout_reader"
@@ -93,20 +88,20 @@ module Bridgetown
93
88
  autoload :Prioritizable, "bridgetown-core/concerns/prioritizable"
94
89
  autoload :Publishable, "bridgetown-core/concerns/publishable"
95
90
  autoload :Reader, "bridgetown-core/reader"
96
- autoload :RubyTemplateView, "bridgetown-core/ruby_template_view"
97
91
  autoload :LogWriter, "bridgetown-core/log_writer"
98
92
  autoload :Signals, "bridgetown-core/signals"
99
93
  autoload :Site, "bridgetown-core/site"
100
94
  autoload :Slot, "bridgetown-core/slot"
101
95
  autoload :StaticFile, "bridgetown-core/static_file"
96
+ autoload :TemplateView, "bridgetown-core/template_view"
102
97
  autoload :Transformable, "bridgetown-core/concerns/transformable"
103
98
  autoload :Viewable, "bridgetown-core/concerns/viewable"
104
99
  autoload :Utils, "bridgetown-core/utils"
105
- autoload :VERSION, "bridgetown-core/version"
106
100
  autoload :Watcher, "bridgetown-core/watcher"
107
101
  autoload :YAMLParser, "bridgetown-core/yaml_parser"
108
102
 
109
103
  # extensions
104
+ require "bridgetown-core/commands/thor_shim"
110
105
  require "bridgetown-core/commands/registrations"
111
106
  require "bridgetown-core/plugin"
112
107
  require "bridgetown-core/converter"
@@ -265,7 +260,7 @@ module Bridgetown
265
260
  end
266
261
 
267
262
  def load_tasks
268
- require "bridgetown-core/commands/base"
263
+ require "bridgetown-core/commands/application"
269
264
  unless Bridgetown::Current.preloaded_configuration
270
265
  Bridgetown::Current.preloaded_configuration = Bridgetown::Configuration::Preflight.new
271
266
  end
@@ -3,7 +3,7 @@
3
3
  class Roda
4
4
  module RodaPlugins
5
5
  module BridgetownServer
6
- SiteContext = Struct.new(:registers) # for use by Liquid-esque URL helpers
6
+ SiteContext = Data.define(:registers) # for use by Liquid-esque URL helpers
7
7
 
8
8
  def self.load_dependencies(app) # rubocop:disable Metrics
9
9
  unless Bridgetown::Current.preloaded_configuration
@@ -4,19 +4,21 @@ Welcome to your new Bridgetown website! You can update this README file to provi
4
4
 
5
5
  ## Table of Contents
6
6
 
7
- - [Prerequisites](#prerequisites)
8
- - [Install](#install)
9
- - [Development](#development)
10
- - [Commands](#commands)
11
- - [Deployment](#deployment)
12
- - [Contributing](#contributing)
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)
13
15
 
14
16
  ## Prerequisites
15
17
 
16
18
  - [GCC](https://gcc.gnu.org/install/)
17
19
  - [Make](https://www.gnu.org/software/make/)
18
20
  - [Ruby](https://www.ruby-lang.org/en/downloads/)
19
- - `>= 3.1`
21
+ - `>= 3.2`
20
22
  - [Bridgetown Gem](https://rubygems.org/gems/bridgetown)
21
23
  - `gem install bridgetown -N`
22
24
  - [Node](https://nodejs.org)
@@ -53,7 +55,7 @@ bin/bridgetown console
53
55
 
54
56
  ## Deployment
55
57
 
56
- You can deploy Bridgetown sites on hosts like Render or Vercel as well as traditional web servers by simply building and copying the output folder to your HTML root.
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.
57
59
 
58
60
  > Read the [Bridgetown Deployment Documentation](https://www.bridgetownrb.com/docs/deployment) for more information.
59
61
 
metadata CHANGED
@@ -1,35 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.1.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-11-03 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: activesupport
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '6.0'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '8.0'
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '6.0'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '8.0'
33
12
  - !ruby/object:Gem::Dependency
34
13
  name: addressable
35
14
  requirement: !ruby/object:Gem::Requirement
@@ -59,47 +38,61 @@ dependencies:
59
38
  - !ruby/object:Gem::Version
60
39
  version: '1.2'
61
40
  - !ruby/object:Gem::Dependency
62
- name: bridgetown-foundation
41
+ name: base64
63
42
  requirement: !ruby/object:Gem::Requirement
64
43
  requirements:
65
- - - '='
44
+ - - ">="
66
45
  - !ruby/object:Gem::Version
67
- version: 2.0.4
46
+ version: '0.3'
68
47
  type: :runtime
69
48
  prerelease: false
70
49
  version_requirements: !ruby/object:Gem::Requirement
71
50
  requirements:
72
- - - '='
51
+ - - ">="
73
52
  - !ruby/object:Gem::Version
74
- version: 2.0.4
53
+ version: '0.3'
75
54
  - !ruby/object:Gem::Dependency
76
- name: csv
55
+ name: bigdecimal
77
56
  requirement: !ruby/object:Gem::Requirement
78
57
  requirements:
79
- - - "~>"
58
+ - - ">="
80
59
  - !ruby/object:Gem::Version
81
60
  version: '3.2'
82
61
  type: :runtime
83
62
  prerelease: false
84
63
  version_requirements: !ruby/object:Gem::Requirement
85
64
  requirements:
86
- - - "~>"
65
+ - - ">="
87
66
  - !ruby/object:Gem::Version
88
67
  version: '3.2'
89
68
  - !ruby/object:Gem::Dependency
90
- name: dry-inflector
69
+ name: bridgetown-foundation
91
70
  requirement: !ruby/object:Gem::Requirement
92
71
  requirements:
93
- - - ">="
72
+ - - '='
94
73
  - !ruby/object:Gem::Version
95
- version: '1.0'
74
+ version: 2.1.0.beta1
96
75
  type: :runtime
97
76
  prerelease: false
98
77
  version_requirements: !ruby/object:Gem::Requirement
99
78
  requirements:
100
- - - ">="
79
+ - - '='
101
80
  - !ruby/object:Gem::Version
102
- version: '1.0'
81
+ version: 2.1.0.beta1
82
+ - !ruby/object:Gem::Dependency
83
+ name: csv
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '3.2'
89
+ type: :runtime
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '3.2'
103
96
  - !ruby/object:Gem::Dependency
104
97
  name: erubi
105
98
  requirement: !ruby/object:Gem::Requirement
@@ -142,6 +135,20 @@ dependencies:
142
135
  - - "~>"
143
136
  - !ruby/object:Gem::Version
144
137
  version: '0.3'
138
+ - !ruby/object:Gem::Dependency
139
+ name: freyia
140
+ requirement: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0.5'
145
+ type: :runtime
146
+ prerelease: false
147
+ version_requirements: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0.5'
145
152
  - !ruby/object:Gem::Dependency
146
153
  name: i18n
147
154
  requirement: !ruby/object:Gem::Requirement
@@ -309,61 +316,75 @@ dependencies:
309
316
  - !ruby/object:Gem::Version
310
317
  version: '5.0'
311
318
  - !ruby/object:Gem::Dependency
312
- name: serbea
319
+ name: samovar
313
320
  requirement: !ruby/object:Gem::Requirement
314
321
  requirements:
315
- - - "~>"
322
+ - - ">="
316
323
  - !ruby/object:Gem::Version
317
- version: '2.1'
324
+ version: '2.4'
318
325
  type: :runtime
319
326
  prerelease: false
320
327
  version_requirements: !ruby/object:Gem::Requirement
321
328
  requirements:
322
- - - "~>"
329
+ - - ">="
323
330
  - !ruby/object:Gem::Version
324
- version: '2.1'
331
+ version: '2.4'
325
332
  - !ruby/object:Gem::Dependency
326
- name: signalize
333
+ name: securerandom
327
334
  requirement: !ruby/object:Gem::Requirement
328
335
  requirements:
329
336
  - - "~>"
330
337
  - !ruby/object:Gem::Version
331
- version: '1.3'
338
+ version: '0.4'
332
339
  type: :runtime
333
340
  prerelease: false
334
341
  version_requirements: !ruby/object:Gem::Requirement
335
342
  requirements:
336
343
  - - "~>"
337
344
  - !ruby/object:Gem::Version
338
- version: '1.3'
345
+ version: '0.4'
339
346
  - !ruby/object:Gem::Dependency
340
- name: streamlined
347
+ name: serbea
341
348
  requirement: !ruby/object:Gem::Requirement
342
349
  requirements:
343
350
  - - ">="
344
351
  - !ruby/object:Gem::Version
345
- version: 0.6.0
352
+ version: 2.4.1
346
353
  type: :runtime
347
354
  prerelease: false
348
355
  version_requirements: !ruby/object:Gem::Requirement
349
356
  requirements:
350
357
  - - ">="
351
358
  - !ruby/object:Gem::Version
352
- version: 0.6.0
359
+ version: 2.4.1
353
360
  - !ruby/object:Gem::Dependency
354
- name: thor
361
+ name: signalize
355
362
  requirement: !ruby/object:Gem::Requirement
356
363
  requirements:
357
364
  - - "~>"
358
365
  - !ruby/object:Gem::Version
359
- version: '1.1'
366
+ version: '1.3'
360
367
  type: :runtime
361
368
  prerelease: false
362
369
  version_requirements: !ruby/object:Gem::Requirement
363
370
  requirements:
364
371
  - - "~>"
365
372
  - !ruby/object:Gem::Version
366
- version: '1.1'
373
+ version: '1.3'
374
+ - !ruby/object:Gem::Dependency
375
+ name: streamlined
376
+ requirement: !ruby/object:Gem::Requirement
377
+ requirements:
378
+ - - ">="
379
+ - !ruby/object:Gem::Version
380
+ version: 0.6.0
381
+ type: :runtime
382
+ prerelease: false
383
+ version_requirements: !ruby/object:Gem::Requirement
384
+ requirements:
385
+ - - ">="
386
+ - !ruby/object:Gem::Version
387
+ version: 0.6.0
367
388
  - !ruby/object:Gem::Dependency
368
389
  name: tilt
369
390
  requirement: !ruby/object:Gem::Requirement
@@ -382,16 +403,16 @@ dependencies:
382
403
  name: zeitwerk
383
404
  requirement: !ruby/object:Gem::Requirement
384
405
  requirements:
385
- - - "~>"
406
+ - - ">="
386
407
  - !ruby/object:Gem::Version
387
- version: '2.5'
408
+ version: 2.7.3
388
409
  type: :runtime
389
410
  prerelease: false
390
411
  version_requirements: !ruby/object:Gem::Requirement
391
412
  requirements:
392
- - - "~>"
413
+ - - ">="
393
414
  - !ruby/object:Gem::Version
394
- version: '2.5'
415
+ version: 2.7.3
395
416
  description: Bridgetown is a next-generation, progressive site generator & fullstack
396
417
  framework, powered by Ruby
397
418
  email: maintainers@bridgetownrb.com
@@ -411,15 +432,15 @@ files:
411
432
  - lib/bridgetown-core/cache.rb
412
433
  - lib/bridgetown-core/cleaner.rb
413
434
  - lib/bridgetown-core/collection.rb
435
+ - lib/bridgetown-core/command.rb
436
+ - lib/bridgetown-core/commands/application.rb
414
437
  - lib/bridgetown-core/commands/apply.rb
415
- - lib/bridgetown-core/commands/base.rb
416
438
  - lib/bridgetown-core/commands/build.rb
417
439
  - lib/bridgetown-core/commands/clean.rb
418
- - lib/bridgetown-core/commands/concerns/actions.rb
440
+ - lib/bridgetown-core/commands/concerns/automations.rb
419
441
  - lib/bridgetown-core/commands/concerns/build_options.rb
420
442
  - lib/bridgetown-core/commands/concerns/configuration_overridable.rb
421
443
  - lib/bridgetown-core/commands/concerns/git_helpers.rb
422
- - lib/bridgetown-core/commands/concerns/summarizable.rb
423
444
  - lib/bridgetown-core/commands/configure.rb
424
445
  - lib/bridgetown-core/commands/console.rb
425
446
  - lib/bridgetown-core/commands/esbuild.rb
@@ -429,10 +450,12 @@ files:
429
450
  - lib/bridgetown-core/commands/esbuild/migrate-from-webpack.rb
430
451
  - lib/bridgetown-core/commands/esbuild/setup.rb
431
452
  - lib/bridgetown-core/commands/esbuild/update.rb
453
+ - lib/bridgetown-core/commands/help.rb
432
454
  - lib/bridgetown-core/commands/new.rb
433
455
  - lib/bridgetown-core/commands/plugins.rb
434
456
  - lib/bridgetown-core/commands/registrations.rb
435
457
  - lib/bridgetown-core/commands/start.rb
458
+ - lib/bridgetown-core/commands/thor_shim.rb
436
459
  - lib/bridgetown-core/component.rb
437
460
  - lib/bridgetown-core/concerns/layout_placeable.rb
438
461
  - lib/bridgetown-core/concerns/localizable.rb
@@ -451,7 +474,6 @@ files:
451
474
  - lib/bridgetown-core/concerns/viewable.rb
452
475
  - lib/bridgetown-core/configuration.rb
453
476
  - lib/bridgetown-core/configuration/configuration_dsl.rb
454
- - lib/bridgetown-core/configurations/.keep
455
477
  - lib/bridgetown-core/configurations/bt-postcss.rb
456
478
  - lib/bridgetown-core/configurations/bt-postcss/postcss.config.js
457
479
  - lib/bridgetown-core/configurations/cypress.rb
@@ -484,13 +506,7 @@ files:
484
506
  - lib/bridgetown-core/configurations/ruby2js/ruby2js.rb
485
507
  - lib/bridgetown-core/configurations/seo.rb
486
508
  - lib/bridgetown-core/configurations/shoelace.rb
487
- - lib/bridgetown-core/configurations/stimulus.rb
488
509
  - lib/bridgetown-core/configurations/tailwindcss.rb
489
- - lib/bridgetown-core/configurations/turbo.rb
490
- - lib/bridgetown-core/configurations/turbo/turbo_transitions.js
491
- - lib/bridgetown-core/configurations/vercel.rb
492
- - lib/bridgetown-core/configurations/vercel/vercel.json
493
- - lib/bridgetown-core/configurations/vercel/vercel_url.rb
494
510
  - lib/bridgetown-core/configurations/webawesome.rb
495
511
  - lib/bridgetown-core/converter.rb
496
512
  - lib/bridgetown-core/converters/erb_templates.rb
@@ -534,7 +550,6 @@ files:
534
550
  - lib/bridgetown-core/generators/prototype_generator.rb
535
551
  - lib/bridgetown-core/helpers.rb
536
552
  - lib/bridgetown-core/hooks.rb
537
- - lib/bridgetown-core/inflector.rb
538
553
  - lib/bridgetown-core/kramdown/parser/gfm.rb
539
554
  - lib/bridgetown-core/layout.rb
540
555
  - lib/bridgetown-core/liquid_extensions.rb
@@ -542,6 +557,7 @@ files:
542
557
  - lib/bridgetown-core/liquid_renderer/file.rb
543
558
  - lib/bridgetown-core/liquid_renderer/file_system.rb
544
559
  - lib/bridgetown-core/liquid_renderer/table.rb
560
+ - lib/bridgetown-core/locale/en.yml
545
561
  - lib/bridgetown-core/log_adapter.rb
546
562
  - lib/bridgetown-core/log_writer.rb
547
563
  - lib/bridgetown-core/mime.types
@@ -568,7 +584,6 @@ files:
568
584
  - lib/bridgetown-core/resource/taxonomy_term.rb
569
585
  - lib/bridgetown-core/resource/taxonomy_type.rb
570
586
  - lib/bridgetown-core/resource/transformer.rb
571
- - lib/bridgetown-core/ruby_template_view.rb
572
587
  - lib/bridgetown-core/signals.rb
573
588
  - lib/bridgetown-core/site.rb
574
589
  - lib/bridgetown-core/slot.rb
@@ -586,6 +601,7 @@ files:
586
601
  - lib/bridgetown-core/tags/t.rb
587
602
  - lib/bridgetown-core/tags/with.rb
588
603
  - lib/bridgetown-core/tasks/bridgetown_tasks.rake
604
+ - lib/bridgetown-core/template_view.rb
589
605
  - lib/bridgetown-core/utils.rb
590
606
  - lib/bridgetown-core/utils/aux.rb
591
607
  - lib/bridgetown-core/utils/initializers.rb
@@ -658,7 +674,6 @@ metadata:
658
674
  changelog_uri: https://github.com/bridgetownrb/bridgetown/releases
659
675
  homepage_uri: https://www.bridgetownrb.com
660
676
  rubygems_mfa_required: 'true'
661
- post_install_message:
662
677
  rdoc_options:
663
678
  - "--charset=UTF-8"
664
679
  require_paths:
@@ -667,15 +682,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
667
682
  requirements:
668
683
  - - ">="
669
684
  - !ruby/object:Gem::Version
670
- version: 3.1.0
685
+ version: 3.2.0
671
686
  required_rubygems_version: !ruby/object:Gem::Requirement
672
687
  requirements:
673
688
  - - ">="
674
689
  - !ruby/object:Gem::Version
675
690
  version: '0'
676
691
  requirements: []
677
- rubygems_version: 3.3.26
678
- signing_key:
692
+ rubygems_version: 3.7.2
679
693
  specification_version: 4
680
694
  summary: A next-generation, progressive site generator & fullstack framework, powered
681
695
  by Ruby
@@ -1,123 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_all "bridgetown-core/commands/concerns"
4
- require_all "bridgetown-core/commands"
5
-
6
- module Bridgetown
7
- module Commands
8
- class Base < Thor
9
- def self.exit_on_failure?
10
- true
11
- end
12
-
13
- Registrations.registrations.each do |block|
14
- instance_exec(&block)
15
- end
16
-
17
- class << self
18
- # Override single character commands if necessary
19
- def find_command_possibilities(subcommand)
20
- case subcommand
21
- when "c"
22
- ["console"]
23
- when "s"
24
- ["start"]
25
- else
26
- super
27
- end
28
- end
29
-
30
- def display_rake_tasks(rake)
31
- rake.options.show_all_tasks = true
32
- rake.options.show_task_pattern = Regexp.new("")
33
- rake.options.show_tasks = :tasks
34
- rake.display_tasks_and_comments
35
- end
36
-
37
- def load_rake_tasks(rake)
38
- rake.load_rakefile
39
- tasks = rake.instance_variable_get(:@tasks)
40
- rake.instance_variable_set(:@tasks, tasks.reject do |_k, v|
41
- v.locations.first&.include?("/lib/rails/tasks/") ||
42
- v.locations.first&.include?("/lib/rake/dsl_definition")
43
- end)
44
- end
45
-
46
- # rubocop:disable Style/GlobalVars
47
- def handle_no_command_error(cmd, _has_namespace = $thor_runner)
48
- require "rake"
49
- Rake::TaskManager.record_task_metadata = true
50
-
51
- Rake.with_application do |rake|
52
- rake.standard_exception_handling do
53
- rakefile, _location = rake.find_rakefile_location
54
- unless rakefile
55
- puts "No Rakefile found (searching: #{rake.class::DEFAULT_RAKEFILES.join(", ")})\n\n" # rubocop:disable Layout/LineLength
56
- new.invoke("help")
57
- return # rubocop:disable Lint/NonLocalExitFromIterator
58
- end
59
- rake.init("bridgetown")
60
- load_rake_tasks(rake)
61
- end
62
-
63
- if Rake::Task.task_defined?(cmd.split("[")[0])
64
- rake.top_level
65
- else
66
- puts "Unknown task: #{cmd.split("[")[0]}\n\nHere's a list of tasks you can run:"
67
- display_rake_tasks(rake)
68
- end
69
- rescue RuntimeError => e
70
- # re-raise error unless it's an error through Minitest
71
- raise e unless e.message.include?("ruby -Ilib:test")
72
-
73
- Bridgetown.logger.error "test aborted!"
74
- Bridgetown.logger.error e.message
75
- exit(false)
76
- end
77
- end
78
- end
79
- # rubocop:enable Style/GlobalVars
80
-
81
- desc "dream", "There's a place where that idea still exists as a reality"
82
- def dream
83
- puts ""
84
- puts "🎶 The Dream of the 90s is Alive in Portland... ✨"
85
- puts " https://youtu.be/U4hShMEk1Ew"
86
- puts " https://youtu.be/0_HGqPGp9iY"
87
- puts ""
88
- end
89
-
90
- desc "help <command>", "Show detailed command usage information and exit"
91
- def help(subcommand = nil) # rubocop:disable Metrics/MethodLength
92
- if subcommand && respond_to?(subcommand)
93
- klass = Kernel.const_get("Bridgetown::Commands::#{subcommand.capitalize}")
94
- klass.start(["-h"])
95
- else
96
- puts "Bridgetown v#{Bridgetown::VERSION.magenta} \"#{Bridgetown::CODE_NAME.yellow}\"" \
97
- " is a next-generation, progressive site generator & fullstack framework, powered by Ruby"
98
- puts ""
99
- puts "Usage:"
100
- puts " bridgetown <command> [options]"
101
- puts ""
102
- super
103
-
104
- require "rake"
105
- Rake::TaskManager.record_task_metadata = true
106
- Rake.with_application do |rake|
107
- rake.instance_variable_set(:@name, " bridgetown")
108
- rake.standard_exception_handling do
109
- rakefile, _location = rake.find_rakefile_location
110
- return unless rakefile # rubocop:disable Lint/NonLocalExitFromIterator
111
-
112
- self.class.load_rake_tasks(rake)
113
- puts "Available Rake Tasks:"
114
- self.class.display_rake_tasks(rake)
115
- end
116
- end
117
- end
118
- rescue LoadError
119
- nil
120
- end
121
- end
122
- end
123
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bridgetown
4
- module Commands
5
- module Summarizable
6
- def summary(description = nil)
7
- return @desc.split("\n").last.strip unless description
8
-
9
- desc "Description:\n #{description}"
10
- end
11
- end
12
- end
13
- end
File without changes
@@ -1,59 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "fileutils"
4
-
5
- say "Installing Stimulus...", :green
6
-
7
- add_npm_package "@hotwired/stimulus"
8
-
9
- say 'Adding Stimulus to "frontend/javascript/index.js"...', :magenta
10
-
11
- javascript_import do
12
- <<~JS
13
- import { Application } from "@hotwired/stimulus"
14
- JS
15
- end
16
-
17
- javascript_dir = File.join("frontend", "javascript")
18
-
19
- append_to_file(File.join(javascript_dir, "index.js")) do
20
- <<~JS
21
-
22
- window.Stimulus = Application.start()
23
-
24
- import controllers from "./controllers/**/*.{js,js.rb}"
25
- Object.entries(controllers).forEach(([filename, controller]) => {
26
- if (filename.includes("_controller.") || filename.includes("-controller.")) {
27
- const identifier = filename.replace("./controllers/", "")
28
- .replace(/[_-]controller\\..*$/, "")
29
- .replace(/_/g, "-")
30
- .replace(/\\//g, "--")
31
-
32
- Stimulus.register(identifier, controller.default)
33
- }
34
- })
35
- JS
36
- end
37
-
38
- controller_dir = File.join(javascript_dir, "controllers")
39
-
40
- say "Creating a `./#{controller_dir}` directory...", :magenta
41
- FileUtils.mkdir_p(controller_dir)
42
-
43
- say "Creating an example Stimulus Controller for you!...", :magenta
44
- create_file(File.join(controller_dir, "example_controller.js")) do
45
- <<~JS
46
- import { Controller } from "@hotwired/stimulus"
47
- export default class extends Controller {
48
- connect() {
49
- console.log("Hello, Stimulus!", this.element)
50
- }
51
- }
52
- JS
53
- end
54
-
55
- say "Stimulus successfully added", :green
56
-
57
- say "To start adding controllers, visit the `./frontend/javascript/controllers/` directory", :blue
58
- say "Make sure your controllers follow the `[name]_controller.js` convention", :blue
59
- say 'For further reading, check out "https://stimulus.hotwired.dev/"', :blue