Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ testem.log
# System Files
.DS_Store
Thumbs.db

.angular/cache
36 changes: 29 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,40 @@ npm install --save cdk-drag-scroll
Then use it in your app like so:

```html

<div
*ngFor="let item of items"
cdkDrag
vsDragScroll
[vsDragScrollContainer]="scrollContainer"
[cdkDragData]="item">
...
cdkDrag
vsDragScroll
[vsDragScrollContainer]="scrollContainer"
[cdkDragData]="item"
>
...
</div>

```

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## To publish npm package

- The version in the package.json in the project folder must be incremented
- On github, in Settings -> Developer settings -> Personal Access Tokens. Generate a new token with the privileges to write:packages.

- Run command with your username, token and email.

```
npm login --scope=@cactusoft-ca --registry=https://npm.pkg.github.com
```

In the _./projects/cdk-drag-scroll_ folder, run

```
ng build cdk-drag-scroll --configuration production
```

Finally, run from the _dist/cdk-drag-scroll_ folder

```
npm publish
```
20 changes: 16 additions & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/cdk-drag-scroll-app",
"index": "src/index.html",
"main": "src/main.ts",
Expand All @@ -42,7 +43,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
Expand All @@ -53,6 +53,10 @@
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
Expand Down Expand Up @@ -141,12 +145,17 @@
"prefix": "vs",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/cdk-drag-scroll/tsconfig.lib.json",
"project": "projects/cdk-drag-scroll/ng-package.json"
}
},
, "configurations": {
"production": {
"tsConfig": "projects/cdk-drag-scroll/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
Expand All @@ -170,5 +179,8 @@
}
}
},
"defaultProject": "cdk-drag-scroll-app"
"defaultProject": "cdk-drag-scroll-app",
"cli": {
"analytics": "3acb13a0-8c39-42a1-8f67-4a63c4646271"
}
}
Loading