SlideShare a Scribd company logo
Mixing Up the Front-end
with ColdBox Elixir
What this talk isn't
4 For people with a highly specific build tool / chain
4 For people who never start any new projects
4 About ES6, Babel, Sass, or any of the other tasks in
our build chain
What this talk is
4 Quick, simple, out-of-the-box front-end builds
4 Builds specific to ColdBox
4 An overview of the latest *Box product
Other Session Right Now
4 AWS Lambda — what, why, when, how?
Box Room
Who am I?
Eric Peterson
! Utah
" O.C. Tanner
# 1 wife, 1 kid
Front-end Builds
4 Grunt
4 Gulp
4 Webpack
4 NPM Scripts
4 ???
ITB2016 - Mixing up the front end with ColdBox elixir
Every New Project
Every New Project
4 Decide if you are going to keep your same source
and destination path conventions
4 Create all the folders you need
4 Wire up your front-end build with your decided-
upon conventions
Every New Project
4 Write a crazy gulpfile.js
4 Bang your head against the
wall remembering weird gulp
syntax
4 Hope that copy and pasting
your config from a previous
project won't be worse
Introducing ColdBox Elixir
Inspired from Laravel Elixir
// gulpfile.js
var elixir = require( "coldbox-elixir" );
elixir( function( mix ){
mix.sass( "app.scss" );
} );
That's it!
Convention over Configuration
ColdBox Elixir knows about your
ColdBox project
You don't have to specify the
conventions!
Default ColdBox Conventions
4 Javascript
4 /resources/assets/js => /includes/js
4 CSS
4 /resources/assets/css => /includes/css
Standard Elixir Task Format
elixir( function( mix ){
mix.styles(
/* source filename */,
/* override the destination folder */,
/* override the source folder */
);
} );
Yes, the source and destination folders
can be overridden
But just stick to the conventions
It makes your life so much easier!
Styles
Styles • Pre-processors
elixir( function( mix ){
// ./resources/sass/app.scss
mix.sass( "app.scss" );
// OR
// ./resources/less/app.less
mix.less( "app.less" );
} );
Styles • Pre-processors
elixir( function( mix ){
mix.sass( [ "app.scss", "bootstrap.sass" ] );
// ./includes/css/app.css
} );
Styles • Combining Stylesheets
elixir( function( mix ){
mix.styles( [
"vendor/normalize.css",
"vendor/bootstrap.min.css",
"app.css"
] );
// ./includes/css/all.css
} );
Javascript
Javascript • Concatenating Scripts
elixir( function( mix ){
mix.scripts( [
"./includes/js/jquery.js",
"bootstrap.js"
] );
// ./includes/js/all.js
} );
Javascript • ES6 Transpiling
elixir( function( mix ){
// ./resources/js/app.js
mix.babel( "app.js" );
// ./includes/js/app.js
} );
Javascript • Module Bundling
elixir( function( mix ){
mix.browserify( "app.js" );
} );
Watch Mode
gulp watch
Asset Versioning
Asset Versioning
elixir( function( mix ){
mix.sass( "app.scss" )
.scripts( [
"jquery.js",
"bootstrap.js"
] )
.version( [
"css/all.css", // => "includes/build/all-16d570a7.css"
"js/all.js" // => "includes/build/all-89de4a22.js"
] );
} );
Asset Versioning • ColdBox Helper Functions
<html>
<head>
#elixir( "css/all.css" )#
</head>
<body>
....
#elixir( "js/all.js" )#
</body>
</html>
Minification in one line!
gulp --production
Live Reloading
Live Reloading
elixir( function( mix ){
mix.browserSync();
// OR specify your proxy server
mix.browserSync( {
proxy: "127.0.0.1:7777"
} );
} );
Live Reloading
Live Reloading
This is awesome for TestBox tests!
Custom Extensions
Figure it out in Gulp, once
Custom Extensions
var gulp = require( "gulp" );
var shell = require( "gulp-shell" );
var elixir = require( "coldbox-elixir" );
var Task = elixir.Task;
elixir.extend( "speak", function( message ){
new Task( "speak", function(){
return gulp.src( "" ).pipe( shell( "say " + message ) );
});
});
mix.speak( "Hello World" );
Get Started!
box coldbox create app skeleton=coldbox-templates/elixir
npm install
gulp
Demo
Check out the docs
http://coldbox-elixir.ortusbooks.com/
Other Sessions at dev.Objective()
CFML Sessions for Dummies
Wednesday
3:00 PM to 4:00 PM
Live Testing a Legacy App
Thursday
1:45 PM to 2:45 PM
Thank You!!
elpete
@_elpete
! dev.elpete.com

More Related Content

What's hot (20)

KEY
Why ruby and rails
Reuven Lerner
 
PDF
[Start] Playing
佑介 九岡
 
PDF
Ansible
Jasim Muhammed
 
PDF
Apply chat automation today - work smarter tomorrow
Jaap Brasser
 
PDF
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
DevConFu
 
PDF
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
Chef
 
PPTX
Ansible Best Practices - July 30
tylerturk
 
PDF
Simplify integrations-final-pdf
Christian Posta
 
PPTX
Search and analyze your data with elasticsearch
Anton Udovychenko
 
PPTX
SUGUK Let me script that for you
sharepointbaker
 
PDF
Calabash
Eliasz Sawicki
 
PPTX
Grafana and MySQL - Benefits and Challenges
Philip Wernersbach
 
PPT
Big Data DC - BenchPress
Drew Stephens
 
PPTX
Opscode Chef for Dummies
dilippanwar
 
PPTX
Automating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
Adler Hsieh
 
PDF
Postgres Open
Ines Sombra
 
PDF
Paint it blue with PowerShell
Jaap Brasser
 
PDF
Reach the next level with PowerShell
Jaap Brasser
 
KEY
improving the performance of Rails web Applications
John McCaffrey
 
PDF
Async Web and Python
Jasim Muhammed
 
Why ruby and rails
Reuven Lerner
 
[Start] Playing
佑介 九岡
 
Apply chat automation today - work smarter tomorrow
Jaap Brasser
 
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
DevConFu
 
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
Chef
 
Ansible Best Practices - July 30
tylerturk
 
Simplify integrations-final-pdf
Christian Posta
 
Search and analyze your data with elasticsearch
Anton Udovychenko
 
SUGUK Let me script that for you
sharepointbaker
 
Calabash
Eliasz Sawicki
 
Grafana and MySQL - Benefits and Challenges
Philip Wernersbach
 
Big Data DC - BenchPress
Drew Stephens
 
Opscode Chef for Dummies
dilippanwar
 
Automating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
Adler Hsieh
 
Postgres Open
Ines Sombra
 
Paint it blue with PowerShell
Jaap Brasser
 
Reach the next level with PowerShell
Jaap Brasser
 
improving the performance of Rails web Applications
John McCaffrey
 
Async Web and Python
Jasim Muhammed
 

Viewers also liked (20)

PDF
Intro to elixir and phoenix
Jared Smith
 
PDF
Elixir - Easy fun for busy developers @ Devoxx 2016
David Schmitz
 
PDF
Elixir and OTP
Pedro Medeiros
 
PDF
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Riza Fahmi
 
PDF
Flow-based programming with Elixir
Anton Mishchuk
 
PDF
Elixir & Phoenix 推坑
Chao-Ju Huang
 
PDF
Build Your Own Real-Time Web Service with Elixir Phoenix
Chi-chi Ekweozor
 
PDF
Hello elixir (and otp)
Abel Muíño
 
PDF
Elixir intro
Anton Mishchuk
 
PDF
How Elixir helped us scale our Video User Profile Service for the Olympics
Emerson Macedo
 
ODP
Elixir basics-2
Ruben Amortegui
 
PDF
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Benjamin Tan
 
PPTX
BioContainers on ELIXIR All Hands 2017
Yasset Perez-Riverol
 
PDF
Learn Elixir at Manchester Lambda Lounge
Chi-chi Ekweozor
 
PDF
Introduction to Elixir
Diacode
 
PPT
Administrative director
dersonsaman
 
PPTX
Mood boards
caitlinkirby42
 
PDF
Into The Box 2014 - Keynote
Ortus Solutions, Corp
 
PPTX
Michael jackson music vid
LucyAnne97
 
PPTX
Audience feedback q3
LucyAnne97
 
Intro to elixir and phoenix
Jared Smith
 
Elixir - Easy fun for busy developers @ Devoxx 2016
David Schmitz
 
Elixir and OTP
Pedro Medeiros
 
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Riza Fahmi
 
Flow-based programming with Elixir
Anton Mishchuk
 
Elixir & Phoenix 推坑
Chao-Ju Huang
 
Build Your Own Real-Time Web Service with Elixir Phoenix
Chi-chi Ekweozor
 
Hello elixir (and otp)
Abel Muíño
 
Elixir intro
Anton Mishchuk
 
How Elixir helped us scale our Video User Profile Service for the Olympics
Emerson Macedo
 
Elixir basics-2
Ruben Amortegui
 
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Benjamin Tan
 
BioContainers on ELIXIR All Hands 2017
Yasset Perez-Riverol
 
Learn Elixir at Manchester Lambda Lounge
Chi-chi Ekweozor
 
Introduction to Elixir
Diacode
 
Administrative director
dersonsaman
 
Mood boards
caitlinkirby42
 
Into The Box 2014 - Keynote
Ortus Solutions, Corp
 
Michael jackson music vid
LucyAnne97
 
Audience feedback q3
LucyAnne97
 
Ad

Similar to ITB2016 - Mixing up the front end with ColdBox elixir (20)

PDF
BP-9 Share Customization Best Practices
Alfresco Software
 
PDF
APEX Application Lifecycle and Deployment 20220714.pdf
Richard Martens
 
PPTX
06 integrate elasticsearch
Erhwen Kuo
 
PDF
How Ansible Makes Automation Easy
Peter Sankauskas
 
KEY
Advanced sass/compass
Nick Cooley
 
PDF
BP-7 Share Customization Best Practices
Alfresco Software
 
PDF
Oracle APEX Nitro
Marko Gorički
 
PDF
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Geecon 2019 - Taming Code Quality in the Worst Language I Know: Bash
Michał Kordas
 
PDF
Solid and Sustainable Development in Scala
scalaconfjp
 
PDF
Solid And Sustainable Development in Scala
Kazuhiro Sera
 
PPTX
PASS 24HOP Linux Scripting Tips and Tricks
Kellyn Pot'Vin-Gorman
 
PDF
ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in...
Saurabh Nanda
 
PDF
Modern Front-End Development
mwrather
 
PDF
KYSUC - Keep Your Schema Under Control
Coimbra JUG
 
PDF
Gigigo Workshop - Create an iOS Framework, document it and not die trying
Alex Rupérez
 
PDF
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
Yandex
 
KEY
Intro to html5 Boilerplate
Michael Enslow
 
PDF
Slides bootstrap-4
Michael Posso
 
PDF
Shell script-sec
SRIKANTH ANDE
 
BP-9 Share Customization Best Practices
Alfresco Software
 
APEX Application Lifecycle and Deployment 20220714.pdf
Richard Martens
 
06 integrate elasticsearch
Erhwen Kuo
 
How Ansible Makes Automation Easy
Peter Sankauskas
 
Advanced sass/compass
Nick Cooley
 
BP-7 Share Customization Best Practices
Alfresco Software
 
Oracle APEX Nitro
Marko Gorički
 
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
Ortus Solutions, Corp
 
Geecon 2019 - Taming Code Quality in the Worst Language I Know: Bash
Michał Kordas
 
Solid and Sustainable Development in Scala
scalaconfjp
 
Solid And Sustainable Development in Scala
Kazuhiro Sera
 
PASS 24HOP Linux Scripting Tips and Tricks
Kellyn Pot'Vin-Gorman
 
ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in...
Saurabh Nanda
 
Modern Front-End Development
mwrather
 
KYSUC - Keep Your Schema Under Control
Coimbra JUG
 
Gigigo Workshop - Create an iOS Framework, document it and not die trying
Alex Rupérez
 
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
Yandex
 
Intro to html5 Boilerplate
Michael Enslow
 
Slides bootstrap-4
Michael Posso
 
Shell script-sec
SRIKANTH ANDE
 
Ad

More from Ortus Solutions, Corp (20)

PDF
June Webinar: BoxLang-Dynamic-AWS-Lambda
Ortus Solutions, Corp
 
PDF
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
What's-New-with-BoxLang-Brad Wood.pptx.pdf
Ortus Solutions, Corp
 
PDF
Getting Started with BoxLang - CFCamp 2025.pdf
Ortus Solutions, Corp
 
PDF
What's New with BoxLang Led by Brad Wood.pdf
Ortus Solutions, Corp
 
PDF
Vector Databases and the BoxLangCFML Developer.pdf
Ortus Solutions, Corp
 
PDF
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
Ortus Solutions, Corp
 
PDF
Use JSON to Slash Your Database Performance.pdf
Ortus Solutions, Corp
 
PDF
Portable CI wGitLab and Github led by Gavin Pickin.pdf
Ortus Solutions, Corp
 
PDF
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
Ortus Solutions, Corp
 
PDF
Supercharging CommandBox with Let's Encrypt.pdf
Ortus Solutions, Corp
 
PDF
Spice up your site with cool animations using GSAP..pdf
Ortus Solutions, Corp
 
PDF
Passkeys and cbSecurity Led by Eric Peterson.pdf
Ortus Solutions, Corp
 
PDF
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Ortus Solutions, Corp
 
PDF
Integrating the OpenAI API in Your Coldfusion Apps.pdf
Ortus Solutions, Corp
 
PDF
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf
Ortus Solutions, Corp
 
PDF
Geting-started with BoxLang Led By Raymon Camden.pdf
Ortus Solutions, Corp
 
PDF
From Zero to CRUD with ORM - Led by Annette Liskey.pdf
Ortus Solutions, Corp
 
PDF
Customize your Runtime Creating your first BoxLang Module.pdf
Ortus Solutions, Corp
 
PDF
CommandBox WebSockets - and SocketBox.pdf
Ortus Solutions, Corp
 
June Webinar: BoxLang-Dynamic-AWS-Lambda
Ortus Solutions, Corp
 
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
Ortus Solutions, Corp
 
What's-New-with-BoxLang-Brad Wood.pptx.pdf
Ortus Solutions, Corp
 
Getting Started with BoxLang - CFCamp 2025.pdf
Ortus Solutions, Corp
 
What's New with BoxLang Led by Brad Wood.pdf
Ortus Solutions, Corp
 
Vector Databases and the BoxLangCFML Developer.pdf
Ortus Solutions, Corp
 
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
Ortus Solutions, Corp
 
Use JSON to Slash Your Database Performance.pdf
Ortus Solutions, Corp
 
Portable CI wGitLab and Github led by Gavin Pickin.pdf
Ortus Solutions, Corp
 
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
Ortus Solutions, Corp
 
Supercharging CommandBox with Let's Encrypt.pdf
Ortus Solutions, Corp
 
Spice up your site with cool animations using GSAP..pdf
Ortus Solutions, Corp
 
Passkeys and cbSecurity Led by Eric Peterson.pdf
Ortus Solutions, Corp
 
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Ortus Solutions, Corp
 
Integrating the OpenAI API in Your Coldfusion Apps.pdf
Ortus Solutions, Corp
 
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf
Ortus Solutions, Corp
 
Geting-started with BoxLang Led By Raymon Camden.pdf
Ortus Solutions, Corp
 
From Zero to CRUD with ORM - Led by Annette Liskey.pdf
Ortus Solutions, Corp
 
Customize your Runtime Creating your first BoxLang Module.pdf
Ortus Solutions, Corp
 
CommandBox WebSockets - and SocketBox.pdf
Ortus Solutions, Corp
 

Recently uploaded (20)

PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Digital Circuits, important subject in CS
contactparinay1
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 

ITB2016 - Mixing up the front end with ColdBox elixir