diff options
Diffstat (limited to 'library/Sortable/scripts/minify.js')
-rw-r--r-- | library/Sortable/scripts/minify.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/library/Sortable/scripts/minify.js b/library/Sortable/scripts/minify.js new file mode 100644 index 000000000..e2051a2c2 --- /dev/null +++ b/library/Sortable/scripts/minify.js @@ -0,0 +1,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' +); |