GithubHelp home page GithubHelp logo

alterego-labs / assets_pipeline_ex Goto Github PK

View Code? Open in Web Editor NEW
1.0 5.0 0.0 244 KB

The asset pipeline provides a framework to pre-process JavaScripts assets in other language such as CoffeeScript.

Elixir 100.00%

assets_pipeline_ex's Introduction

AssetsPipelineEx

The asset pipeline provides a framework to pre-process JavaScripts assets in other language such as CoffeeScript.

How to use the assets pipeline

All compiled javascripts must be placed in priv/assets/js folder. Only that files are served by AssetsPipeline. Not compiled javascripts must be placed in public/assets folder. At each server starting assets from priv/asstes/js folder are automatically compiled and placed to public/assets folder - only from this one assets are used for including to html folder.

#Configuration Configuration is contained in config/assets_pipeline_ex.exs file. In that one you must specify list of precompiled assets. Also you must add handling assets by patching cowboy router like this:

{"/assets/[...]", :cowboy_static, {:dir, "public/assets"}}

Tasks

Initialization

mix ape.init

Generate default config

Next command will generate default config file:

mix ape.gen.config

After that file config/assets_pipeline_ex.exs will be appear.

Assets compilation

For compile all assets run next command in the shell:

mix ape.compile

After this all files in priv/assets/[...] folder will be compiled and placed in public/assets/[...] folder.

Acceptable pre-processors

Now only CoffeeScript preprocessor is available. Javascript files written in coffeescript must be placed in priv/assets/js folder and has extension .coffee.

assets_pipeline_ex's People

Contributors

sergio1990 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.