Blame view

public/assets/libs/Sortable/scripts/minify.js 337 Bytes
2db47680   hexiaodong   chore: 初始提交 php 遗...
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'
  );