Skip to content

Commit

Permalink
fix: export assets in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
d3lm committed Dec 9, 2021
1 parent 0f76cbb commit 491351c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,39 +75,30 @@ The first step is to add the CSS and for that you have two options. Either you u

Copy `ngx-drag-to-select.css` to your project and add it as a `style` tag to your `index.html`.

If you are using sass you can import the css as follows:
It's not recommended, and not supported, to load the CSS in your SCSS files. Instead, if you don't need to customize
the styles, and you're using the [Angular CLI](https://github.com/angular/angular-cli) you can add it to your `angular.json`:

```scss
@import '~ngx-drag-to-select/ngx-drag-to-select.css';
```

If you are using the [Angular CLI](https://github.com/angular/angular-cli) you can add it to your `angular.json`:

```json
```diff
"styles": [
{
"input": "src/styles.scss"
},
{
"input": "node_modules/ngx-drag-to-select/ngx-drag-to-select.css"
}
"src/styles.scss",
+ "node_modules/ngx-drag-to-select/ngx-drag-to-select.css"
]
```

**Using the sass package**
**Using Sass**

If you're using sass you can simply import the sass package. This allows you to [override the default variables](#overriding-sass-variables) to customize the library to your needs.
If you're using Sass you can simply import `ngx-drag-to-select` into `src/styles.scss`. This allows you to [override the default variables](#overriding-sass-variables) to customize the library to your needs.

```scss
@import '~ngx-drag-to-select/scss/ngx-drag-to-select';
@import 'ngx-drag-to-select';
```

### Adding the module

In your `AppModule` import `DragToSelectModule` from `ngx-drag-to-select` and add it to the module imports:

```ts
import { DragToSelectModule } from 'ngx-drag-to-select';
import { value DragToSelectModule } from 'ngx-drag-to-select';

@NgModule({
imports: [DragToSelectModule.forRoot()],
Expand Down Expand Up @@ -198,7 +189,7 @@ You can override these options by passing a configuration object to `forRoot()`.
Here's an example:

```ts
import { DragToSelectModule } from 'ngx-drag-to-select';
import { value DragToSelectModule } from 'ngx-drag-to-select';

@NgModule({
imports: [
Expand Down
10 changes: 9 additions & 1 deletion projects/ngx-drag-to-select/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
{
"name": "ngx-drag-to-select",
"version": "5.0.0",
"version": "5.0.1",
"description": "A lightweight, fast, configurable and reactive drag-to-select component for Angular 8 and beyond",
"sideEffects": false,
"peerDependencies": {
"@angular/core": ">=8.0.0",
"@angular/common": ">=8.0.0",
"rxjs": ">=6.4.0"
},
"exports": {
".": {
"sass": "./scss/ngx-drag-to-select.scss"
},
"./ngx-drag-to-select.css": {
"style": "./ngx-drag-to-select.css"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/d3lm/ngx-drag-to-select.git"
Expand Down

0 comments on commit 491351c

Please sign in to comment.