Skip to content

Commit

Permalink
fix(angular): unpack dist into root package
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Dec 18, 2020
1 parent 121f221 commit 6be7076
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 13 deletions.
18 changes: 9 additions & 9 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod"
"build": "ng build --prod",
"prepare": "node scripts/bump-version.js && node scripts/unpack-dist.js"
},
"dependencies": {
"devDependencies": {
"@angular-devkit/build-angular": "~0.1100.4",
"@angular/cli": "~11.0.4",
"@angular/common": "~11.0.4",
"@angular/compiler": "~11.0.4",
"@angular/compiler-cli": "~11.0.4",
"@angular/core": "~11.0.4",
"fs-extra": "^9.0.1",
"ng-packagr": "^11.0.0",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"typescript": "~4.0.2",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1100.4",
"@angular/cli": "~11.0.4",
"@angular/compiler-cli": "~11.0.4",
"ng-packagr": "^11.0.0",
"typescript": "~4.0.2"
}
}
12 changes: 10 additions & 2 deletions packages/angular/projects/vime/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vime/angular",
"version": "4.7.3",
"version": "5.0.0",
"description": "Angular bindings for the Vime media player.",
"license": "MIT",
"contributors": [
Expand All @@ -13,13 +13,21 @@
"bugs": {
"url": "https://github.com/vime-js/vime/issues"
},
"files": [
"bundles",
"components",
"esm2015",
"fesm2015",
"*.d.ts",
"vime-angular.metadata.json"
],
"peerDependencies": {
"@angular/common": "^11.0.4",
"@angular/core": "^11.0.4",
"rxjs": "^6.6.2"
},
"dependencies": {
"@vime/core": "^4.7.3",
"@vime/core": "^5.0.0",
"tslib": "^2.0.0"
},
"devDependencies": {
Expand Down
1 change: 0 additions & 1 deletion packages/angular/scripts/bump-version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// package.json dist/vime/angular
const fs = require('fs');
const path = require('path');

Expand Down
15 changes: 15 additions & 0 deletions packages/angular/scripts/unpack-dist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const fs = require('fs-extra');
const path = require('path');

const rootPkgDir = path.resolve(__dirname, '../');
const distPkgDir = path.resolve(__dirname, '../dist/vime/angular');

async function copyFiles() {
try {
await fs.copy(distPkgDir, rootPkgDir);
} catch (err) {
console.error(err);
}
}

copyFiles();
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5756,7 +5756,7 @@ fs-extra@^8.1.0:
jsonfile "^4.0.0"
universalify "^0.1.0"

fs-extra@^9.0.0:
fs-extra@^9.0.0, fs-extra@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc"
integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==
Expand Down

0 comments on commit 6be7076

Please sign in to comment.