Skip to content

Commit

Permalink
docs(): minor updates to charts and echarts added as peerDependency (T…
Browse files Browse the repository at this point in the history
…eradata#29)

* fixed typos

* added echarts to peerDependencies

* added echarts peerDependencies

* docs(): tweak
  • Loading branch information
JoshSchoen authored and emoralesb05 committed Nov 15, 2018
1 parent 2f2d928 commit c9305e5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions build.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module.exports = {
deployed: 'deploy/platform/',
echartsVersion: '4.1.0',
angularVersion: '7.0.0',
materialVersion: '7.0.0'
};
7 changes: 5 additions & 2 deletions scripts/version-placeholders.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ gulp.task('version-placeholder', function(){
const versionPlaceholderText = '0.0.0-COVALENT';
const ngVersionPlaceholderText = '0.0.0-NG';
const materialVersionPlaceholderText = '0.0.0-MATERIAL';
const echartsVersionPlaceholderText = '0.0.0-ECHARTS';

/** RegExp that matches version placeholders inside of a file. */
const versionPlaceholderRegex = new RegExp(versionPlaceholderText, 'g');
const ngVersionPlaceholderRegex = new RegExp(ngVersionPlaceholderText, 'g');
const materialVersionPlaceholderRegex = new RegExp(materialVersionPlaceholderText, 'g');
const echartsVersionPlaceholderRegex = new RegExp(echartsVersionPlaceholderText, 'g');

/**
* Walks through every file in a directory and replaces the version placeholders
Expand All @@ -36,6 +38,7 @@ function replaceVersionPlaceholders(packageDir, projectVersion) {
const fileContent = readFileSync(filePath, 'utf-8')
.replace(ngVersionPlaceholderRegex, buildConfig.angularVersion)
.replace(materialVersionPlaceholderRegex, buildConfig.materialVersion)
.replace(echartsVersionPlaceholderRegex, buildConfig.echartsVersion)
.replace(versionPlaceholderRegex, projectVersion);

writeFileSync(filePath, fileContent);
Expand All @@ -56,12 +59,12 @@ function buildPlaceholderFindCommand(packageDir) {
if (platform() === 'win32') {
return {
binary: 'findstr',
args: ['/msi', `${materialVersionPlaceholderText} ${ngVersionPlaceholderText} ${versionPlaceholderText}`, `${packageDir}\\*`]
args: ['/msi', `${materialVersionPlaceholderText} ${ngVersionPlaceholderText} ${echartsVersionPlaceholderText} ${versionPlaceholderText}`, `${packageDir}\\*`]
};
} else {
return {
binary: 'grep',
args: ['-ril', `${materialVersionPlaceholderText}\\|${ngVersionPlaceholderText}\\|${versionPlaceholderText}`, packageDir]
args: ['-ril', `${materialVersionPlaceholderText}\\|${echartsVersionPlaceholderText}\\|${ngVersionPlaceholderText}\\|${versionPlaceholderText}`, packageDir]
};
}
}
2 changes: 1 addition & 1 deletion src/app/components/types/line/line.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,4 @@
</mat-card-content>
</mat-card>

<td-readme-loader resourceUrl="platform/echarts/bar/README.md"></td-readme-loader>
<td-readme-loader resourceUrl="platform/echarts/line/README.md"></td-readme-loader>
4 changes: 4 additions & 0 deletions src/platform/echarts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Teradata customers work in massive datasets, the largest on the planet. SVG char

## Installing Covalent Echarts

```bash
npm install --save echarts
```

```bash
npm install --save @covalent/echarts
```
Expand Down
1 change: 1 addition & 0 deletions src/platform/echarts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"Steven Ov <[email protected]>"
],
"peerDependencies": {
"echarts": "^0.0.0-ECHARTS",
"@angular/common": "^0.0.0-NG",
"@angular/core": "^0.0.0-NG"
}
Expand Down

0 comments on commit c9305e5

Please sign in to comment.