Timers and other features for Heroes of the Storm
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

vor 4 Jahren
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright © 2021 Adrien Agez <adrien.agez@pm.me>
  3. *
  4. * This file is part of Nexus Timers.
  5. *
  6. * Nexus Timers is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Nexus Timers is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with Nexus Timers. If not, see <https://www.gnu.org/licenses/>.
  18. */
  19. 'use strict'
  20. require('./check-versions')()
  21. process.env.NODE_ENV = 'production'
  22. const ora = require('ora')
  23. const rm = require('rimraf')
  24. const path = require('path')
  25. const chalk = require('chalk')
  26. const webpack = require('webpack')
  27. const config = require('../config')
  28. const webpackConfig = require('./webpack.prod.conf')
  29. const spinner = ora('building for production...')
  30. spinner.start()
  31. rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
  32. if (err) throw err
  33. webpack(webpackConfig, function (err, stats) {
  34. spinner.stop()
  35. if (err) throw err
  36. process.stdout.write(stats.toString({
  37. colors: true,
  38. modules: false,
  39. children: false,
  40. chunks: false,
  41. chunkModules: false
  42. }) + '\n\n')
  43. console.log(chalk.cyan(' Build complete.\n'))
  44. console.log(chalk.yellow(
  45. ' Tip: built files are meant to be served over an HTTP server.\n' +
  46. ' Opening index.html over file:// won\'t work.\n'
  47. ))
  48. })
  49. })