Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve asset management for development and releases #143

Copy link
Copy link
Open
@crbelaus

Description

@crbelaus
Issue body actions

At the moment we are including the compiled static assets in the repository inside the priv/static folder which should not be required. We do this because this files should be included when we publish a new release.

The downside is that when making changes we must remember to recompile the assets. Otherwise we risk including out of date assets when publishing a new release.

I took a look at how Oban Web does this and they have a mix release command that:

  1. Builds the assets
  2. Creates a new git tag and pushes it using the configured version
  3. Publish the new release to hex

This removes the need for keeping the compiled assets in the repository as they will be effectively compiled right before cutting the release, ensuring that they are always up to date.


Another thing that would be worth improving is how assets interact with the development server. At the moment we must run mix assets.watch in a separate terminal along the dev server to ensure that they are updated.

As it turns out the Phoenix Playground has a endpoint_options config that allows us to specify the watchers just like we do in a regular Phoenix project. If I understand this well, it would mean that the assets would automatically run along the dev server without us having to run them manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.