zhaojs
2023-07-20 bc118fd2a3e747433dd4d7e0b12752a39f1bd504
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'
);