goldfinch / enchantment

Styled Admin theme for Silverstripe, based on Bootstrap 5
MIT License
1 stars 1 forks source link

Missing build instructions #3

Open dcentrica opened 1 week ago

dcentrica commented 1 week ago

Not necessarily "missing", but it would be super helpful to have some instructions on how to build CSS artefacts using vite. I for one am an utter n00b when it comes to F/E build systems - I find them too complicated for their own good and they appear to change more often than I have coffee in the morning - regardless, I've managed to get this far, but would be great to have this formally declared:

nvm use 20 && \
    cd client/src && \
    npm install -g -D vite && \
    yarn install && \
    vite

I now see errors for missing keys, due to a developer/maintainer specific path /Applications/MAMP/Library/OpenSSL/certs/${host} but I haven't used MAMP since the early 2000s and am a Linux user, so not much use to me :-(

Could you possibly provide some docs or even copy/paste commands with some suggestions? Even this would be super-useful!

Thanks heaps :-)

dcentrica commented 1 week ago

UPDATE:

  1. Generate self-signed SSL cert (not needed for my setup, but vite complained about it)
openssl req \            
  -subj "/C=GB/CN=local.dev" \
  -addext "subjectAltName = DNS:local.dev" \
  -x509 \
  -nodes \
  -days 365 \
  -newkey rsa:2048 \
  -keyout /path/to/silverstripe/project/certs/local.dev.key \
  -out /path/to/silverstripe/project/certs/local.dev.crt

2). Edit the cert+key path in app.config.js

...
certs: `/path/to/silverstripe/project/certs/${host}`,
...
...

3). Install all the things and build

nvm use 20 && \
    cd client/src && \
    npm install -g -D vite && \
    yarn install && \
    vite build
goldfinch commented 6 days ago

you don't need certs if you want to rebuild sources

that's all you need

nvm use && cd client/src && pnpm i && pnpm build