@nx/rollup 16.0.0-beta.1

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +22 -0
  3. package/README.md +63 -0
  4. package/executors.json +16 -0
  5. package/generators.json +33 -0
  6. package/index.d.ts +4 -0
  7. package/index.js +8 -0
  8. package/index.js.map +1 -0
  9. package/migrations.json +17 -0
  10. package/package.json +58 -0
  11. package/src/executors/rollup/compat.d.ts +2 -0
  12. package/src/executors/rollup/compat.js +6 -0
  13. package/src/executors/rollup/compat.js.map +1 -0
  14. package/src/executors/rollup/lib/analyze-plugin.d.ts +4 -0
  15. package/src/executors/rollup/lib/analyze-plugin.js +26 -0
  16. package/src/executors/rollup/lib/analyze-plugin.js.map +1 -0
  17. package/src/executors/rollup/lib/normalize.d.ts +10 -0
  18. package/src/executors/rollup/lib/normalize.js +78 -0
  19. package/src/executors/rollup/lib/normalize.js.map +1 -0
  20. package/src/executors/rollup/lib/run-rollup.d.ts +4 -0
  21. package/src/executors/rollup/lib/run-rollup.js +16 -0
  22. package/src/executors/rollup/lib/run-rollup.js.map +1 -0
  23. package/src/executors/rollup/lib/swc-plugin.d.ts +2 -0
  24. package/src/executors/rollup/lib/swc-plugin.js +21 -0
  25. package/src/executors/rollup/lib/swc-plugin.js.map +1 -0
  26. package/src/executors/rollup/lib/update-package-json.d.ts +6 -0
  27. package/src/executors/rollup/lib/update-package-json.js +46 -0
  28. package/src/executors/rollup/lib/update-package-json.js.map +1 -0
  29. package/src/executors/rollup/lib/validate-types.d.ts +5 -0
  30. package/src/executors/rollup/lib/validate-types.js +21 -0
  31. package/src/executors/rollup/lib/validate-types.js.map +1 -0
  32. package/src/executors/rollup/rollup.impl.d.ts +13 -0
  33. package/src/executors/rollup/rollup.impl.js +250 -0
  34. package/src/executors/rollup/rollup.impl.js.map +1 -0
  35. package/src/executors/rollup/schema.d.ts +35 -0
  36. package/src/executors/rollup/schema.json +172 -0
  37. package/src/generators/init/init.d.ts +5 -0
  38. package/src/generators/init/init.js +35 -0
  39. package/src/generators/init/init.js.map +1 -0
  40. package/src/generators/init/schema.d.ts +4 -0
  41. package/src/generators/init/schema.json +22 -0
  42. package/src/generators/rollup-project/rollup-project.d.ts +5 -0
  43. package/src/generators/rollup-project/rollup-project.js +77 -0
  44. package/src/generators/rollup-project/rollup-project.js.map +1 -0
  45. package/src/generators/rollup-project/schema.d.ts +12 -0
  46. package/src/generators/rollup-project/schema.json +72 -0
  47. package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +2 -0
  48. package/src/migrations/update-15-0-0/add-babel-inputs.js +13 -0
  49. package/src/migrations/update-15-0-0/add-babel-inputs.js.map +1 -0
  50. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
  51. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
  52. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
  53. package/src/utils/fs.d.ts +4 -0
  54. package/src/utils/fs.js +17 -0
  55. package/src/utils/fs.js.map +1 -0
  56. package/src/utils/versions.d.ts +3 -0
  57. package/src/utils/versions.js +7 -0
  58. package/src/utils/versions.js.map +1 -0
@@ -0,0 +1,72 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "NxRollupProject",
4
+ "cli": "nx",
5
+ "title": "Add Rollup Configuration to a project",
6
+ "description": "Add Rollup Configuration to a project.",
7
+ "type": "object",
8
+ "properties": {
9
+ "project": {
10
+ "type": "string",
11
+ "description": "The name of the project.",
12
+ "$default": {
13
+ "$source": "argv",
14
+ "index": 0
15
+ },
16
+ "x-dropdown": "project",
17
+ "x-prompt": "What is the name of the project to set up a rollup for?",
18
+ "x-priority": "important"
19
+ },
20
+ "compiler": {
21
+ "type": "string",
22
+ "enum": ["babel", "swc", "tsc"],
23
+ "description": "The compiler to use to build source.",
24
+ "default": "babel"
25
+ },
26
+ "main": {
27
+ "type": "string",
28
+ "description": "Path relative to the workspace root for the main entry file. Defaults to '<projectRoot>/src/main.ts'.",
29
+ "alias": "entryFile",
30
+ "x-priority": "important"
31
+ },
32
+ "tsConfig": {
33
+ "type": "string",
34
+ "description": "Path relative to the workspace root for the tsconfig file to build with. Defaults to '<projectRoot>/tsconfig.app.json'.",
35
+ "x-priority": "important"
36
+ },
37
+ "skipFormat": {
38
+ "description": "Skip formatting files.",
39
+ "type": "boolean",
40
+ "default": false,
41
+ "x-priority": "internal"
42
+ },
43
+ "skipPackageJson": {
44
+ "type": "boolean",
45
+ "default": false,
46
+ "description": "Do not add dependencies to `package.json`.",
47
+ "x-priority": "internal"
48
+ },
49
+ "skipValidation": {
50
+ "type": "boolean",
51
+ "default": false,
52
+ "description": "Do not perform any validation on existing project.",
53
+ "x-priority": "internal"
54
+ },
55
+ "importPath": {
56
+ "type": "string",
57
+ "description": "The library name used to import it, like `@myorg/my-awesome-lib`."
58
+ },
59
+ "external": {
60
+ "type": "array",
61
+ "description": "A list of external modules that will not be bundled (`react`, `react-dom`, etc.).",
62
+ "items": {
63
+ "type": "string"
64
+ }
65
+ },
66
+ "rollupConfig": {
67
+ "type": "string",
68
+ "description": "Path relative to workspace root to a custom rollup file that takes a config object and returns an updated config."
69
+ }
70
+ },
71
+ "required": []
72
+ }
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function (tree: Tree): Promise<void>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nx/devkit");
5
+ const add_babel_inputs_1 = require("@nx/js/src/utils/add-babel-inputs");
6
+ function default_1(tree) {
7
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
+ (0, add_babel_inputs_1.addBabelInputs)(tree);
9
+ yield (0, devkit_1.formatFiles)(tree);
10
+ });
11
+ }
12
+ exports.default = default_1;
13
+ //# sourceMappingURL=add-babel-inputs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-babel-inputs.js","sourceRoot":"","sources":["../../../../../../packages/rollup/src/migrations/update-15-0-0/add-babel-inputs.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAC/C,wEAAmE;AAEnE,mBAA+B,IAAU;;QACvC,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;QACrB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAHD,4BAGC"}
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function replacePackage(tree: Tree): Promise<void>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nx/devkit");
5
+ const replace_package_1 = require("@nx/devkit/src/utils/replace-package");
6
+ function replacePackage(tree) {
7
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
+ yield (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/rollup', '@nx/rollup');
9
+ yield (0, devkit_1.formatFiles)(tree);
10
+ });
11
+ }
12
+ exports.default = replacePackage;
13
+ //# sourceMappingURL=update-16-0-0-add-nx-packages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-16-0-0-add-nx-packages.js","sourceRoot":"","sources":["../../../../../../packages/rollup/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAC/C,0EAAuF;AAEvF,SAA8B,cAAc,CAAC,IAAU;;QACrD,MAAM,IAAA,iDAA+B,EAAC,IAAI,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;QAE1E,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAJD,iCAIC"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Delete an output directory, but error out if it's the root of the project.
3
+ */
4
+ export declare function deleteOutputDir(root: string, outputPath: string): void;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteOutputDir = void 0;
4
+ const path = require("path");
5
+ const fs_1 = require("fs");
6
+ /**
7
+ * Delete an output directory, but error out if it's the root of the project.
8
+ */
9
+ function deleteOutputDir(root, outputPath) {
10
+ const resolvedOutputPath = path.resolve(root, outputPath);
11
+ if (resolvedOutputPath === root) {
12
+ throw new Error('Output path MUST not be project root directory!');
13
+ }
14
+ (0, fs_1.rmSync)(resolvedOutputPath, { recursive: true, force: true });
15
+ }
16
+ exports.deleteOutputDir = deleteOutputDir;
17
+ //# sourceMappingURL=fs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.js","sourceRoot":"","sources":["../../../../../packages/rollup/src/utils/fs.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,2BAA4B;AAE5B;;GAEG;AACH,SAAgB,eAAe,CAAC,IAAY,EAAE,UAAkB;IAC9D,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAC1D,IAAI,kBAAkB,KAAK,IAAI,EAAE;QAC/B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;KACpE;IAED,IAAA,WAAM,EAAC,kBAAkB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/D,CAAC;AAPD,0CAOC"}
@@ -0,0 +1,3 @@
1
+ export declare const nxVersion: any;
2
+ export declare const swcLoaderVersion = "0.1.15";
3
+ export declare const tsLibVersion = "^2.3.0";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tsLibVersion = exports.swcLoaderVersion = exports.nxVersion = void 0;
4
+ exports.nxVersion = require('../../package.json').version;
5
+ exports.swcLoaderVersion = '0.1.15';
6
+ exports.tsLibVersion = '^2.3.0';
7
+ //# sourceMappingURL=versions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/rollup/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAClD,QAAA,gBAAgB,GAAG,QAAQ,CAAC;AAC5B,QAAA,YAAY,GAAG,QAAQ,CAAC"}