0.0.3 • Published 8 months ago

@zx-libs/header v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

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<capricorncd@qq.com>',
  homepage: 'https://github.com/capricorncd/zx-libs#readme',
})

// or
header('./dist', [
  '/*!',
  ' * libs-name version 1.0.0',
  ' * Author: capricorncd<capricorncd@qq.com>',
  ' * 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<capricorncd@qq.com>'
 * Homepage: https://github.com/capricorncd/zx-libs#readme'
 * Released on: 2024-04-21 17:31:24 (GMT+0900)'
 */
0.0.3

8 months ago

0.0.2

1 year ago

0.0.1

1 year ago