Useful Shell Scripts

Useful Shell Scripts

I wrote a couple of Shell Scripts to save time when splitting SCSS into breakpoint files.

https://github.com/dgrumbler/useful_shell_scripts

$ sh sassBreakpoints.sh

This creates a named folder based on the name of the module you type in.
It then creates all the breakpoints :

  • _base.scss
  • _481up.scss
  • _768down.scss
  • _768up.scss
  • _899down.scss
  • _900up.scss
  • _1029down.scss
  • _1030up.scss
  • _1240up.scss
  • _1400up.scss
  • _1600up.scss
  • _1900up.scss

Then for each breakpoint it adds the following:

/****************************************************************
	Theme: << Module Name >>
	Viewport: << Viewport Size >>
	Author: << Author >>
****************************************************************/

Replacing Module name, viewport size and author with the user input and filename.

e.g.

/****************************************************************
	Theme: Carousel
	Viewport: 768 up
	Author: Rebecca Rumble
****************************************************************/

This one does the same as the above except it doesn’t create a folder and runs in the current directory.

$ sh sassBreakpointsNoFolder.sh
https://www.dgmyspace.dumgal.ac.uk/eportfolios/rumbler/new-useful-shell-script/
Comments are closed.