Skip to content

Commit

Permalink
Release v1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Aug 16, 2023
1 parent be62380 commit 2994e5d
Show file tree
Hide file tree
Showing 19 changed files with 41 additions and 42 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,14 @@ Example **package.json** script:
},
```

### 2. Global
You can install **add-dist-header** globally and then run it anywhere directly from the terminal.

### 2. Command-line npx
Example terminal commands:
```shell
$ npm install --global add-dist-header
$ add-dist-header "build" "dist"
$ npm install --save-dev add-dist-header
$ npx add-dist-header "build" "dist"
[17:13:50] add-dist-header build/my-app.d.ts --> dist/my-app.d.ts (413.11 KB)
[17:13:51] add-dist-header build/my-app.js --> dist/my-app.js (1,569.70 KB)
```

The parameters are optional:
```shell
$ add-dist-header #same as above since "build/*" "dist" are the default parameter values
Expand All @@ -68,6 +65,7 @@ $ add-dist-header #same as above since "build/*" "dist" are the default paramet
$ add-dist-header "meta/config.js" #creates "dist/config.js" prepended with header
[17:15:03] add-dist-header meta/config.js --> dist/config.js (3.91 KB)
```
You can also install **add-dist-header** globally (`--global`) and then run it anywhere directly from the terminal.

### 3. CLI flags
Command-line flags:
Expand Down Expand Up @@ -122,6 +120,7 @@ See the **TypeScript Declarations** at the top of [add-dist-header.ts](add-dist-
- 🎋 [add-dist-header](https://github.com/center-key/add-dist-header):  _Prepend a one-line banner comment (with license notice) to distribution files_
- 📄 [copy-file-util](https://github.com/center-key/copy-file-util):  _Copy or rename a file with optional package version number_
- 📂 [copy-folder-util](https://github.com/center-key/copy-folder-util):  _Recursively copy files from one folder to another folder_
- 🪺 [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 scripts into named groups of easy to manage commands_
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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

export type Settings = {
dist: string;
Expand Down
2 changes: 1 addition & 1 deletion dist/add-dist-header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! add-dist-header v1.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

import { isBinary } from 'istextorbinary';
import path from 'path';
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "add-dist-header",
"version": "1.2.1",
"version": "1.2.2",
"description": "Prepend a one-line banner comment (with license notice) to distribution files",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -92,13 +92,13 @@
"devDependencies": {
"@types/fancy-log": "~2.0",
"@types/glob": "~8.1",
"@types/node": "~20.4",
"@typescript-eslint/eslint-plugin": "~6.2",
"@typescript-eslint/parser": "~6.2",
"@types/node": "~20.5",
"@typescript-eslint/eslint-plugin": "~6.4",
"@typescript-eslint/parser": "~6.4",
"assert-deep-strict-equal": "~1.1",
"copy-file-util": "~1.1",
"copy-folder-util": "~1.1",
"eslint": "~8.46",
"eslint": "~8.47",
"jshint": "~2.13",
"mocha": "~10.2",
"rimraf": "~5.0",
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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */
/*! add-dist-header v1.2.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */

.kebab { /* v1.2.1 */
.kebab { /* v1.2.2 */
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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License -->
<!-- add-dist-header v1.2.2 ~~ 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.2.1</h1>
<h1>Kebab v1.2.2</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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

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

export { toKebab }; //version: 1.2.1
export { toKebab }; //version: 1.2.2
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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.2 ~~ 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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

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

export { toKebab }; //version: 1.2.1
export { toKebab }; //version: 1.2.2
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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License -->
<!-- add-dist-header v1.2.2 ~~ 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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

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

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

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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */
/*! add-dist-header v1.2.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */

.kebab { /* v1.2.1 */
.kebab { /* v1.2.2 */
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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

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

export { toKebab }; //version: 1.2.1
export { toKebab }; //version: 1.2.2
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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.2 ~~ 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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License -->
<!-- add-dist-header v1.2.2 ~~ 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.2.1</h1>
<h1>Kebab v1.2.2</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.2.1 🫓🍢🫓 https://github.com/center-key/add-dist-header 🫓🍢🫓 MIT License
//! add-dist-header v1.2.2 🫓🍢🫓 https://github.com/center-key/add-dist-header 🫓🍢🫓 MIT License

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

export { toKebab }; //version: 1.2.1
export { toKebab }; //version: 1.2.2
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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */
.kebab { /* v1.2.1 */
/*! add-dist-header v1.2.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License */
.kebab { /* v1.2.2 */
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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.2 ~~ 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.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

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

0 comments on commit 2994e5d

Please sign in to comment.