Project management

class boussole.project.ProjectStarter[source]

Provide methods to create a new SASS Project

commit(sourcedir, targetdir, abs_config, abs_sourcedir, abs_targetdir)[source]

Commit project structure and configuration file

Parameters:
  • sourcedir (string) – Source directory path.
  • targetdir (string) – Compiled files target directory path.
  • abs_config (string) – Configuration file absolute path.
  • abs_sourcedir (string) – sourcedir expanded as absolute path.
  • abs_targetdir (string) – targetdir expanded as absolute path.
expand(basedir, config, sourcedir, targetdir, cwd)[source]

Validate that given paths are not the same.

Parameters:
  • basedir (string) – Project base directory used to prepend relative paths. If empty or equal to ‘.’, it will be filled with current directory path.
  • config (string) – Settings file path.
  • sourcedir (string) – Source directory path.
  • targetdir (string) – Compiled files target directory path.
  • cwd (string) – Current directory path to prepend base dir if empty.
Returns:

Expanded arguments in the same order

Return type:

tuple

init(basedir, config, sourcedir, targetdir, cwd='', commit=True)[source]

Init project structure and configuration from given arguments

Parameters:
  • basedir (string) – Project base directory used to prepend relative paths. If empty or equal to ‘.’, it will be filled with current directory path.
  • config (string) – Settings file path.
  • sourcedir (string) – Source directory path.
  • targetdir (string) – Compiled files target directory path.
Keyword Arguments:
 
  • cwd (string) – Current directory path to prepend base dir if empty.
  • commit (bool) – If False, directory structure and settings file won’t be created.
Returns:

A dict containing expanded given paths.

Return type:

dict

valid_paths(*args)[source]

Validate that given paths are not the same.

Parameters:(string) – Path to validate.
Raises:boussole.exceptions.SettingsInvalidError – If there is more than one occurence of the same path.
Returns:True if paths are validated.
Return type:bool