zhaojs
2023-06-08 0853f5696279549710a83579330a4b975d95ec5f
1
2
3
4
5
6
7
8
9
10
11
const UglifyJS = require('uglify-js'),
    fs = require('fs'),
     package = require('../package.json');
 
const banner = `/*! Sortable ${ package.version } - ${ package.license } | ${ package.repository.url } */\n`;
 
fs.writeFileSync(
    `./Sortable.min.js`,
    banner + UglifyJS.minify(fs.readFileSync(`./Sortable.js`, 'utf8')).code,
    'utf8'
);