Skip to content

DavidLazic/sassh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

SASS structure builder

Shell

Usage

    cd <dir>
    build-sass.sh -n '<project_name>' -p '<file_prefix>'

where -n argument represents project name
where -p argument represents file prefix

Output structure:

|-- sass/
|   |-- core/
|       |-- _<prefix>-<core_component>.scss
|   |-- elements/
|       |-- forms/
|           |-- _<prefix>-<form_element>.scss
|       |-- _<prefix>-<element>.scss
|   |-- main.scss

Output main.scss:

    // core
    @import "core/_<prefix>-<core_component>.scss;"

    // elements
    @import "elements/_<prefix>-<element>.scss;"

    // forms
    @import "elements/forms/_<prefix>-<form-element>.scss;"

Output _file.scss:

    //
    // <project_name> <component>
    // --------------------------------------------------

    .<prefix>-<component> {

    }

====

Troubleshooting:

build-sass: command not found.

Solutions:

  • Set script as executable

        cd <path/to/script>
        chmod +x build-sass.sh
  • Run script via interpreter

    Windows/Linux/OSX

       bash </path/to/script> OR
       sh </path/to/script>

Notice: .sh cannot be run natively via Windows command prompt.

About

Bash

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages