zhaojs
2023-07-04 68800d44faf87431e6b2fd4ecf7b80403542a0a6
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'
);