Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v0.0.3

## Changed
- CSS modules are now longer compiled into the code by default. You now have to
pass `embed_stylesheet: true` to the `__using__` macro to compile the CSS modules in the view.

# v0.0.2

## Changed
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
[![Hex.pm](https://img.shields.io/hexpm/v/ex_css_modules.svg)](https://hex.pm/packages/ex_css_modules)
[![CircleCI](https://circleci.com/gh/DefactoSoftware/ex_css_modules/tree/master.svg?style=shield)](https://circleci.com/gh/DefactoSoftware/ex_css_modules)

ExCSSModules currently requires the CSS Modules definitions JSON file to be compiled next to the CSS file itself and the files to be compiled before the Elixir application is build.
ExCSSModules defines two ways to read the stylesheet: embedded and read.

If you said the `embed_stylesheet` option to the `use` macro the stylesheet definitions JSON have to be compiled before the application is compiled. This flag is used for production to optimize read times.

If you don't set the flag or set it to false, the stylesheet definition JSON files are read live from the server which creates a lot of IO for each request.

## Installation
Install from [Hex.pm](https://hex.pm/packages/ex_css_modules):

```ex
def deps do
[{:ex_css_modules, "~> 0.0.1"}]
[{:ex_css_modules, "~> 0.0.3"}]
end
```

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule ExCSSModules.Mixfile do
use Mix.Project

@version "0.0.2"
@version "0.0.3"

def project do
[app: :ex_css_modules,
Expand Down