Skip to content

Commit 8248329

Browse files
committed
Add deprecation warning for govuk_assets_path
Setting govuk_assets_path should no longer be necessary, and to keep the code simple it will no longer have any effect. This commit lets users know about this change in case it causes them some surprise.
1 parent 0e7a875 commit 8248329

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/govuk_tech_docs.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,24 @@
2424
require "govuk_tech_docs/api_reference/api_reference_extension"
2525

2626
module GovukTechDocs
27+
class GovukTechDocsExtension < Middleman::Extension
28+
def after_configuration
29+
if app.config[:govuk_assets_path]
30+
warn "Warning: setting govuk_assets_path in config.rb is no longer necessary, and will have no effect."
31+
end
32+
end
33+
end
34+
35+
::Middleman::Extensions.register(:govuk_tech_docs, GovukTechDocsExtension)
36+
2737
# Configure the tech docs template
2838
#
2939
# @param options [Hash]
3040
# @option options [Hash] livereload Options to pass to the `livereload`
3141
# extension. Hash with symbols as keys.
3242
def self.configure(context, options = {})
43+
context.activate :govuk_tech_docs
44+
3345
context.activate :sprockets
3446

3547
context.sprockets.append_path File.join(__dir__, "../node_modules/govuk-frontend/")

0 commit comments

Comments
 (0)