Skip to content

Commit

Permalink
chore(dimension): delete @scion/dimension module
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The dimension was moved from `@scion/dimension` to `@scion/toolkit` NPM module.

SCION Toolkit is a collection of UI components and utilities. The toolkit is published as single NPM library with a separate entry point per tool, allowing for tree shaking away not used tools.
Refer to https://github.com/SchweizerischeBundesbahnen/scion-toolkit/blob/master/docs/site/tools/dimension.md for more information about dimension directive.
Refer to https://github.com/SchweizerischeBundesbahnen/scion-toolkit/blob/master/docs/site/tools/observable.md for more information about replacement of `DimensionService`.

To migrate:
- Uninstall NPM module `@scion/dimension`
- Install NPM module `@scion/toolkit`
- Replace ES2015 imports `@scion/dimension` with `@scion/toolkit/dimension`
- Replace usage of `DimensionService` with `fromDimension$` Observable for observing the dimension of a DOM element.
  • Loading branch information
danielwiehl authored and Marcarrian committed Nov 16, 2020
1 parent 809b028 commit 7c73203
Show file tree
Hide file tree
Showing 21 changed files with 1 addition and 817 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,17 @@ jobs:
id: workbench-package-json
with:
path: projects/scion/workbench/package.json
- name: 'Reading package.json version of scion/dimension'
uses: SchweizerischeBundesbahnen/scion-toolkit/.github/actions/package-json@master
id: dimension-package-json
with:
path: projects/scion/dimension/package.json
- name: 'Asserting package.json versions to be equal'
uses: SchweizerischeBundesbahnen/scion-toolkit/.github/actions/equality-checker@master
with:
values: |
${{ steps.root-package-json.outputs.version }},
${{ steps.workbench-package-json.outputs.version }},
${{ steps.dimension-package-json.outputs.version }}
${{ steps.workbench-package-json.outputs.version }}
- name: 'Restoring NPM modules from cache'
uses: actions/cache@v2
with:
path: ./node_modules
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: 'Building @scion/dimension'
run: npm run dimension:build
- name: 'Building @scion/workbench'
run: npm run workbench:build
- uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -195,9 +187,3 @@ jobs:
dist-folder: dist/scion/workbench
npm-token: ${{ secrets.NPM_TOKEN }}
dry-run: false
- name: 'Publishing @scion/dimension to NPM'
uses: SchweizerischeBundesbahnen/scion-toolkit/.github/actions/npm-publish@master
with:
dist-folder: dist/scion/dimension
npm-token: ${{ secrets.NPM_TOKEN }}
dry-run: false
3 changes: 0 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ We publish our packages to the [NPM registry](https://www.npmjs.com/). Packages

We have the following workbench related packages:
- https://www.npmjs.com/package/@scion/workbench
- https://www.npmjs.com/package/@scion/dimension

</details>

Expand Down Expand Up @@ -260,7 +259,6 @@ This chapter describes the tasks to publish a new release to NPM.
1. Update the following `package.json` files with the new version:
- `/package.json`
- `/projects/scion/workbench/package.json`
- `/projects/scion/dimension/package.json`
1. Update inter-project dependencies.
1. Run `npm install` to update the version in `package-lock.json`.
1. Run `npm run changelog` to generate the changelog. Then, review the generated changelog carefully and correct typos and formatting errors, if any.
Expand All @@ -269,7 +267,6 @@ This chapter describes the tasks to publish a new release to NPM.
1. When merged into the master branch, the release action in our [GitHub Actions workflow][link-github-actions-workflow] creates a Git release tag, publishes the package to NPM, and deploys related applications.
1. Verify that:
- **@scion/workbench** is published to: https://www.npmjs.com/package/@scion/workbench.
- **@scion/dimension** is published to: https://www.npmjs.com/package/@scion/dimension.

</details>

Expand Down
40 changes: 0 additions & 40 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,46 +71,6 @@
}
}
},
"@scion/dimension": {
"projectType": "library",
"root": "projects/scion/dimension",
"sourceRoot": "projects/scion/dimension/src",
"prefix": "sci",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/scion/dimension/tsconfig.lib.json",
"project": "projects/scion/dimension/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/scion/dimension/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/scion/dimension/src/test.ts",
"tsConfig": "projects/scion/dimension/tsconfig.spec.json",
"karmaConfig": "projects/scion/dimension/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/scion/dimension/tsconfig.lib.json",
"projects/scion/dimension/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"workbench-testing-app": {
"projectType": "application",
"root": "apps/workbench-testing-app",
Expand Down
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
"e2e:workbench:headless": "cross-env HEADLESS=HEADLESS run-s \"workbench:e2e -- {@}\" --",
"postinstall": "ngcc --tsconfig \"tsconfig.base.json\"",

"dimension:lint": "ng lint @scion/dimension",
"dimension:test": "ng test @scion/dimension",
"dimension:build": "ng build --prod @scion/dimension",

"workbench:lint": "ng lint @scion/workbench",
"workbench.e2e:lint": "ng lint @scion/workbench.e2e",
"workbench:test": "ng test @scion/workbench",
Expand Down
8 changes: 0 additions & 8 deletions projects/scion/dimension/README.md

This file was deleted.

45 changes: 0 additions & 45 deletions projects/scion/dimension/karma.conf.js

This file was deleted.

10 changes: 0 additions & 10 deletions projects/scion/dimension/ng-package.json

This file was deleted.

32 changes: 0 additions & 32 deletions projects/scion/dimension/package.json

This file was deleted.

84 changes: 0 additions & 84 deletions projects/scion/dimension/src/lib/dimension.directive.ts

This file was deleted.

40 changes: 0 additions & 40 deletions projects/scion/dimension/src/lib/dimension.module.ts

This file was deleted.

Loading

0 comments on commit 7c73203

Please sign in to comment.