Skip to content
Snippets Groups Projects
Select Git revision
  • 55db077b199223170be473437a94ccfb329dbed8
  • master default protected
  • 1.31
  • 4.25.2
  • 4.25.1
  • 4.25.0
  • 4.24.3
  • 4.24.2
  • 4.24.1
  • 4.24.0
  • 4.23.6
  • 4.23.5
  • 4.23.4
  • 4.23.3
  • 4.23.2
  • 4.23.1
  • 4.23.0
  • 4.22.3
  • 4.22.2
  • 4.22.1
  • 4.22.0
  • 4.21.0
  • 4.20.1
23 results

icons.mjs

Blame
  • build-stylesheets.nix 1.03 KiB
    {
      pkgs,
      lib,
      commonScript,
      ...
    }: let
    in
      pkgs.writeShellScriptBin "build-stylesheets" ''
        source ${commonScript}
    
        echo_section "Building stylesheets"
        echo_hint "The command is executed in the current working directory and not in a nix derivation."
        cd_working_dir
    
        sourcePath="$(pwd)/source"
    
        function build() {
            source ${commonScript}
            local prefix="''${sourcePath}/"
            echo_step "build stylesheet ''${1#$prefix}"
            ${pkgs.nodejs_21}/bin/node ./development/scripts/buildStylesheets.mjs "$1"
        }
    
        export -f build
    
        if ! ${pkgs.fd}/bin/fd --absolute-path --full-path "$sourcePath" --type file --extension pcss -0 | xargs -0 -I {} bash -c 'build "$@"' _ {}; then
          echo_fail "Stylesheet build failed. Exiting."
          exit 1
        fi
    
        echo_step "Formatting JS code"
        if ! ${pkgs.biome}/bin/biome format --write ./source/
        then
          echo_fail "biome format failed"
          exit 1
        else
            echo_ok "JS code formatted"
        fi
    
        echo_ok "Stylesheet build successful"
      ''