Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !37516

POC using postcss-banner & terser preamble

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge fod-main-banner into main Nov 18, 2022
  • Overview 4
  • Commits 2
  • Pipelines 0
  • Changes 8

Created by: ffoodd

#37494 replacement POC, adresses #35010 in another way: update banner in dist files when compiling them, respectively using terser and PostCSS.

A few quirks and drawbacks that need a bit more work:

  • I used as much data from package.json as I could (even added some in the config entry) as it was done in build/banner.js but that may be overthought: most of them could be hardcoded I think.
  • one of the drawbacks is that a few words should be capitalized, which will need some work—or we hardcode them 😇

Regarding JavaScript components, they're built using Rollup: terser doesn't run on those files, so my current changes only works on dist/js/ files. I didn't try anything for now since my initial idea was missing the fact that banner are already in our sources, not only in dist files.

So IMHO this is not meant to be merged but only to show a few more possibilities regarding banners.

@GeoSot if you have any idea to push further or want me to dig deeper, I could try :)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fod-main-banner