mirror of
https://github.com/emotion-js/emotion.git
synced 2026-01-18 16:12:33 +00:00
* chore: bump Prettier and Prettier accessories to 2.x Excluded Markdown files because some of them had a lot of noise. * Undid .md, .mdx changes * Undid site/CHANGELOG.md changes too
26 lines
729 B
JavaScript
26 lines
729 B
JavaScript
// slack invite links expire after 30 days and you can't(at least as far as i can tell) create tokens for things like slackin anymore
|
|
|
|
const fs = require('fs')
|
|
|
|
const slackInviteLink = process.argv[2]
|
|
|
|
const siteHeaderPath = `${__dirname}/../site/src/components/SiteHeader.js`
|
|
const readmePath = `${__dirname}/../README.md`
|
|
|
|
const slackInviteLinkRegex =
|
|
/https:\/\/join\.slack\.com\/t\/emotion-slack\/shared_invite\/[^/]+\//
|
|
|
|
const siteHeader = fs.readFileSync(siteHeaderPath, 'utf8')
|
|
|
|
fs.writeFileSync(
|
|
siteHeaderPath,
|
|
siteHeader.replace(slackInviteLinkRegex, slackInviteLink)
|
|
)
|
|
|
|
const readme = fs.readFileSync(readmePath, 'utf8')
|
|
|
|
fs.writeFileSync(
|
|
readmePath,
|
|
readme.replace(slackInviteLinkRegex, slackInviteLink)
|
|
)
|