-
Notifications
You must be signed in to change notification settings - Fork 58
Installing backpex via generator #957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
…ebar item in admin layout
I cannot start the demo app:
I removed |
|
||
with true <- install_daisyui?(), | ||
{_version, 0} <- System.cmd("npm", ["--version"], cmd_opts), | ||
{_output, 0} <- System.cmd("npm", ["i", "-D", @daisyui_version], cmd_opts) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is more common to place the package.json
into /assets
so we should probably call this within the /assets
directory. What do you think? I am not sure because I also know of applications that have a package.json
on the root level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can check in which directory the package.json exists and then call the command there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just tested the generator with a new phoenix project using phoenix version 1.8.0-rc.3 (phoenixframework/phoenix@827dca4). As daisyui now comes with Phoenix by default, installing daisyui with our installer would no longer be necessary. So should we wait for Phoenix 1.8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can check in which directory the package.json exists and then call the command there.
👍
As daisyui now comes with Phoenix by default, installing daisyui with our installer would no longer be necessary. So should we wait for Phoenix 1.8?
I guess, the installer should also work if you've installed Phoenix with the 1.7 generator and do not have daisyui pre-installed.
It's easy to check if DaisyUI is installed via NPM, right? But can we also check whether it is installed without NPM, as is done in Phoenix 1.8? @phyr97
I'd prefer to check if daisyui is installed (NPM or Phoenix 1.8-way). If not, install daisyui via NPM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess, the installer should also work if you've installed Phoenix with the 1.7 generator and do not have daisyui pre-installed.
The problem with the generated phoenix 1.7 project is, that it comes with an older tailwind version with a tailwind config which is hardly to manage in the installer.
As the installer does not automate all the steps from our guide, the docs should make it clear where you have to continue. My idea would be to sort the installation guide to first cover the steps the installer can do for you, and then list all the other steps. Then we can link to the section where you can continue. Also, we should move the info for the installer task below the This is the order I came up with (Prerequisites) - as you need to perform the below steps to be able to run the generator
Generator hint / info (below steps are covered by the generator)
Continue Hint (steps running the generator)
Without reordering the installation guide, it is not clear where you have to continue after you've run the command. |
|
# Conflicts: # demo/mix.lock # mix.lock
closes #980
This is the starting point for a backpex installer with igniter. You can use
mix igniter.install backpex
to add backpex to your project and have almost everything set up without any further work. More information about installing with igniter can be found in its docs.The installer requires the new tailwind and daisyui update (#920), as it greatly reduces the pain of the tailwind and daisyui setup (no tailwind.config.js 🥳).
ToDo
backpex_routes
torouter.exs
.admin.html.heex
to layouts folder@source "../../deps/backpex/**/*.*ex";
toapp.css
tailwindcss/forms
plugin exists inapp.css
bg-white
class is used onbody
tagIgniter.Test