nv qol and changelog flexbox

toast
Kit Kasune 3 years ago
parent f437d36564
commit 17b680e7b2
  1. 15
      newversion.js
  2. 4
      scripts/startup/changelog.js
  3. 14
      styles/modal.css

@ -33,10 +33,17 @@ const ask = async () => {
await input("I've made the changelog for you! Press enter when you're ready to create the release tag.");
cp.exec(`npm version ${v.trim().toLowerCase()}`, function(error, stdout, stderr) {
if (error) {console.error(error);}
if (stdout) {console.log(stdout);}
if (stdout) {console.log(stderr);}
let msg = await input('What would you like the commit message to be? ');
console.log('');
cp.exec('git add .', () => {
console.log('Staged working directory.\n');
cp.exec(`npm version ${v.trim().toLowerCase()} -m %s -> ${msg}`, function(error, stdout, stderr) {
if (error) {console.error(error);}
if (stdout) {console.log(stdout);}
if (stdout) {console.log(stderr);}
});
});
console.log('\nDone!');

@ -24,14 +24,14 @@ module.exports = () => {
clw.className = 'changelog-wrapper';
modal.appendChild(clw);
changelogs.forEach(changelog => {
changelogs.reverse().forEach(changelog => {
changelog = require(`../../json/changelogs/${changelog}`);
let w = document.createElement('div');
w.className = 'changelog-version-container';
clw.appendChild(w);
let subtitle = document.createElement('h2');
subtitle.className = 'subtitle';
subtitle.innerHTML = changelog.version.name + ' ' + changelog.version.semver + (window.kade.version.name === changelog.version.name ? ' (Current)' : '');
subtitle.innerHTML = `${changelog.version.name} ${changelog.version.semver}${window.kade.version.semver === changelog.version.semver ? ' (Current)' : ''}`;
w.appendChild(subtitle);
let cl = changelog.log;
Object.keys(cl).forEach(group => {

@ -112,3 +112,17 @@
.close-button:hover:before, .close-button:hover:after {
transform: rotate(180deg);
}
.changelog-wrapper {
display: flex;
align-items: stretch;
align-content: stretch;
justify-content: flex-start;
overflow: auto;
flex-direction: column;
row-gap: 8px;
margin-top: 6px;
margin-left: 6px;
}
#changelog-modal {max-height: 70vh;}
Loading…
Cancel
Save