Skip to content

Commit

Permalink
Release v1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Aug 12, 2024
1 parent db3307c commit c7617f6
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ See the **TypeScript Declarations** at the top of [add-dist-header.ts](add-dist-
- 🪺 [recursive-exec](https://github.com/center-key/recursive-exec):  _Run a command on each file in a folder and its subfolders_
- 🔍 [replacer-util](https://github.com/center-key/replacer-util):  _Find and replace strings or template outputs in text files_
- 🔢 [rev-web-assets](https://github.com/center-key/rev-web-assets):  _Revision web asset filenames with cache busting content hash fingerprints_
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into named groups of easy to manage commands_
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into groups of easy to manage commands_
- 🚦 [w3c-html-validator](https://github.com/center-key/w3c-html-validator):  _Check the markup validity of HTML files using the W3C validator_

Feel free to submit questions at:<br>
Expand Down
2 changes: 1 addition & 1 deletion dist/add-dist-header.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

export type Settings = {
allFiles: boolean;
Expand Down
8 changes: 4 additions & 4 deletions dist/add-dist-header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

import { isBinary } from 'istextorbinary';
import chalk from 'chalk';
Expand All @@ -18,7 +18,7 @@ const addDistHeader = {
};
const settings = { ...defaults, ...options };
if (!filename)
throw Error('[add-dist-header] Must specify the "filename" option.');
throw new Error('[add-dist-header] Must specify the "filename" option.');
const doctypeLine = /^<(!doctype|\?xml).*\n/i;
const commentStyle = {
js: { start: '//! ', end: '' },
Expand All @@ -44,11 +44,11 @@ const addDistHeader = {
const out2 = settings.replaceComment ? out1.replace(firstLine[type], '') : out1;
const doctype = mlStyle && out2.match(doctypeLine)?.[0] || '';
const out3 = mlStyle && doctype ? out2.replace(doctype, '') : out2;
const versionPattern = /{{(pkg|package)[.]version}}/g;
const versionPattern = /{{package[.]version}}/g;
const out4 = settings.setVersion ? out3.replace(versionPattern, pkg.version) : out3;
const info = pkg.homepage ?? pkg.docs ?? pkg.repository;
const unlicensed = !pkg.license || pkg.license === 'UNLICENSED';
const license = unlicensed ? 'All Rights Reserved' : pkg.license + ' License';
const license = unlicensed ? 'All Rights Reserved' : `${pkg.license} License`;
const delimiter = ' ' + settings.delimiter + ' ';
const banner = [`${pkg.name} v${pkg.version}`, info, license].join(delimiter);
const header = commentStyle[type].start + banner + commentStyle[type].end;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "add-dist-header",
"version": "1.4.2",
"version": "1.4.3",
"description": "Prepend a one-line banner comment (with license notice) to distribution files",
"license": "MIT",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions spec/fixtures/target/cli/all/kebab.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */
/*! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */

.kebab { /* v1.4.2 */
.kebab { /* v1.4.3 */
border: 2px solid firebrick;
border-radius: 3px;
}
4 changes: 2 additions & 2 deletions spec/fixtures/target/cli/all/kebab.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!doctype html>
<!-- add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License -->
<!-- add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License -->
<html lang=en>
<head>
<meta charset=utf-8>
<title>Kebab &bull; 🍢🍢🍢</title>
</head>
<body>
<h1>Kebab v1.4.2</h1>
<h1>Kebab v1.4.3</h1>
</body>
</html>
6 changes: 3 additions & 3 deletions spec/fixtures/target/cli/all/kebab.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

const toKebab = (camelStr) => { //v1.4.2
const toKebab = (camelStr) => { //v1.4.3
const dash = (word) => '-' + word.toLowerCase();
return ('' + camelStr).replace(/([A-Z]+)/g, dash).replace(/\s|^-/g, '');
};

export { toKebab }; //version: 1.4.2
export { toKebab }; //version: 1.4.3
2 changes: 1 addition & 1 deletion spec/fixtures/target/cli/all/kebab.min.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
const toKebab=(c)=>{const d=(w)=>'-'+ w.toLowerCase();return(''+c).replace(/([A-Z]+)/g,d).replace(/\s|^-/g,'');};module.exports=toKebab;
6 changes: 3 additions & 3 deletions spec/fixtures/target/cli/all/kebab.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

//! This comment is important!
const toKebab = (camelStr: string): string => { //v1.4.2
const toKebab = (camelStr: string): string => { //v1.4.3
const dash = (word: string) => '-' + word.toLowerCase();
return ('' + camelStr).replace(/([A-Z]+)/g, dash).replace(/\s|^-/g, '');
};

export { toKebab }; //version: 1.4.2
export { toKebab }; //version: 1.4.3
2 changes: 1 addition & 1 deletion spec/fixtures/target/cli/all/kebab.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License -->
<!-- add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License -->
<styles>
<style region="Greece">souvlaki</style>
<style region="Türkiye">shish</style>
Expand Down
4 changes: 2 additions & 2 deletions spec/fixtures/target/cli/all/subfolder/pita-bread.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

import { toKebab } from '../kebab';

const pitaBread = (str) => `🫓 ${toKebab(str)} 🫓`; //v1.4.2
const pitaBread = (str) => `🫓 ${toKebab(str)} 🫓`; //v1.4.3

export { pitaBread };
4 changes: 2 additions & 2 deletions spec/fixtures/target/cli/ext/kebab.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */
/*! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */

.kebab { /* v1.4.2 */
.kebab { /* v1.4.3 */
border: 2px solid firebrick;
border-radius: 3px;
}
6 changes: 3 additions & 3 deletions spec/fixtures/target/cli/ext/kebab.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

const toKebab = (camelStr) => { //v1.4.2
const toKebab = (camelStr) => { //v1.4.3
const dash = (word) => '-' + word.toLowerCase();
return ('' + camelStr).replace(/([A-Z]+)/g, dash).replace(/\s|^-/g, '');
};

export { toKebab }; //version: 1.4.2
export { toKebab }; //version: 1.4.3
2 changes: 1 addition & 1 deletion spec/fixtures/target/cli/ext/kebab.min.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
const toKebab=(c)=>{const d=(w)=>'-'+ w.toLowerCase();return(''+c).replace(/([A-Z]+)/g,d).replace(/\s|^-/g,'');};module.exports=toKebab;
4 changes: 2 additions & 2 deletions spec/fixtures/target/kebab.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License -->
<!-- add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License -->
<!-- Original header comment -->
<!doctype html>
<html lang=en>
Expand All @@ -7,6 +7,6 @@
<title>Kebab &bull; 🍢🍢🍢</title>
</head>
<body>
<h1>Kebab v1.4.2</h1>
<h1>Kebab v1.4.3</h1>
</body>
</html>
6 changes: 3 additions & 3 deletions spec/fixtures/target/kebab.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! add-dist-header v1.4.2 🫓🍢🫓 https://github.com/center-key/add-dist-header 🫓🍢🫓 MIT License
//! add-dist-header v1.4.3 🫓🍢🫓 https://github.com/center-key/add-dist-header 🫓🍢🫓 MIT License

const toKebab = (camelStr) => { //v1.4.2
const toKebab = (camelStr) => { //v1.4.3
const dash = (word) => '-' + word.toLowerCase();
return ('' + camelStr).replace(/([A-Z]+)/g, dash).replace(/\s|^-/g, '');
};

export { toKebab }; //version: 1.4.2
export { toKebab }; //version: 1.4.3
4 changes: 2 additions & 2 deletions spec/fixtures/target/kebab.min.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */
.kebab { /* v1.4.2 */
/*! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */
.kebab { /* v1.4.3 */
border: 2px solid firebrick;
border-radius: 3px;
}
2 changes: 1 addition & 1 deletion spec/fixtures/target/kebab.min.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
const toKebab=(c)=>{const d=(w)=>'-'+ w.toLowerCase();return(''+c).replace(/([A-Z]+)/g,d).replace(/\s|^-/g,'');};module.exports=toKebab;
2 changes: 1 addition & 1 deletion spec/fixtures/target/kebab.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! add-dist-header v1.4.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.4.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

//! This comment is important!
const toKebab = (camelStr: string): string => { //v{{package.version}}
Expand Down

0 comments on commit c7617f6

Please sign in to comment.