Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit c322276

Browse files
committed
feat(build): fix linking deps
1 parent f4a9a57 commit c322276

File tree

2 files changed

+40
-43
lines changed

2 files changed

+40
-43
lines changed

.bin/link-libs.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,22 @@ const linkLib = (lib) => {
1313
};
1414

1515

16-
const crossLink = (lib) => {
17-
const scopedName = `${scope}/${lib}`;
18-
const depLibs = libs.filter(dep => dep !== lib);
19-
return Promise.all(depLibs.map(dep => {
20-
const libPath = `libs/${dep}`;
21-
return execInProjectPathPromise(`npm link ${scopedName}`, libPath)
16+
const linkLibs = (libs) => {
17+
return Promise.all(libs.map(lib => {
18+
19+
const scopedName = `${scope}/${lib}`
20+
21+
return execInProjectPathPromise(`npm link ${scopedName}`)
2222
.then(() => {
23-
console.log(` [ link ] [${lib}] npm link ${scopedName} in ${libPath}`);
23+
console.log(` [ link ] [${lib}] npm link ${scopedName}`);
2424
return lib;
2525
})
26-
2726
}))
2827

2928
};
3029

3130
return Promise.all(libs.map(linkLib))
32-
.then(items => Promise.all(items.map(crossLink)))
31+
.then(linkLibs)
3332
.catch(err => {
3433
console.log(` [ link ] An error occurred:`, err);
3534
});

package.json

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@tabler/tabler-angular",
2+
"name": "@tabler/angular",
33
"version": "0.0.0",
44
"license": "MIT",
55
"private": true,
@@ -13,8 +13,7 @@
1313
"build:libs": "node .bin/build-libs",
1414
"link:libs": "node .bin/link-libs",
1515
"release": "standard-version --commit-all",
16-
"prepublish": "npm run link:libs && npm run build:libs",
17-
"publish": "node .bin/publish-libs",
16+
"publish": "npm run link:libs && npm run build:libs && node .bin/publish-libs",
1817
"postpublish": "git push --follow-tags origin master",
1918
"publish:docs": "angular-cli-ghpages --dir ./dist/apps/docs",
2019
"test": "ng test",
@@ -38,59 +37,58 @@
3837
}
3938
},
4039
"dependencies": {
41-
"@angular/animations": "^5.2.9",
42-
"@angular/common": "^5.2.9",
43-
"@angular/compiler": "^5.2.9",
44-
"@angular/core": "^5.2.9",
45-
"@angular/forms": "^5.2.9",
46-
"@angular/http": "^5.2.9",
47-
"@angular/platform-browser": "^5.2.9",
48-
"@angular/platform-browser-dynamic": "^5.2.9",
49-
"@angular/router": "^5.2.9",
40+
"@angular/animations": "5.2.7",
41+
"@angular/common": "5.2.7",
42+
"@angular/compiler": "5.2.7",
43+
"@angular/core": "5.2.7",
44+
"@angular/forms": "5.2.7",
45+
"@angular/platform-browser": "5.2.7",
46+
"@angular/platform-browser-dynamic": "5.2.7",
47+
"@angular/router": "5.2.7",
48+
"@compodoc/compodoc": "^1.1.1",
5049
"@ngrx/effects": "5.2.0",
51-
"@ngrx/router-store": "5.2.0",
50+
"@ngrx/router-store": "5.0.1",
5251
"@ngrx/store": "5.2.0",
5352
"@ngrx/store-devtools": "5.2.0",
5453
"@nrwl/nx": "0.11.0",
5554
"@swimlane/ngx-charts": "^7.2.0",
5655
"angular-pipes": "^7.1.0",
5756
"bootstrap": "^4.0.0",
5857
"chart.js": "^2.7.2",
59-
"core-js": "^2.5.4",
58+
"core-js": "^2.4.1",
6059
"font-awesome": "^4.7.0",
6160
"ng2-charts": "^1.6.0",
6261
"ngrx-store-freeze": "^0.2.1",
6362
"ngx-bootstrap": "^2.0.3",
6463
"ngx-highlightjs": "^1.4.1",
65-
"rxjs": "^5.5.8",
64+
"rxjs": "^5.5.6",
6665
"simple-line-icons": "^2.4.1",
67-
"time-ago-pipe": "^1.3.2",
68-
"zone.js": "^0.8.25"
66+
"viz": "^0.0.1",
67+
"zone.js": "^0.8.19"
6968
},
7069
"devDependencies": {
7170
"@angular/cli": "^1.7.4",
72-
"@angular/compiler-cli": "^5.2.9",
73-
"@angular/language-service": "^5.2.9",
74-
"@nrwl/schematics": "^0.11.0",
75-
"@types/jasmine": "~2.8.6",
76-
"@types/jasminewd2": "~2.0.3",
77-
"@types/node": "~9.6.2",
78-
"angular-cli-ghpages": "^0.5.2",
79-
"codelyzer": "^4.2.1",
80-
"concurrently": "^3.5.1",
81-
"jasmine-core": "~3.1.0",
71+
"@angular/compiler-cli": "5.2.7",
72+
"@angular/language-service": "5.2.7",
73+
"@ngrx/schematics": "5.2.0",
74+
"@nrwl/schematics": "0.11.0",
75+
"@types/jasmine": "~2.8.3",
76+
"@types/jasminewd2": "~2.0.2",
77+
"@types/node": "~6.0.60",
78+
"codelyzer": "^4.0.1",
79+
"jasmine-core": "~2.8.0",
8280
"jasmine-spec-reporter": "~4.2.1",
8381
"karma": "~2.0.0",
8482
"karma-chrome-launcher": "~2.2.0",
85-
"karma-coverage-istanbul-reporter": "^1.4.2",
86-
"karma-jasmine": "~1.1.1",
87-
"karma-jasmine-html-reporter": "^1.0.0",
83+
"karma-coverage-istanbul-reporter": "^1.2.1",
84+
"karma-jasmine": "~1.1.0",
85+
"karma-jasmine-html-reporter": "^0.2.2",
8886
"ng-packagr": "^2.4.1",
89-
"prettier": "1.11.1",
90-
"protractor": "~5.3.1",
87+
"prettier": "1.10.2",
88+
"protractor": "~5.1.2",
9189
"standard-version": "^4.3.0",
92-
"ts-node": "~5.0.1",
90+
"ts-node": "~4.1.0",
9391
"tslint": "~5.9.1",
94-
"typescript": "~2.8.1"
92+
"typescript": "2.6.2"
9593
}
9694
}

0 commit comments

Comments
 (0)