Skip to content

Instantly share code, notes, and snippets.

@jbasoo
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbasoo/0282753ecdde91448b09 to your computer and use it in GitHub Desktop.
Save jbasoo/0282753ecdde91448b09 to your computer and use it in GitHub Desktop.
Convert Sass breakpoints to JS
// Convert
// $window_s: 768px;
// $window_m: 960px;
// $window_l: 1200px;
// to
// window.window_s = 768;
// window.window_m = 960;
// window.window_l = 1200;
replace: {
convertSassBreakpointsToJS: {
src: '/scss/settings/_breakpoints.scss',
dest: '/js/breakpoints.js',
replacements: [
{
from: '$',
to: 'window.'
},
{
from: ':',
to: ' ='
},
{
from: 'px',
to: ''
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment