@zx-libs/header
v0.0.3
Published
Add some lines to the file header
Downloads
70
Maintainers
Readme
header
Add specified information to the file header, such as version, copyright, etc.
Used in JS files
import { header } from '@zx-libs/header'
header('./dist', {
name: 'libs-name',
version: '1.0.0',
author: 'capricorncd<[email protected]>',
homepage: 'https://github.com/capricorncd/zx-libs#readme',
})
// or
header('./dist', [
'/*!',
' * libs-name version 1.0.0',
' * Author: capricorncd<[email protected]>',
' * Homepage: https://github.com/capricorncd/zx-libs#readme',
' * Released on: 2024-04-21 17:31:24 (GMT+0900)',
' */',
])
Use in command line
# all files in the dist folder
node node_modules/@zx-libs/header --dir=dist
# one file prepend-file.txt
node node_modules/@zx-libs/header --dir=dist --prepend-file=prepend-file.txt
prepend-file.txt
/*!
* libs-name version 1.0.0'
* Author: capricorncd<[email protected]>'
* Homepage: https://github.com/capricorncd/zx-libs#readme'
* Released on: 2024-04-21 17:31:24 (GMT+0900)'
*/