Elixirix
Elixir Helper For Those Who DO!
Why ?
- Easy and clean interface
- Works out-of-box alongside other elixir mixes
- Auto generate assets
- Faster workflow (vendors are compiled once)
- Npm assets compability
- CSS Flipper support for RTL stylesheets
- Multi package support
- You will never worry about assets structure.
Install
npm install --save elixirx
How does it works
Elixirx is just a set of helpers for elixir. when you run gulp --production
above script will compile, minify and contatinate all vendor assets + your project base assets in assets/build
directory. when you run either gulp
of gulp watch
this script only compiles myapp.scss
and myapp.js
, contatinates theme to vendor and base asssets and publishes them to public
directory. this will save you lots of build time while developing :)
Usage
gulpfile.js
// Require both Elixir and Elixirx modulesvar Elixir = ;var Elixirx = ; // Elixir entry point
Project Structure
Assume you have an app called myapp
. project structure should be something like this:
- assets
- build (generated)
- sass
- myapp
- myapp.base.scss
- myapp.scss
- myapp
- js - myapp - myapp.base.js - myapp.js
- public
- css
- myapp.css (generated)
- js
- myapp.js (generated)
- css
For compiling full vendors run gulp --production
For watch run gulp watch
Tips
-
You can use
Elixirx.npm()
helper to make relative pathes tonode_modules
folder. -
You can use
Elixirx.assetsVendor ()
helper to make relative pathes toassets/vendor
folder. (for you private vendor packages) -
Append this to
.gitignore
to prevent publishing intermediate assets to your repository:
resources/assets/build
Bugs
npm watch --production
goes into and infinitie dependency loop. so **DON'T RUN IT! **