Skip to content

Commit

Permalink
feat: Added CHANGELOG.md and updated related documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
KacperMadej committed Aug 24, 2018
1 parent 0f1e435 commit 8452557
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 12 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Official minimal Highcharts wrapper for Angular
4. [Demo app](#demo-app)
1. [Play with the app](#play-with-the-app)
2. [Files to play with](#files-to-play-with)
5. [Changing the Component](#changing-the-component)



Expand Down Expand Up @@ -232,11 +233,11 @@ A map is JSON type file containing mapData code used when a chart is created. Do
```js
(function (factory) {
if (typeof module === 'object' && module.exports) {
module.exports = factory;
} else {
factory(Highcharts);
}
if (typeof module === 'object' && module.exports) {
module.exports = factory;
} else {
factory(Highcharts);
}
}(function (Highcharts) {

...
Expand Down Expand Up @@ -280,11 +281,11 @@ A wrapper is a [custom extension](https://www.highcharts.com/docs/extending-high
```js
(function (factory) {
if (typeof module === 'object' && module.exports) {
module.exports = factory;
} else {
factory(Highcharts);
}
if (typeof module === 'object' && module.exports) {
module.exports = factory;
} else {
factory(Highcharts);
}
}(function (Highcharts) {

...
Expand Down Expand Up @@ -376,7 +377,7 @@ Contains Angular main component that uses the *chart* component.
Contains the chart component that creates Highcharts chart.
## Developing/Changing the highcharts-angular Component
## Changing the Component
Using Angular CLI v6, the library must be manually rebuilt on each change
in order to reflect in the demo app.
Expand All @@ -393,3 +394,5 @@ refresh the browser a second time after the live reload in order to see the chan
See [https://github.com/angular/angular-cli/wiki/stories-create-library](https://github.com/angular/angular-cli/wiki/stories-create-library)
for details on library builds.
For CHANGELOG.md update use `npm run release`.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build": "node tasks/build.js",
"test": "ng test highcharts-angular",
"lint": "ng lint highcharts-angular",
"publish": "node tasks/build.js && node tasks/publish.js",
"release": "cd ./highcharts-angular && standard-version && node tasks/build.js && node tasks/release.js",
"e2e": "ng e2e"
},
"dependencies": {
Expand Down Expand Up @@ -50,6 +50,7 @@
"karma-jasmine-html-reporter": "^0.2.2",
"ng-packagr": "^3.0.0-rc.2",
"protractor": "~5.1.2",
"standard-version": "^4.4.0",
"ts-node": "~4.1.0",
"tsickle": ">=0.25.5",
"tslib": "^1.7.1",
Expand Down
1 change: 1 addition & 0 deletions tasks/publish.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* Publishes the package from the dist/highcharts-angular directory.
* Note: publishing manually, but keeping the file just in case.
*/

const child_process = require( 'child_process' ),
Expand Down
20 changes: 20 additions & 0 deletions tasks/release.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Prepare for release.
* Copy CHANGELOG.md up into the main dir.
*/

const child_process = require( 'child_process' ),
fs = require( 'fs' ),
path = require( 'path' );

const rootDir = path.normalize( __dirname + '/..' ),
distDir = `${rootDir}/dist/highcharts-angular`;

// Copy CHANGELOG.md to the main folder for GitHub
console.log( 'Copying dist/highcharts-angular/CHANGELOG.md to the main directory' );
fs.copyFileSync( `${distDir}/CHANGELOG.md`, `${rootDir}/CHANGELOG.md` );

// Further instructions
console.log( '-------------------------------------------------------' );
console.log( 'Push as `git push --follow-tags origin master`' );
console.log( 'Publish in `./dist/highcharts-angular` as `npm publish`' );

0 comments on commit 8452557

Please sign in to comment.