Skip to content

Commit 9c3cbcf

Browse files
committed
Improve initializer template
1 parent af861ef commit 9c3cbcf

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

lib/templates/initializer.rb

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
JsRoutes.setup do |c|
22
# Setup your JS module system:
3-
# ESM, CJS, AMD, UMD or nil
3+
# ESM, CJS, AMD, UMD or nil.
44
# c.module_type = "ESM"
5+
6+
# Legacy setup for no modules system.
7+
# Sets up a global variable `Routes`
8+
# that holds route helpers.
9+
# c.module_type = nil
10+
# c.namespace = "Routes"
11+
12+
# Follow javascript naming convention
13+
# but lose the ability to match helper name
14+
# on backend and frontend consistently.
15+
# c.camel_case = true
16+
17+
# Generate only helpers that match specific pattern.
18+
# c.exclude = /^api_/
19+
# c.include = /^admin_/
20+
21+
# Generate `*_url` helpers besides `*_path`
22+
# for apps that work on multiple domains.
23+
# c.url_links = true
24+
25+
# More options:
26+
# @see https://github.com/railsware/js-routes#available-options
527
end

0 commit comments

Comments
 (0)