@dsivd/prestations-ng 16.0.0-beta11 → 16.0.0-beta12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CONTRIBUTING.md CHANGED
@@ -81,7 +81,7 @@ run `yarn test:schematics` (at root level).
81
81
  - **In project**:
82
82
  - `cd front`
83
83
  - `yarn link @dsivd/prestations-ng`
84
- - `ng g @dsivd/prestations-ng:[YOUR_SCHEMATIC]` (i.e. `ng g @dsivd/prestations-ng:ng-add` or `ng g @dsivd/prestations-ng:update-karma-config`)
84
+ - `ng g @dsivd/prestations-ng:[YOUR_SCHEMATIC]` (i.e. `ng g @dsivd/prestations-ng:ng-add` or `ng g @dsivd/prestations-ng:update-karma-config` or `ng g @dsivd/prestations-ng:replace-browsers-list`)
85
85
 
86
86
  In your project, you can test any schematic added into [collection.json](projects/prestations-ng/schematics/collection.json).
87
87
  If you want to test `ng-update`, you will need to release the library under a beta version and then update your version of prestations-ng.
package/UPGRADING_V16.md CHANGED
@@ -102,6 +102,7 @@ ng update \
102
102
  @types/node@16 \
103
103
  ts-node@10
104
104
  ng update @dsivd/prestations-ng@latest
105
+ ng g @dsivd/prestations-ng:replace-browsers-list
105
106
 
106
107
  yarn remove eslint-plugin-prefer-arrow
107
108
  yarn add eslint-plugin-simple-import-sort --dev
package/package.json CHANGED
@@ -40,7 +40,7 @@
40
40
  "ng-update": {
41
41
  "migrations": "./schematics/migration-collection.json"
42
42
  },
43
- "version": "16.0.0-beta11",
43
+ "version": "16.0.0-beta12",
44
44
  "module": "fesm2015/dsivd-prestations-ng.mjs",
45
45
  "es2020": "fesm2020/dsivd-prestations-ng.mjs",
46
46
  "esm2020": "esm2020/dsivd-prestations-ng.mjs",
@@ -8,6 +8,10 @@
8
8
  "update-karma-config": {
9
9
  "description": "Updates from karma-coverage-istanbul-reporter to karma-coverage.",
10
10
  "factory": "./update-karma-config"
11
+ },
12
+ "replace-browsers-list": {
13
+ "description": "Replaces .browserslistrc file with the one from prestations-ng library.",
14
+ "factory": "./replace-browsers-list"
11
15
  }
12
16
  }
13
17
  }
@@ -0,0 +1,3 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ declare const _default: () => Rule;
3
+ export default _default;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const schematics_1 = require("@angular-devkit/schematics");
4
+ const replace_browserslistrc_1 = require("../utility/replace-browserslistrc");
5
+ exports.default = () => (tree, context) => {
6
+ const angularConfig = 'angular.json';
7
+ // Let's make sure we're in an angular workspace
8
+ if (!tree.exists(angularConfig)) {
9
+ throw new schematics_1.SchematicsException('This is not an Angular workspace. Try again in an Angular project.');
10
+ }
11
+ context.logger.info('Replacing your .browserslistrc file with the one from prestations-ng library');
12
+ (0, replace_browserslistrc_1.replaceBrowsersList)(tree);
13
+ return tree;
14
+ };
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9wcmVzdGF0aW9ucy1uZy9zY2hlbWF0aWNzL3JlcGxhY2UtYnJvd3NlcnMtbGlzdC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDJEQUtvQztBQUVwQyw4RUFBd0U7QUFFeEUsa0JBQWUsR0FBUyxFQUFFLENBQUMsQ0FBQyxJQUFVLEVBQUUsT0FBeUIsRUFBRSxFQUFFO0lBQ2pFLE1BQU0sYUFBYSxHQUFHLGNBQWMsQ0FBQztJQUNyQyxnREFBZ0Q7SUFDaEQsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsYUFBYSxDQUFDLEVBQUU7UUFDN0IsTUFBTSxJQUFJLGdDQUFtQixDQUN6QixvRUFBb0UsQ0FDdkUsQ0FBQztLQUNMO0lBQ0QsT0FBTyxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQ2YsOEVBQThFLENBQ2pGLENBQUM7SUFDRixJQUFBLDRDQUFtQixFQUFDLElBQUksQ0FBQyxDQUFDO0lBQzFCLE9BQU8sSUFBSSxDQUFDO0FBQ2hCLENBQUMsQ0FBQyJ9