Pode icon indicating copy to clipboard operation
Pode copied to clipboard

Using CSS pre-processors with PowerShell Pode web framework

Open pcgeek86 opened this issue 3 years ago • 1 comments

Describe the Change

I'd like to use SASS or LESS with Pode. At the moment, the documentation isn't super clear about how best to accomplish this. I would imagine that the ideal workflow would be to install LESS or SASS during a Docker container image build, and then execute the build tool somewhere inside the Dockerfile.

Curious if anyone else has attempted this yet.

pcgeek86 avatar Dec 18 '21 22:12 pcgeek86

It's been some time since I've used LESS, but I believe you're right that you could install the tool with npm/yarn in the container, and then execute it; something like:

FROM badgerati/pode:latest
WORKDIR /usr/src/app/
COPY . .

RUN yarn install less -g
RUN lessc ./path/style.less ./path/style.css

EXPOSE 8085
CMD [ "pwsh", "-c", "cd /usr/src/app; ./server.ps1" ]

Badgerati avatar Dec 20 '21 22:12 Badgerati