Skip to content

Suggestions: package improvements #140

@marcalexiei

Description

@marcalexiei

I would like to propose some improvements for this package:

Use peerDependencies

Add rollup to peerDependencies

Since this is a rollup plugin I think this should be added to peerDependencies.
This will also help to clearly identify which rollup version are supported.

Add sass to peerDependencies

I think that user should install separately his sass implementation instead of having installed because is included already in dependencies.
Also, like with rollup, we can clearly identify which version of sass are supported, if user install it.

Example:

{
  // ...
  "peerDependencies": {
    "sass": "^1.3.0",
  },
  "peerDependenciesMeta": {
    "sass": {
      "optional": true
    },
  },
  // ...
}

A working example is the webpack sass-loader package.json

Add other sass runtime

consider using webpack-loader approach so user can install only one sass runtime (right now sass will be always be installed since it is a dependency)

Code updates

Update source code using async functions and spread operator

I think that code could be updated using async functions in order to reduce callback chain code,
additionally and use modern syntax like spread instead of or Object.assign and Array.prototype.concat.

These features are available for node >= 10

Enable typescript strict mode

Pretty self-explanatory 😅


Note

If you are ok with at least one of the proposed changes I can take care of doing separate PR's for each task
This should ease review process a lot!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions