Sunappu-Dojo / burokku

🤜 ⍰
https://block.sunappu.net
6 stars 3 forks source link

Unclutter modules #120

Closed meduzen closed 9 months ago

meduzen commented 9 months ago

This is a global JavaScript refactor to rely more on real modules instead of attaching them to an app object.

So it does less of this:

import initEvents from './events/EventsManager'
import { initBlocks, initWallet } from './modules'
import { doc } from './utils/Document'

class Burokku {
  constructor() {
    this.init()
  }

  init() {
    doc.classList.replace('no-js', 'js')

    initEvents(this)

    this.blocks = initBlocks()
    this.wallet = initWallet()
  }

  /* and more stuff… */
}

and more of this:

import initEvents from './events/EventsManager'
import { doc } from './utils/Document'
import { initBlocks } from './modules/BlocksManager'
import { initWallet } from './modules/Wallet'

doc.classList.replace('no-js', 'js')

initEvents()
initBlocks()
initWallet()
/* and more stuff… */
what-the-diff[bot] commented 9 months ago

PR Summary

github-actions[bot] commented 9 months ago

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Everything 284.36 KB (-0.1% 🔽) 5.7 s (-0.1% 🔽) 5.8 s (+4.03% 🔺) 11.5 s
HTML 4.38 KB (0%) 88 ms (0%) 0 ms (+100% 🔺) 88 ms
CSS 3.49 KB (-2.62% 🔽) 70 ms (-2.62% 🔽) 0 ms (+100% 🔺) 70 ms
JS 6.77 KB (-2.71% 🔽) 136 ms (-2.71% 🔽) 7.7 s (+88.81% 🔺) 7.9 s
Fonts 58.09 KB (0%) 1.2 s (0%) 0 ms (+100% 🔺) 1.2 s
Sounds (FLAC) 125.78 KB (0%) 2.6 s (0%) 0 ms (+100% 🔺) 2.6 s
Sounds (WAV) 168.79 KB (0%) 3.4 s (0%) 0 ms (+100% 🔺) 3.4 s