First release
This commit is contained in:
commit
fa6c85266e
2339 changed files with 761050 additions and 0 deletions
29
node_modules/nes.css/scripts/updatePackageHeader.js
generated
vendored
Normal file
29
node_modules/nes.css/scripts/updatePackageHeader.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const getBuildData = require('./getBuildData');
|
||||
|
||||
const nextVersion = process.argv[2];
|
||||
|
||||
if (!nextVersion) {
|
||||
throw new Error('This script requires a version number to be provided');
|
||||
}
|
||||
|
||||
// Update the SCSS Package Header
|
||||
const SCSSFilePath = path.resolve('scss', 'nes-core.scss');
|
||||
let SCSSFile = fs.readFileSync(SCSSFilePath, 'utf8');
|
||||
|
||||
SCSSFile = SCSSFile.replace(/^ {2}Version: development/m, ` Version: ${nextVersion}`);
|
||||
SCSSFile = SCSSFile.replace(/^#{build-data\(\)}/m, getBuildData());
|
||||
|
||||
fs.writeFileSync(SCSSFilePath, SCSSFile, 'utf8');
|
||||
|
||||
// Update the SCSS Package Header
|
||||
const CSSFilePath = path.resolve('css', 'nes.css');
|
||||
let CSSFile = fs.readFileSync(CSSFilePath, 'utf8');
|
||||
|
||||
CSSFile = CSSFile.replace(/^ {2}Version: development/m, ` Version: ${nextVersion}`);
|
||||
|
||||
fs.writeFileSync(CSSFilePath, CSSFile, 'utf8');
|
Loading…
Add table
Add a link
Reference in a new issue