Skip to content

Better Dev Experience#100

Open
EddieDover wants to merge 5 commits into
Futil:masterfrom
EddieDover:better-building
Open

Better Dev Experience#100
EddieDover wants to merge 5 commits into
Futil:masterfrom
EddieDover:better-building

Conversation

@EddieDover

Copy link
Copy Markdown

This PR updates the repository to support a better dev build experience. It may be a bit opinionated, and I'm sorry for that1.

TLDR; NPM packages have been updated to modern versions. npm run build now builds to a /dist folder, including compiling all the SCSS files into the css/mosh.css file. All the new styling that was added to mosh.css has been back-ported into relevant SCSS files so manual changes will need to go into the relevant SCSS files now.

@hollowphoton If you hate the entire concept of this, feel free to close it. I just had to patch it up for my own sanity/dev purposes and thought I could give something back.

NPM Packages

  • Updates
    • gulp
    • gulp-autoprefixer
    • gulp-sass
    • gulp-sourcemaps
  • Adds
    • del - for deleting dist folder
    • sass - for modern sass compiling after package depreciation
    • gulp-rename - for renaming in-memory CSS file before write to /css folder

Tooling

  • Updates package.json to add the following scripts:
    • build - compiles the scss into the /css folder, then copies the system to a /dist folder
    • build:watch - same as above with watch command. 2

Styling

SCSS previously heavily used the @import feature, which will be depreciated soon, so this PR modifies all the SCSS to comply with new standards (@use and @forward).

This PR also moves the manually added CSS from the mosh.css into SCSS files, so the build command generated CSS works as intended.

Testing Instructions

  1. npm install or npm ci
  2. npm run build
  3. Copy the contents of /dist folder into /mosh folder inside the /data/system folder. (This could easily be modified to output to a /mosh folder instead of a /dist folder, in the repo itself, just to make things easier.)

Notes

Footnotes

  1. I'm not sure what the build cut/release process is, so this may need some adjusting.

  2. I personally don't use watch so I wasn't sure what was expected, and this may not work 100% as intended. I keep my repos in a dedicated folder and set up my build scripts to copy things into my foundry data folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant