Skip to content

Commit 0a4721e

Browse files
committed
Add prepublish task.
1 parent c5cc860 commit 0a4721e

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,20 @@ Info: To get a more detailed logging, use `yarn start:verbose` instead.
194194

195195
## Distribution
196196

197-
Start build:
198-
_Will create a `dist` directory in your project root._
197+
Start publish preparation build:
198+
_Will execute tests, update docs and create a `dist` directory in your project root._
199199

200200
```
201-
yarn build
201+
yarn prepublish
202202
```
203203

204-
Afterwards, the production app build can be tested by run `yarn start:dist`. The app should open in your browser automatically, otherwise open: `http://localhost:3000`
204+
The production app build can be tested by run `yarn start:dist`. The app should open in your browser automatically, otherwise open: `http://localhost:3000`
205205

206-
Info: To get a more detailed logging, use `yarn build:verbose` instead.
206+
When production build seems correct, you can publish the build finally (please use correct [semantic versioning](https://docs.npmjs.com/getting-started/semantic-versioning)):
207+
208+
```
209+
yarn publish
210+
```
207211

208212
### Contributing & Troubleshooting
209213

package.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"build:verbose": "NODE_ENV=production babel-node node_modules/gulp/bin/gulp.js build",
1111
"build:disclaimer": "yarn licenses generate-disclaimer --production >> DISCLAIMER.md",
1212
"docs": "babel-node docs/tools/create-ui5-docs.js",
13+
"prepublish": "yarn test && yarn docs && yarn build && yarn build:disclaimer",
1314
"precommit": "lint-staged"
1415
},
1516
"lint-staged": {
@@ -48,19 +49,15 @@
4849
},
4950
"theme": "sap_belize_plus",
5051
"apps": [],
51-
"libraries": [
52-
{
53-
"name": "ui5.viz",
54-
"path": "src/ui5/viz"
55-
}
56-
],
52+
"libraries": [{
53+
"name": "ui5.viz",
54+
"path": "src/ui5/viz"
55+
}],
5756
"themes": [],
58-
"assets": [
59-
{
60-
"name": "ui5.demo",
61-
"path": "src/demo"
62-
}
63-
]
57+
"assets": [{
58+
"name": "ui5.demo",
59+
"path": "src/demo"
60+
}]
6461
},
6562
"devDependencies": {
6663
"babel": "^6.23.0",

0 commit comments

Comments
 (0)