Last active
August 29, 2015 14:13
-
-
Save jbasoo/0282753ecdde91448b09 to your computer and use it in GitHub Desktop.
Convert Sass breakpoints to JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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