-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
986fa93
commit 472f8f7
Showing
5 changed files
with
63 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
|
||
const outputPath = path.join(__dirname, 'dist', 'max-streak-rules.css'); | ||
const MAX_STREAK = 60; | ||
let maxStreakRules = '.maxStreakBoard::after {content: "Max streak: 0x";}\n'; | ||
|
||
console.log(`Generating ${MAX_STREAK} CSS rules for max streak`); | ||
|
||
// Hardcoded for now, but 60 is the max score you can get currently | ||
for (let i =0; i < MAX_STREAK; i++) { | ||
maxStreakRules += `.hitbox:checked ${'+ .hitbox:checked '.repeat(i)}~ .maxStreakBoard::after {content: "Max streak: ${i + 1}x";}\n` | ||
} | ||
|
||
fs.writeFileSync(outputPath, maxStreakRules); | ||
|
||
console.log('Done'); | ||
console.log(`${maxStreakRules.length/1000} Kb`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters