Skip to content
Snippets Groups Projects
Select Git revision
  • d6cc55ca8cf57efbf810d82797e795b6e5ca1595
  • develop default protected
  • weblate
  • renovate/vitejs-plugin-vue-6.x
  • renovate/major-font-awesome
  • renovate/vitest-monorepo
  • renovate/sass-1.x
  • renovate/stylelint-16.x
  • renovate/vue-monorepo
  • renovate/eslint-monorepo
  • renovate/sinon-chai-4.x
  • renovate/chai-5.x
  • suggest-remove
  • renovate/node-22.x
  • shigusegubu
  • from/develop/tusooa/sw-cache-assets
  • settings-sync
  • master protected
  • release/2.8.x
  • real-vote-counts
  • audio-viz
  • 2.8.0
  • 2.7.1
  • 2.7.0
  • 2.6.1
  • 2.6.0
  • 2.5.0
  • 2.4.2
  • 2.4.0
  • 2.3.0
  • 2.2.3
  • 2.2.2
  • 2.2.1
  • 2.2.0
  • 2.1.2
  • 2.1.1
  • 2.1.0
  • 2.0.5
  • 2.0.3
  • 2.0.2
  • 0.9.999
41 results

utils.js

Blame
  • build.js 917 B
    // https://github.com/shelljs/shelljs
    require('./check-versions')()
    require('shelljs/global')
    env.NODE_ENV = 'production'
    
    var path = require('path')
    var config = require('../config')
    var ora = require('ora')
    var webpack = require('webpack')
    var webpackConfig = require('./webpack.prod.conf')
    
    console.log(
      '  Tip:\n' +
      '  Built files are meant to be served over an HTTP server.\n' +
      '  Opening index.html over file:// won\'t work.\n'
    )
    
    var spinner = ora('building for production...')
    spinner.start()
    
    var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
    rm('-rf', assetsPath)
    mkdir('-p', assetsPath)
    cp('-R', 'static/*', assetsPath)
    
    webpack(webpackConfig, function (err, stats) {
      spinner.stop()
      if (err) throw err
      process.stdout.write(stats.toString({
        colors: true,
        modules: false,
        children: false,
        chunks: false,
        chunkModules: false
      }) + '\n')
    })