Skip to content
Snippets Groups Projects
Select Git revision
  • db713474da80de9e4c7950ce8fa662b31bb0f7d6
  • master default protected
  • feature/reboot-instance
  • feature/add-docs-and-new-type
  • fix/statuses-by-instance
  • feature/update-server-configuration
  • feature/relays-management
  • feature/update-and-move-emoji-packs
  • fix/show-checkmarks-when-tag-applied
  • feature/apply-i18n-to-config
  • fix/objects-in-config
  • feature/filter-empty-config
  • fix/user-deletion
13 results

index.html

Blame
  • Forked from Pleroma / admin-fe
    Source project has a limited visibility.
    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')
    })