Comments (7)
Have you tried mix clean
and then mix compile
? Also a brutal rm -rf _build
should work.
My local tests did not need any compile step, because of @external_resource
.
from slugger.
I'm having the same problem. Where does the custom file go? Where is lib
relative to? Nowhere seems to work, even with clearing out the build and recompiling.
from slugger.
Could you please show how your folder layout looks like?
When the library is installed via mix it should look somehow like this:
config/dev.exs <- Put your own config in here.
deps/slugger/lib/replacements.exs <- This is the default file
priv/slugger_replacements.exs <- This is our custom file.
Have you tried using __DIR__
in your config? Then you could make the path relative to config/
.
from slugger.
I'm wondering how this should be working when using erlang releases. The packaging will result in a different path for the priv dir and using :code.priv_dir(:myapp)
would not work in the config.exs.
from slugger.
The idea is to have a relative path from __DIR__
inside your project, what should work independent from absolute location.
from slugger.
Yeah, but a static relative path is also not present by default in an erlang release. Priv files live in lib/myapp-0.0.1/priv/
, which is neither a fitting relative path in the dev environment of a mix project nor static as it's including the version of the application. In my opinion the most sane way would be to have the config be a relative path within /priv
and the application name while using Path.join(:code.priv_dir(:myapp), rel_path)
within slugger to build an absolute path from both.
from slugger.
Okay, have you tried this? Is there a error message?
Because the replacemenets.exs file is only used at compile. If a different file is used by configuration, it does not need to be inside the release because it has become code at compiletime.
This is the place: https://github.com/h4cc/slugger/blob/master/lib/slugger.ex#L84
from slugger.
Related Issues (18)
- Using mix configuration to make replaces.exs file configureable. HOT 3
- Writing some test, maybe with QuickCheck
- Limit length of slug HOT 3
- Symbol and Currencies HOT 2
- Using test fixtures from javiereguiluz/EasySlugger HOT 3
- Linking `ecto_autoslug_field` HOT 3
- Using mix configuration to make default seperator '-' changeable. HOT 3
- ö is a problem in Turkish HOT 2
- Fix deprecation warnings HOT 1
- Add specs.
- Handle `'s ` specially? HOT 1
- Breaking changes in 0.3 HOT 4
- Bug: Returns non-string binaries when called on Emojis HOT 2
- The “unwanted characters regex” matches wanted characters
- Create benchmarks.
- Unique slug? HOT 5
- Next release? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slugger.