Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Commit

Permalink
⭐ new: prepublish hook and start script (#17) by @mszkb
Browse files Browse the repository at this point in the history
  • Loading branch information
mszkb authored and kazupon committed Mar 15, 2019
1 parent d52d0c1 commit e92399c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ module.exports = (api, options, rootOptions) => {
// basic extending
api.extendPackage({
scripts: {
'prepublish': 'vue-cli-service lint && vue-cli-service docs --mode build && vue-cli-service build',
'start': 'vue-cli-service serve',
'demo': 'vue-cli-service demo',
'docs': 'npm run docs:serve',
'docs:serve': 'vue-cli-service docs --mode serve',
Expand Down
1 change: 1 addition & 0 deletions tests/unit/generators/core.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ test('javascript with namespace', async () => {
function checkPackageExpectations (pkg, name) {
// check pkg
console.log('checking package')
expect(pkg.scripts['prepublish']).toMatch('vue-cli-service lint && vue-cli-service docs --mode build && vue-cli-service build')
expect(pkg.sideeffects).toBe(false)
expect(pkg.main).toBe(`dist/${name}.common.js`)
expect(pkg.jsdelivr).toBe(`dist/${name}.umd.min.js`)
Expand Down

0 comments on commit e92399c

Please sign in to comment.