Backpex.Mix.IgniterHelpers (Backpex v0.23.0)

Copy Markdown View Source

Helper functions for the Backpex mix tasks.

Summary

Functions

Updates a file by adding a line if it doesn't already exist.

Checks if an npm package is already installed in the project.

Gets the Phoenix PubSub module from the application configuration.

Checks if a specific string exists within a source's content.

Gets the web folder path for the Phoenix application, e.g. lib/my_app_web.

Functions

add_line_to_file(igniter, file_path, new_line)

Updates a file by adding a line if it doesn't already exist.

npm_package_installed?(package_name)

Checks if an npm package is already installed in the project.

pubsub_module(igniter)

Gets the Phoenix PubSub module from the application configuration.

Falls back to MyApp.PubSub, the module Phoenix generates, when the endpoint configuration is not loaded.

string_in_source?(source, string)

Checks if a specific string exists within a source's content.

web_folder_path(igniter)

Gets the web folder path for the Phoenix application, e.g. lib/my_app_web.