-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
4,720 additions
and
2,592 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
build/* | ||
config/* | ||
docs/* | ||
node_modules/* | ||
test/e2e/reports/* | ||
test/unit/coverage/* | ||
/build/ | ||
/config/ | ||
/docs/ | ||
/node_modules/ | ||
/test/e2e/reports/ | ||
/test/unit/coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.DS_Store | ||
*.log | ||
node_modules/ | ||
test/e2e/reports | ||
test/unit/coverage | ||
/node_modules/ | ||
/test/e2e/reports/ | ||
/test/unit/coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,41 @@ | ||
'use strict' | ||
require('shelljs/global') | ||
require('./check-versions')() | ||
|
||
process.env.NODE_ENV = 'production' | ||
|
||
const ora = require('ora') | ||
const rm = require('rimraf') | ||
const path = require('path') | ||
const chalk = require('chalk') | ||
const webpack = require('webpack') | ||
const config = require('../config') | ||
const webpackConfig = require('./webpack.prod.conf') | ||
|
||
console.log(chalk.yellow( | ||
' Tip: built files are meant to be served over an HTTP server.\n' + | ||
' Opening index.html over file:// won\'t work.\n' | ||
)) | ||
|
||
const spinner = ora('building for production...') | ||
spinner.start() | ||
|
||
var assetsRoot = config.build.assetsRoot | ||
rm('-rf', assetsRoot) | ||
mkdir('-p', assetsRoot) | ||
echo('vuelog.js.org').to(path.join(assetsRoot, 'CNAME')) | ||
cp('-r', 'static', path.join(assetsRoot, config.build.assetsSubDirectory)) | ||
cp('-r', 'userdata', path.join(assetsRoot, config.build.userdataSubDirectory)) | ||
|
||
webpack(webpackConfig, function (err, stats) { | ||
spinner.stop() | ||
rm(config.build.assetsRoot, err => { | ||
if (err) throw err | ||
process.stdout.write(stats.toString({ | ||
colors: true, | ||
modules: false, | ||
children: false, | ||
chunks: false, | ||
chunkModules: false | ||
}) + '\n\n') | ||
webpack(webpackConfig, (err, stats) => { | ||
spinner.stop() | ||
if (err) throw err | ||
process.stdout.write(stats.toString({ | ||
colors: true, | ||
modules: false, | ||
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. | ||
chunks: false, | ||
chunkModules: false | ||
}) + '\n\n') | ||
|
||
if (stats.hasErrors()) { | ||
console.log(chalk.red(' Build failed with errors.\n')) | ||
process.exit(1) | ||
} | ||
if (stats.hasErrors()) { | ||
console.log(chalk.red(' Build failed with errors.\n')) | ||
process.exit(1) | ||
} | ||
|
||
console.log(chalk.cyan(' Build complete.\n')) | ||
console.log(chalk.cyan(' Build complete.\n')) | ||
console.log(chalk.yellow( | ||
' Tip: built files are meant to be served over an HTTP server.\n' + | ||
' Opening index.html over file:// won\'t work.\n' | ||
)) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.