mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-25 13:39:06 -05:00
update build script
This commit is contained in:
parent
ceb7cd54e1
commit
90abab6c25
1 changed files with 5 additions and 3 deletions
|
@ -4,6 +4,7 @@
|
|||
const webpack = require('webpack');
|
||||
const path = require('path');
|
||||
const pkg = require('./package.json');
|
||||
const fs = require('fs');
|
||||
const execSync = require('child_process').execSync;
|
||||
|
||||
module.exports = (env = {}) => {
|
||||
|
@ -14,13 +15,14 @@ module.exports = (env = {}) => {
|
|||
|
||||
const commitHash = execSync('git rev-parse --short HEAD').toString().trim();
|
||||
const version = !alpha ? pkg.version : `${pkg.version}-alpha+${commitHash}`;
|
||||
const license = fs.readFileSync('LICENSE', 'utf8');
|
||||
const date = new Date().toISOString().slice(0, 10);
|
||||
const name = 'matter';
|
||||
const alphaInfo = 'Experimental pre-release build.\n ';
|
||||
const banner =
|
||||
` ${pkg.name} ${version} by @liabru (c) ${date}
|
||||
${alpha ? alphaInfo : ''}${pkg.homepage}
|
||||
License ${pkg.license}`;
|
||||
`${pkg.name} ${version} by @liabru ${date}
|
||||
${alpha ? alphaInfo : ''}${pkg.homepage}
|
||||
License ${pkg.license}${!minimize ? '\n\n' + license : ''}`;
|
||||
|
||||
return {
|
||||
entry: { [name]: './src/module/main.js' },
|
||||
|
|
Loading…
Reference in a new issue