Press Space or ➡ for next page
If you haven’t, I hope you will after my talk 😝.
Press Space or ➡ for next page
If you haven’t, I hope you will after my talk 😝.
import styles from './styles.module.css'; <div className={styles.button}>Click me</div>
import styles from './styles.module.css'; <div className={styles.button}>Click me</div>
E.g: We might know how to use CSS Modules, but we might not need to know how CSS Modules work under the hood
require('postcss-modules')({ getJSON: (cssFileName, json, outputFileName) => { console.log(JSON.stringify(json)); }, generateScopedName: function (name, filename, css) { const stringHash = require('string-hash'); const i = css.indexOf('.' + name); const line = css.substr(0, i).split(/[\\r\\n|\\n|\\r]/).length; const removedNewLineCharactersCss = css.replace(/(\\r\\n|\\n|\\r)/g, ''); const hash = stringHash(removedNewLineCharactersCss).toString(36).substr(0, 5); return '_' + name + '_' + hash + '_' + line; }, })
require('postcss-modules')({ getJSON: (cssFileName, json, outputFileName) => { console.log(JSON.stringify(json)); }, generateScopedName: function (name, filename, css) { const stringHash = require('string-hash'); const i = css.indexOf('.' + name); const line = css.substr(0, i).split(/[\\r\\n|\\n|\\r]/).length; const removedNewLineCharactersCss = css.replace(/(\\r\\n|\\n|\\r)/g, ''); const hash = stringHash(removedNewLineCharactersCss).toString(36).substr(0, 5); return '_' + name + '_' + hash + '_' + line; }, })
=> You need to manage your time well
=> Always have a plan
(A Good Plan Today is Better than a Perfect Plan Tomorrow)
=> Why do you start OSS in the first place?
Read open source code a lot => code reading/ debugging skills improved
Understand how the tools you use everyday work under the hood => Better programmer
Rabbit hole: Jest, Vite core, CRA core, Websocket, chokidar, shebang, PostCSS, Babel…
Know great developers:
Know great developers:
I received a lot of thanks:
How to do that?
Use static site generator:
I hope you will have a lot of fun and learn a ton doing open source software.
Q&A
Try Jest Preview and give it a star since it's free 😝
Slides available at https://jsconf.hung.dev/