diff --git a/README.md b/README.md index b4f5ef2..c067a14 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ This is a highly experimental snowpack plugin. Has only been tested to work on brand new Angular 11 project generated through `ng new `. Working setup could be seen [here](https://github.com/phantasmalmira/AngularSnowpackDemo). +## Style Preprocessors + +This plugin does not support style preprocessing yet, implementing a working style preprocessing plugin is simple enough, but it would mean that the plugin has to preprocess the styles as well, an ideal solution is to use other snowpack plugins to feed their output into this plugin, which for the time being I haven't found the solution for yet. Please do contribute by opening a pull request if you have an idea. + ## Usage ```bash @@ -12,7 +16,6 @@ npm i --save-dev angular-snowpack-plugin // snowpack.config.js { - "installs": ["@angular/common"], "plugins": [ [ "angular-snowpack-plugin", @@ -26,12 +29,13 @@ npm i --save-dev angular-snowpack-plugin ## Plugin Options -| Name | Type | Description | Default | -| ------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -| `src` | `string` | Relative path to the source directory of your angular project. | `src` | -| `logLevel` | `'normal' \| 'debug'` | Logging verbosity of the plugin. | `normal` | -| `tsConfig` | `string` | Relative path to the build options tsconfig of your Angular project, check in `angular.json`. | `tsconfig.app.json` | -| `ngccTargets` | `string[]` | `ngcc` targets that the plugin will attempt to run `ngcc` with on each startup, values here will be extending the default value. | `['@angular/platform-browser']` | +| Name | Type | Description | Default | +| ---------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `src` | `string` | Relative path to the source directory of your angular project. | `src` | +| `angularJson` | `string` | Relative path to `angular.json` of your Angular project. | `angular.json` | +| `angularProject` | `string` | Target project of the build as according to `angular.json` | default project defined in `angular.json` | +| `ngccTargets` | `string[]` | `ngcc` targets that the plugin will attempt to run `ngcc` with on each startup, values here will be extending the default value. | `['@angular/core', '@angular/common', '@angular/platform-browser-dynamic']` | +| `errorToBrowser` | `boolean` | Determines whether a type-check error will be pushed to the browser as a build error, note that this only applies to dev mode, build and first compilation will push error to browser regardless, `false` will mimic the behavior of `ng serve` | `true` | ## Important Notes diff --git a/package.json b/package.json index 37d0621..e6b7908 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-snowpack-plugin", - "version": "1.0.1", + "version": "2.0.0", "description": "Snowpack Plugin for angular projects", "main": "dist/index.js", "repository": {