bartotten / routex Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://bartotten.github.io/routex/
License: MIT License
Home Page: https://bartotten.github.io/routex/
License: MIT License
Used the routex_example
for this test.
I've created the gettext folders for en
, be
locales (nl
folder was already created) like this:
mix gettext.merge priv/gettext --locale en
mix gettext.merge priv/gettext --locale be
Next, neither mix gettext.merge priv/gettext
nor mix gettext.extract --merge
extracted anything.
There's neither a default/initial routes.pot
file generated in priv/gettext
.
What am I missing? Is there some gettext incantation I'm not doing in the right order?
When enabling the Route Helpers extension, the compilation time increases by several seconds even on a small project with a handful of routes.
interesting project
could I write a scope that matches on cookies and directs to different paths?
https://bartotten.github.io/routex/Routex.Extension.Alternatives.html
Phoenix helpers are deprecated so the use of helpers will decline. Also I haven't found a use case in which the helpers of Routex are a better choice than Routex Verified Routes (which are more powerful than the native Phoenix ones)
mix phx.new --no-ecto example
{:routex, "~> 0.1.0-alpha.2"}
example_web.ex
and routex_backend.ex
from routex_example
appget "/"
in router.ex
in preprocess_using ExampleWeb.RoutexBackend do
blockpreprocess_using ExampleWeb.RoutexBackend do
get "/", PageController, :home
end
I get this compilation error:
Completed: ExampleWeb.RoutexBackend ⇒ Routex.Extension.Alternatives.configure/2
Completed: ExampleWeb.RoutexBackend ⇒ Routex.Extension.Translations.configure/2
Start: Processing routes with Routex.Processing
Completed: ExampleWeb.RoutexBackend ⇒ Routex.Extension.VerifiedRoutes.configure/2
14:08:44.878 [info]
The default sigil used by Phoenix Verified Routes is overridden by Routex due to the configuration in `ExampleWeb.RoutexBackend`.
~p: localizes and verifies routes. (override)
~o: only verifies routes. (original)
Documentation: https://hexdocs.pm/routex/extensions/verified_routes.html
== Compilation error in file lib/example_web/router.ex ==
** (ArgumentError) could not load module ExampleWeb.RoutexBackend due to reason :nofile
(elixir 1.14.0) lib/code.ex:1562: Code.ensure_loaded!/1
(routex 0.1.0-alpha.2) lib/routex/processing.ex:136: Routex.Processing.transform_routes/3
(routex 0.1.0-alpha.2) lib/routex/processing.ex:76: anonymous fn/3 in Routex.Processing.execute_callbacks/1
(stdlib 4.0.1) maps.erl:411: :maps.fold_1/3
(routex 0.1.0-alpha.2) lib/routex/processing.ex:75: Routex.Processing.execute_callbacks/1
(stdlib 4.0.1) lists.erl:1350: :lists.foldl/3
I've checked the instructions from here to be sure I've not missed anything.
Couldn't reproduce the error in the routex_example
app.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.