Skip to content

Commit

Permalink
feat: publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo committed Oct 17, 2017
1 parent 39592f8 commit bffb278
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const webpack = require('webpack')
module.exports = {
srcDir: 'client/',
buildDir: '.build/',
buildDir: 'dist/client/',
dev: (process.env.NODE_ENV !== 'production'),
/*
** Router config
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "0.2.0",
"description": "Based on Vue.js 2.x, Koa 2.x, Element-UI and Nuxt.js",
"author": "Clark Du",
"private": true,
"license": "MIT",
"main": "dist/server-app.js",
"repository": {
"type": "git",
"url": "git+https://github.com/clarkdo/hare.git"
Expand All @@ -16,12 +17,13 @@
"build": "yarn build:client && yarn build:server",
"build:client": "nuxt build",
"build:server": "webpack --config server/webpack.config.babel.js",
"start": "cross-env NODE_ENV=production node .build/dist/server-app.*.js",
"start": "cross-env NODE_ENV=production node dist/server-app.js",
"start:pm2": "pm2 start yarn --name=hare -- start",
"analyze": "nuxt build --analyze",
"generate": "nuxt generate",
"precommit": "lint-staged",
"heroku-postbuild": "yarn build",
"prepublish": "yarn lint && yarn test && yarn build:server",
"release": "standard-version"
},
"ava": {
Expand Down
4 changes: 2 additions & 2 deletions server/webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export default {
},
target: 'node',
output: {
path: process.cwd() + '/.build/dist',
filename: 'server-[name].[hash].js'
path: process.cwd() + '/dist',
filename: 'server-[name].js'
},
module: {
rules: [
Expand Down

0 comments on commit bffb278

Please sign in to comment.