@donmahallem/rollup-config 0.8.2 → 1.0.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.
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
- <!-- ⚠️ This README has been generated from the file(s) "../package_readme_blueprint.md" ⚠️-->
1
+ <!-- ⚠️ This README has been generated from the file(s) "./package_readme_blueprint.md" ⚠️-->
2
2
  [![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/water.png)](#h1-aligncenterdonmahallemrollup-configh1)
3
3
 
4
4
  # ➤ <h1 align="center">@donmahallem/rollup-config</h1>
5
5
  <p align="center">
6
- <a href="https://github.com/donmahallem/js-libs/actions?query=workflow%3ATest+branch%3Amaster"><img alt="Test" src="https://github.com/donmahallem/js-libs/workflows/Test/badge.svg?branch=master&event=push" height="20"/></a>
7
- <a href="https://codecov.io/gh/donmahallem/js-libs/donmahallem/master/packages/js-libs"><img alt="codecov" src="https://codecov.io/gh/donmahallem/js-libs/branch/master/graph/badge.svg?flag=RollupConfig" height="20"/></a>
6
+ <a href="https://github.com/donmahallem/rollup-config/actions?query=workflow%3ATest+branch%3Amaster"><img alt="Test" src="https://github.com/donmahallem/rollup-config/workflows/Test/badge.svg?branch=master&event=push" height="20"/></a>
7
+ <a href="https://codecov.io/gh/donmahallem/rollup-config"><img alt="codecov" src="https://codecov.io/gh/donmahallem/rollup-config/branch/master/graph/badge.svg" height="20"/></a>
8
8
  <a href="https://badge.fury.io/js/%40donmahallem%2Frollup-config"><img alt="npm version" src="https://badge.fury.io/js/%40donmahallem%2Frollup-config.svg" height="20"/></a>
9
- <a href="https://github.com/donmahallem/js-libs/blob/master/LICENSE"><img alt="GitHub license" src="https://img.shields.io/github/license/donmahallem/js-libs" height="20"/></a>
10
- <a href="https://david-dm.org/donmahallem/js-libs?path=packages/rollup-config"><img alt="dependencies Status" src="https://david-dm.org/donmahallem/js-libs/status.svg?path=packages/rollup-config" height="20"/></a>
11
- <a href="https://david-dm.org/donmahallem/js-libs?path=packages/rollup-config&type=dev"><img alt="devDependencies Status" src="https://david-dm.org/donmahallem/js-libs/dev-status.svg?path=packages/rollup-config" height="20"/></a>
12
- <a href="https://github.com/donmahallem/js-libs/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors-anon/donmahallem/js-libs" height="20"/></a>
9
+ <a href="https://github.com/donmahallem/rollup-config/blob/master/LICENSE"><img alt="GitHub license" src="https://img.shields.io/github/license/donmahallem/rollup-config" height="20"/></a>
10
+ <a href="https://david-dm.org/donmahallem/rollup-config"><img alt="dependencies Status" src="https://david-dm.org/donmahallem/rollup-config/status.svg" height="20"/></a>
11
+ <a href="https://david-dm.org/donmahallem/rollup-config?type=dev"><img alt="devDependencies Status" src="https://david-dm.org/donmahallem/rollup-config/dev-status.svg?" height="20"/></a>
12
+ <a href="https://github.com/donmahallem/rollup-config/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors-anon/donmahallem/rollup-config" height="20"/></a>
13
13
  </p>
14
14
 
15
15
 
@@ -31,3 +31,11 @@ Run the following command to install the package:
31
31
  ```
32
32
  npm install @donmahallem/rollup-config
33
33
  ```
34
+
35
+
36
+
37
+ [![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/water.png)](#usage)
38
+
39
+ ## ➤ Usage
40
+
41
+ This is a helper package used by me to build packages with rollup. Use at your own risk!
@@ -1,68 +1,67 @@
1
- "use strict";
2
- /*
3
- * Package @donmahallem/rollup-config
4
- * Source https://donmahallem.github.io/js-libs/
5
- */
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.baseConfig = void 0;
11
- const plugin_commonjs_1 = __importDefault(require("@rollup/plugin-commonjs"));
12
- const plugin_json_1 = __importDefault(require("@rollup/plugin-json"));
13
- const plugin_node_resolve_1 = __importDefault(require("@rollup/plugin-node-resolve"));
14
- const plugin_typescript_1 = __importDefault(require("@rollup/plugin-typescript"));
15
- const replace_config_1 = require("./replace-config");
16
- const baseConfig = (pkg, cfg = {}) => {
17
- var _a, _b, _c, _d, _e, _f, _g;
18
- const output = [];
19
- if (pkg.main && ((_a = cfg === null || cfg === void 0 ? void 0 : cfg.output) === null || _a === void 0 ? void 0 : _a.cjs) !== false) {
20
- output.push({
21
- file: pkg.main,
22
- footer: '// BUILD: __BUILD_DATE__\n\n',
23
- format: 'cjs',
24
- preferConst: true,
25
- sourcemap: true,
26
- });
27
- }
28
- if (pkg.module && ((_b = cfg === null || cfg === void 0 ? void 0 : cfg.output) === null || _b === void 0 ? void 0 : _b.esm) !== false) {
29
- output.push({
30
- file: pkg.module,
31
- footer: '// BUILD: __BUILD_DATE__\n\n',
32
- format: 'esm',
33
- preferConst: true,
34
- sourcemap: true,
35
- });
36
- }
37
- const plugins = [
38
- (0, plugin_node_resolve_1.default)(((_c = cfg.plugins) === null || _c === void 0 ? void 0 : _c.nodeResolve) || {
39
- preferBuiltins: true,
40
- }),
41
- (0, plugin_typescript_1.default)({
42
- tsconfig: cfg.tsconfig || './tsconfig.json',
43
- }),
44
- ];
45
- if (((_d = cfg.plugins) === null || _d === void 0 ? void 0 : _d.commonjs) !== false) {
46
- plugins.push((0, plugin_commonjs_1.default)((_e = cfg.plugins) === null || _e === void 0 ? void 0 : _e.commonjs));
47
- }
48
- if (((_f = cfg.plugins) === null || _f === void 0 ? void 0 : _f.json) !== false) {
49
- plugins.push((0, plugin_json_1.default)(((_g = cfg.plugins) === null || _g === void 0 ? void 0 : _g.json) || {
50
- compact: true,
51
- }));
52
- }
53
- plugins.push((0, replace_config_1.setupReplacePlugin)(pkg));
54
- return {
55
- external: [
56
- ...Object.keys(pkg.dependencies || {}),
57
- ...Object.keys(pkg.devDependencies || {}),
58
- ...Object.keys(pkg.peerDependencies || {}),
59
- ...Object.keys(pkg.optionalDependencies || {}),
60
- ],
61
- input: 'src/index.ts',
62
- output,
63
- plugins,
64
- preserveSymlinks: true,
65
- };
66
- };
67
- exports.baseConfig = baseConfig;
1
+ "use strict";
2
+ /*
3
+ * Package @donmahallem/rollup-config
4
+ * Source https://github.com/donmahallem/rollup-config/
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.baseConfig = void 0;
11
+ const plugin_commonjs_1 = __importDefault(require("@rollup/plugin-commonjs"));
12
+ const plugin_json_1 = __importDefault(require("@rollup/plugin-json"));
13
+ const plugin_node_resolve_1 = __importDefault(require("@rollup/plugin-node-resolve"));
14
+ const plugin_typescript_1 = __importDefault(require("@rollup/plugin-typescript"));
15
+ const replace_config_1 = require("./replace-config");
16
+ const baseConfig = (pkg, cfg = {}) => {
17
+ const output = [];
18
+ if (pkg.main && cfg?.output?.cjs !== false) {
19
+ output.push({
20
+ file: pkg.main,
21
+ footer: '// BUILD: __BUILD_DATE__\n\n',
22
+ format: 'cjs',
23
+ preferConst: true,
24
+ sourcemap: true,
25
+ });
26
+ }
27
+ if (pkg.module && cfg?.output?.esm !== false) {
28
+ output.push({
29
+ file: pkg.module,
30
+ footer: '// BUILD: __BUILD_DATE__\n\n',
31
+ format: 'esm',
32
+ preferConst: true,
33
+ sourcemap: true,
34
+ });
35
+ }
36
+ const plugins = [
37
+ (0, plugin_node_resolve_1.default)(cfg.plugins?.nodeResolve || {
38
+ preferBuiltins: true,
39
+ }),
40
+ (0, plugin_typescript_1.default)({
41
+ tsconfig: cfg.tsconfig || './tsconfig.json',
42
+ }),
43
+ ];
44
+ if (cfg.plugins?.commonjs !== false) {
45
+ plugins.push((0, plugin_commonjs_1.default)(cfg.plugins?.commonjs));
46
+ }
47
+ if (cfg.plugins?.json !== false) {
48
+ plugins.push((0, plugin_json_1.default)(cfg.plugins?.json || {
49
+ compact: true,
50
+ }));
51
+ }
52
+ plugins.push((0, replace_config_1.setupReplacePlugin)(pkg));
53
+ return {
54
+ external: [
55
+ ...Object.keys(pkg.dependencies || {}),
56
+ ...Object.keys(pkg.devDependencies || {}),
57
+ ...Object.keys(pkg.peerDependencies || {}),
58
+ ...Object.keys(pkg.optionalDependencies || {}),
59
+ ],
60
+ input: 'src/index.ts',
61
+ output,
62
+ plugins,
63
+ preserveSymlinks: true,
64
+ };
65
+ };
66
+ exports.baseConfig = baseConfig;
68
67
  //# sourceMappingURL=base-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-config.js","sourceRoot":"","sources":["../../src/base-config.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,8EAA0E;AAC1E,sEAA8D;AAC9D,sFAAoF;AACpF,kFAAmD;AAGnD,qDAAsD;AAmB/C,MAAM,UAAU,GAAG,CAAC,GAAoB,EAAE,MAAe,EAAE,EAAiB,EAAE;;IACjF,MAAM,MAAM,GAAoB,EAAE,CAAC;IACnC,IAAI,GAAG,CAAC,IAAI,IAAI,CAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,0CAAE,GAAG,MAAK,KAAK,EAAE;QACxC,MAAM,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,MAAM,EAAE,8BAA8B;YACtC,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;SAClB,CAAC,CAAC;KACN;IACD,IAAI,GAAG,CAAC,MAAM,IAAI,CAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,0CAAE,GAAG,MAAK,KAAK,EAAE;QAC1C,MAAM,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,GAAG,CAAC,MAAM;YAChB,MAAM,EAAE,8BAA8B;YACtC,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;SAClB,CAAC,CAAC;KACN;IACD,MAAM,OAAO,GAAm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,CAAC,OAAO,EAAE,IAAI,IAAI;YACjB,OAAO,EAAE,IAAI;SAChB,CACJ,CACJ,CAAC;KACL;IACD,OAAO,CAAC,IAAI,CAAC,IAAA,mCAAkB,EAAC,GAAG,CAAC,CAAC,CAAC;IACtC,OAAO;QACH,QAAQ,EAAE;YACN,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC;YACtC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;YACzC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC;YAC1C,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC;SACjD;QACD,KAAK,EAAE,cAAc;QACrB,MAAM;QACN,OAAO;QACP,gBAAgB,EAAE,IAAI;KACzB,CAAC;AACN,CAAC,CAAC;AAvDW,QAAA,UAAU,cAuDrB"}
@@ -1,22 +1,22 @@
1
- "use strict";
2
- /*
3
- * Package @donmahallem/rollup-config
4
- * Source https://donmahallem.github.io/js-libs/
5
- */
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.baseDtsConfig = void 0;
11
- const rollup_plugin_dts_1 = __importDefault(require("rollup-plugin-dts"));
12
- const replace_config_1 = require("./replace-config");
13
- const baseDtsConfig = (pkg, cfg) => {
14
- const outputOpts = {
15
- input: cfg.sourceTypings,
16
- output: [{ file: cfg.typingsOutputPath || pkg.types, format: 'es' }],
17
- plugins: [(0, replace_config_1.setupReplacePlugin)(pkg), (0, rollup_plugin_dts_1.default)(cfg)],
18
- };
19
- return outputOpts;
20
- };
21
- exports.baseDtsConfig = baseDtsConfig;
1
+ "use strict";
2
+ /*
3
+ * Package @donmahallem/rollup-config
4
+ * Source https://github.com/donmahallem/rollup-config/
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.baseDtsConfig = void 0;
11
+ const rollup_plugin_dts_1 = __importDefault(require("rollup-plugin-dts"));
12
+ const replace_config_1 = require("./replace-config");
13
+ const baseDtsConfig = (pkg, cfg) => {
14
+ const outputOpts = {
15
+ input: cfg.sourceTypings,
16
+ output: [{ file: cfg.typingsOutputPath || pkg.types, format: 'es' }],
17
+ plugins: [(0, replace_config_1.setupReplacePlugin)(pkg), (0, rollup_plugin_dts_1.default)(cfg)],
18
+ };
19
+ return outputOpts;
20
+ };
21
+ exports.baseDtsConfig = baseDtsConfig;
22
22
  //# sourceMappingURL=dts-config.js.map
package/dist/cjs/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";
2
- /*
3
- * Package @donmahallem/rollup-config
4
- * Source https://donmahallem.github.io/js-libs/
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.baseDtsConfig = exports.default = exports.baseConfig = void 0;
8
- var base_config_1 = require("./base-config");
9
- Object.defineProperty(exports, "baseConfig", { enumerable: true, get: function () { return base_config_1.baseConfig; } });
10
- var base_config_2 = require("./base-config");
11
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return base_config_2.baseConfig; } });
12
- var dts_config_1 = require("./dts-config");
13
- Object.defineProperty(exports, "baseDtsConfig", { enumerable: true, get: function () { return dts_config_1.baseDtsConfig; } });
1
+ "use strict";
2
+ /*
3
+ * Package @donmahallem/rollup-config
4
+ * Source https://github.com/donmahallem/rollup-config/
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.baseDtsConfig = exports.default = exports.baseConfig = void 0;
8
+ var base_config_1 = require("./base-config");
9
+ Object.defineProperty(exports, "baseConfig", { enumerable: true, get: function () { return base_config_1.baseConfig; } });
10
+ var base_config_2 = require("./base-config");
11
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return base_config_2.baseConfig; } });
12
+ var dts_config_1 = require("./dts-config");
13
+ Object.defineProperty(exports, "baseDtsConfig", { enumerable: true, get: function () { return dts_config_1.baseDtsConfig; } });
14
14
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
- "use strict";
2
- /*
3
- * Package @donmahallem/rollup-config
4
- * Source https://donmahallem.github.io/js-libs/
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ /*
3
+ * Package @donmahallem/rollup-config
4
+ * Source https://github.com/donmahallem/rollup-config/
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  //# sourceMappingURL=partial-pkg.js.map
@@ -1,24 +1,24 @@
1
- "use strict";
2
- /*
3
- * Package @donmahallem/rollup-config
4
- * Source https://donmahallem.github.io/js-libs/
5
- */
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.setupReplacePlugin = void 0;
11
- const plugin_replace_1 = __importDefault(require("@rollup/plugin-replace"));
12
- /**
13
- * @param {IPartialConfig} pkg package.json to use
14
- */
15
- function setupReplacePlugin(pkg) {
16
- return (0, plugin_replace_1.default)({
17
- __BUILD_DATE__: () => new Date().toString(),
18
- __BUILD_PACKAGE_NAME__: pkg.name,
19
- __BUILD_VERSION__: pkg.version,
20
- preventAssignment: true,
21
- });
22
- }
23
- exports.setupReplacePlugin = setupReplacePlugin;
1
+ "use strict";
2
+ /*
3
+ * Package @donmahallem/rollup-config
4
+ * Source https://github.com/donmahallem/rollup-config/
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.setupReplacePlugin = void 0;
11
+ const plugin_replace_1 = __importDefault(require("@rollup/plugin-replace"));
12
+ /**
13
+ * @param {IPartialConfig} pkg package.json to use
14
+ */
15
+ function setupReplacePlugin(pkg) {
16
+ return (0, plugin_replace_1.default)({
17
+ __BUILD_DATE__: () => new Date().toString(),
18
+ __BUILD_PACKAGE_NAME__: pkg.name,
19
+ __BUILD_VERSION__: pkg.version,
20
+ preventAssignment: true,
21
+ });
22
+ }
23
+ exports.setupReplacePlugin = setupReplacePlugin;
24
24
  //# sourceMappingURL=replace-config.js.map
@@ -1,61 +1,60 @@
1
- /*
2
- * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
4
- */
5
- import commonjs from '@rollup/plugin-commonjs';
6
- import json from '@rollup/plugin-json';
7
- import nodeResolve from '@rollup/plugin-node-resolve';
8
- import typescript from '@rollup/plugin-typescript';
9
- import { setupReplacePlugin } from './replace-config';
10
- export const baseConfig = (pkg, cfg = {}) => {
11
- var _a, _b, _c, _d, _e, _f, _g;
12
- const output = [];
13
- if (pkg.main && ((_a = cfg === null || cfg === void 0 ? void 0 : cfg.output) === null || _a === void 0 ? void 0 : _a.cjs) !== false) {
14
- output.push({
15
- file: pkg.main,
16
- footer: '// BUILD: __BUILD_DATE__\n\n',
17
- format: 'cjs',
18
- preferConst: true,
19
- sourcemap: true,
20
- });
21
- }
22
- if (pkg.module && ((_b = cfg === null || cfg === void 0 ? void 0 : cfg.output) === null || _b === void 0 ? void 0 : _b.esm) !== false) {
23
- output.push({
24
- file: pkg.module,
25
- footer: '// BUILD: __BUILD_DATE__\n\n',
26
- format: 'esm',
27
- preferConst: true,
28
- sourcemap: true,
29
- });
30
- }
31
- const plugins = [
32
- nodeResolve(((_c = cfg.plugins) === null || _c === void 0 ? void 0 : _c.nodeResolve) || {
33
- preferBuiltins: true,
34
- }),
35
- typescript({
36
- tsconfig: cfg.tsconfig || './tsconfig.json',
37
- }),
38
- ];
39
- if (((_d = cfg.plugins) === null || _d === void 0 ? void 0 : _d.commonjs) !== false) {
40
- plugins.push(commonjs((_e = cfg.plugins) === null || _e === void 0 ? void 0 : _e.commonjs));
41
- }
42
- if (((_f = cfg.plugins) === null || _f === void 0 ? void 0 : _f.json) !== false) {
43
- plugins.push(json(((_g = cfg.plugins) === null || _g === void 0 ? void 0 : _g.json) || {
44
- compact: true,
45
- }));
46
- }
47
- plugins.push(setupReplacePlugin(pkg));
48
- return {
49
- external: [
50
- ...Object.keys(pkg.dependencies || {}),
51
- ...Object.keys(pkg.devDependencies || {}),
52
- ...Object.keys(pkg.peerDependencies || {}),
53
- ...Object.keys(pkg.optionalDependencies || {}),
54
- ],
55
- input: 'src/index.ts',
56
- output,
57
- plugins,
58
- preserveSymlinks: true,
59
- };
60
- };
1
+ /*
2
+ * Package @donmahallem/rollup-config
3
+ * Source https://github.com/donmahallem/rollup-config/
4
+ */
5
+ import commonjs from '@rollup/plugin-commonjs';
6
+ import json from '@rollup/plugin-json';
7
+ import nodeResolve from '@rollup/plugin-node-resolve';
8
+ import typescript from '@rollup/plugin-typescript';
9
+ import { setupReplacePlugin } from './replace-config';
10
+ export const baseConfig = (pkg, cfg = {}) => {
11
+ const output = [];
12
+ if (pkg.main && cfg?.output?.cjs !== false) {
13
+ output.push({
14
+ file: pkg.main,
15
+ footer: '// BUILD: __BUILD_DATE__\n\n',
16
+ format: 'cjs',
17
+ preferConst: true,
18
+ sourcemap: true,
19
+ });
20
+ }
21
+ if (pkg.module && cfg?.output?.esm !== false) {
22
+ output.push({
23
+ file: pkg.module,
24
+ footer: '// BUILD: __BUILD_DATE__\n\n',
25
+ format: 'esm',
26
+ preferConst: true,
27
+ sourcemap: true,
28
+ });
29
+ }
30
+ const plugins = [
31
+ nodeResolve(cfg.plugins?.nodeResolve || {
32
+ preferBuiltins: true,
33
+ }),
34
+ typescript({
35
+ tsconfig: cfg.tsconfig || './tsconfig.json',
36
+ }),
37
+ ];
38
+ if (cfg.plugins?.commonjs !== false) {
39
+ plugins.push(commonjs(cfg.plugins?.commonjs));
40
+ }
41
+ if (cfg.plugins?.json !== false) {
42
+ plugins.push(json(cfg.plugins?.json || {
43
+ compact: true,
44
+ }));
45
+ }
46
+ plugins.push(setupReplacePlugin(pkg));
47
+ return {
48
+ external: [
49
+ ...Object.keys(pkg.dependencies || {}),
50
+ ...Object.keys(pkg.devDependencies || {}),
51
+ ...Object.keys(pkg.peerDependencies || {}),
52
+ ...Object.keys(pkg.optionalDependencies || {}),
53
+ ],
54
+ input: 'src/index.ts',
55
+ output,
56
+ plugins,
57
+ preserveSymlinks: true,
58
+ };
59
+ };
61
60
  //# sourceMappingURL=base-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-config.js","sourceRoot":"","sources":["../../src/base-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,QAAmC,MAAM,yBAAyB,CAAC;AAC1E,OAAO,IAA2B,MAAM,qBAAqB,CAAC;AAC9D,OAAO,WAAyC,MAAM,6BAA6B,CAAC;AACpF,OAAO,UAAU,MAAM,2BAA2B,CAAC;AAGnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAmBtD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAoB,EAAE,MAAe,EAAE,EAAiB,EAAE;;IACjF,MAAM,MAAM,GAAoB,EAAE,CAAC;IACnC,IAAI,GAAG,CAAC,IAAI,IAAI,CAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,0CAAE,GAAG,MAAK,KAAK,EAAE;QACxC,MAAM,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,MAAM,EAAE,8BAA8B;YACtC,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;SAClB,CAAC,CAAC;KACN;IACD,IAAI,GAAG,CAAC,MAAM,IAAI,CAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,0CAAE,GAAG,MAAK,KAAK,EAAE;QAC1C,MAAM,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,GAA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EAAE;QACjC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;KACjD;IACD,IAAI,GAAG,CAAC,OAAO,EAAE,IAAI,KAAK,KAAK,EAAE;QAC7B,OAAO,CAAC,IAAI,CACR,IAAI,CACA,GAAG,CAAC,OAAO,EAAE,IAAI,IAAI;YACjB,OAAO,EAAE,IAAI;SAChB,CACJ,CACJ,CAAC;KACL;IACD,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,OAAO;QACH,QAAQ,EAAE;YACN,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC;YACtC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;YACzC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC;YAC1C,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC;SACjD;QACD,KAAK,EAAE,cAAc;QACrB,MAAM;QACN,OAAO;QACP,gBAAgB,EAAE,IAAI;KACzB,CAAC;AACN,CAAC,CAAC"}
@@ -1,15 +1,15 @@
1
- /*
2
- * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
4
- */
5
- import dts from 'rollup-plugin-dts';
6
- import { setupReplacePlugin } from './replace-config';
7
- export const baseDtsConfig = (pkg, cfg) => {
8
- const outputOpts = {
9
- input: cfg.sourceTypings,
10
- output: [{ file: cfg.typingsOutputPath || pkg.types, format: 'es' }],
11
- plugins: [setupReplacePlugin(pkg), dts(cfg)],
12
- };
13
- return outputOpts;
14
- };
1
+ /*
2
+ * Package @donmahallem/rollup-config
3
+ * Source https://github.com/donmahallem/rollup-config/
4
+ */
5
+ import dts from 'rollup-plugin-dts';
6
+ import { setupReplacePlugin } from './replace-config';
7
+ export const baseDtsConfig = (pkg, cfg) => {
8
+ const outputOpts = {
9
+ input: cfg.sourceTypings,
10
+ output: [{ file: cfg.typingsOutputPath || pkg.types, format: 'es' }],
11
+ plugins: [setupReplacePlugin(pkg), dts(cfg)],
12
+ };
13
+ return outputOpts;
14
+ };
15
15
  //# sourceMappingURL=dts-config.js.map
package/dist/esm/index.js CHANGED
@@ -1,8 +1,8 @@
1
- /*
2
- * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
4
- */
5
- export { baseConfig } from './base-config';
6
- export { baseConfig as default } from './base-config';
7
- export { baseDtsConfig } from './dts-config';
1
+ /*
2
+ * Package @donmahallem/rollup-config
3
+ * Source https://github.com/donmahallem/rollup-config/
4
+ */
5
+ export { baseConfig } from './base-config';
6
+ export { baseConfig as default } from './base-config';
7
+ export { baseDtsConfig } from './dts-config';
8
8
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- /*
2
- * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
4
- */
5
- export {};
1
+ /*
2
+ * Package @donmahallem/rollup-config
3
+ * Source https://github.com/donmahallem/rollup-config/
4
+ */
5
+ export {};
6
6
  //# sourceMappingURL=partial-pkg.js.map
@@ -1,17 +1,17 @@
1
- /*
2
- * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
4
- */
5
- import replace from '@rollup/plugin-replace';
6
- /**
7
- * @param {IPartialConfig} pkg package.json to use
8
- */
9
- export function setupReplacePlugin(pkg) {
10
- return replace({
11
- __BUILD_DATE__: () => new Date().toString(),
12
- __BUILD_PACKAGE_NAME__: pkg.name,
13
- __BUILD_VERSION__: pkg.version,
14
- preventAssignment: true,
15
- });
16
- }
1
+ /*
2
+ * Package @donmahallem/rollup-config
3
+ * Source https://github.com/donmahallem/rollup-config/
4
+ */
5
+ import replace from '@rollup/plugin-replace';
6
+ /**
7
+ * @param {IPartialConfig} pkg package.json to use
8
+ */
9
+ export function setupReplacePlugin(pkg) {
10
+ return replace({
11
+ __BUILD_DATE__: () => new Date().toString(),
12
+ __BUILD_PACKAGE_NAME__: pkg.name,
13
+ __BUILD_VERSION__: pkg.version,
14
+ preventAssignment: true,
15
+ });
16
+ }
17
17
  //# sourceMappingURL=replace-config.js.map
@@ -1,24 +1,24 @@
1
- import { RollupCommonJSOptions } from '@rollup/plugin-commonjs';
2
- import { RollupJsonOptions } from '@rollup/plugin-json';
3
- import { RollupNodeResolveOptions } from '@rollup/plugin-node-resolve';
4
- import { RollupOptions } from 'rollup';
5
- import { IPartialPackage } from './partial-pkg';
6
- export interface IConfig {
7
- output?: {
8
- cjs?: boolean;
9
- esm?: boolean;
10
- };
11
- plugins?: {
12
- commonjs?: false | RollupCommonJSOptions;
13
- nodeResolve?: RollupNodeResolveOptions;
14
- json?: false | RollupJsonOptions;
15
- };
16
- /**
17
- * Path to the tsconfig path to use
18
- *
19
- * @default './tsconfig.json'
20
- */
21
- tsconfig?: string;
22
- }
23
- export declare const baseConfig: (pkg: IPartialPackage, cfg?: IConfig) => RollupOptions;
1
+ import { RollupCommonJSOptions } from '@rollup/plugin-commonjs';
2
+ import { RollupJsonOptions } from '@rollup/plugin-json';
3
+ import { RollupNodeResolveOptions } from '@rollup/plugin-node-resolve';
4
+ import { RollupOptions } from 'rollup';
5
+ import { IPartialPackage } from './partial-pkg';
6
+ export interface IConfig {
7
+ output?: {
8
+ cjs?: boolean;
9
+ esm?: boolean;
10
+ };
11
+ plugins?: {
12
+ commonjs?: false | RollupCommonJSOptions;
13
+ nodeResolve?: RollupNodeResolveOptions;
14
+ json?: false | RollupJsonOptions;
15
+ };
16
+ /**
17
+ * Path to the tsconfig path to use
18
+ *
19
+ * @default './tsconfig.json'
20
+ */
21
+ tsconfig?: string;
22
+ }
23
+ export declare const baseConfig: (pkg: IPartialPackage, cfg?: IConfig) => RollupOptions;
24
24
  //# sourceMappingURL=base-config.d.ts.map
@@ -1,8 +1,8 @@
1
- import type { IPartialPackage } from './partial-pkg';
2
- import type { RollupOptions } from 'rollup';
3
- import type { Options as DtsOptions } from 'rollup-plugin-dts';
4
- export declare const baseDtsConfig: (pkg: IPartialPackage, cfg: DtsOptions & {
5
- typingsOutputPath?: string;
6
- sourceTypings: string;
7
- }) => RollupOptions;
1
+ import type { IPartialPackage } from './partial-pkg';
2
+ import type { RollupOptions } from 'rollup';
3
+ import type { Options as DtsOptions } from 'rollup-plugin-dts';
4
+ export declare const baseDtsConfig: (pkg: IPartialPackage, cfg: DtsOptions & {
5
+ typingsOutputPath?: string;
6
+ sourceTypings: string;
7
+ }) => RollupOptions;
8
8
  //# sourceMappingURL=dts-config.d.ts.map
@@ -1,4 +1,4 @@
1
- export { baseConfig } from './base-config';
2
- export { baseConfig as default } from './base-config';
3
- export { baseDtsConfig } from './dts-config';
1
+ export { baseConfig } from './base-config';
2
+ export { baseConfig as default } from './base-config';
3
+ export { baseDtsConfig } from './dts-config';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,20 +1,20 @@
1
- export interface IPartialPackage {
2
- dependencies?: {
3
- [key: string]: string;
4
- };
5
- devDependencies?: {
6
- [key: string]: string;
7
- };
8
- main?: string;
9
- module?: string;
10
- name?: string;
11
- optionalDependencies?: {
12
- [key: string]: string;
13
- };
14
- peerDependencies?: {
15
- [key: string]: string;
16
- };
17
- types?: string;
18
- version?: string;
19
- }
1
+ export interface IPartialPackage {
2
+ dependencies?: {
3
+ [key: string]: string;
4
+ };
5
+ devDependencies?: {
6
+ [key: string]: string;
7
+ };
8
+ main?: string;
9
+ module?: string;
10
+ name?: string;
11
+ optionalDependencies?: {
12
+ [key: string]: string;
13
+ };
14
+ peerDependencies?: {
15
+ [key: string]: string;
16
+ };
17
+ types?: string;
18
+ version?: string;
19
+ }
20
20
  //# sourceMappingURL=partial-pkg.d.ts.map
@@ -1,7 +1,7 @@
1
- import { Plugin } from 'rollup';
2
- import { IPartialPackage } from './partial-pkg';
3
- /**
4
- * @param {IPartialConfig} pkg package.json to use
5
- */
6
- export declare function setupReplacePlugin(pkg: IPartialPackage): Plugin;
1
+ import { Plugin } from 'rollup';
2
+ import { IPartialPackage } from './partial-pkg';
3
+ /**
4
+ * @param {IPartialConfig} pkg package.json to use
5
+ */
6
+ export declare function setupReplacePlugin(pkg: IPartialPackage): Plugin;
7
7
  //# sourceMappingURL=replace-config.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donmahallem/rollup-config",
3
- "version": "0.8.2",
3
+ "version": "1.0.1",
4
4
  "description": "My Rollup config. Do not use!",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -10,25 +10,23 @@
10
10
  "build": "npm run build:esm && npm run build:cjs",
11
11
  "build:esm": "tsc --project ./tsconfig.dist-esm.json",
12
12
  "build:cjs": "tsc --project ./tsconfig.dist-cjs.json",
13
- "build:readme": "npx @appnest/readme generate --input ../package_readme_blueprint.md --config readme_config.json",
14
- "test": "mocha --config ../../.mocharc.yml",
15
- "test:coverage": "nyc --nycrc-path ../../.nycrc.json npm run test",
13
+ "build:readme": "npx @appnest/readme generate --input ./package_readme_blueprint.md --config readme_config.json",
14
+ "test": "mocha --config ./.mocharc.yml",
15
+ "test:coverage": "nyc --nycrc-path ./.nycrc.json npm run test",
16
16
  "lint": "eslint -c ./.eslintrc.cjs --ext .ts ./src",
17
- "postlint": "prettier --config ./../../.prettierrc src/**/*.ts --check",
17
+ "postlint": "prettier --config ./.prettierrc src/**/*.ts --check",
18
18
  "lint:fix": "eslint -c ./.eslintrc.cjs --ext .ts ./src --fix",
19
- "postlint:fix": "prettier --config ./../../.prettierrc src/**/*.ts --write",
20
- "docs": "typedoc --options ./typedoc.config.js",
19
+ "postlint:fix": "prettier --config ./.prettierrc src/**/*.ts --write",
20
+ "docs": "typedoc --options ./typedoc.json",
21
21
  "prepublishOnly": "npm run test && npm run docs && npm run build",
22
- "version": "npm run build:readme && git add README.md",
23
- "prepare": "npm run build",
24
- "clean": "rimraf ./dist ./.nyc_output ./coverage ./docs",
25
- "postclean": "npm run build"
22
+ "version": "npm run build:readme",
23
+ "clean": "rimraf ./dist ./.nyc_output ./coverage ./docs"
26
24
  },
27
25
  "files": [
28
26
  "dist/*",
29
27
  "src/*"
30
28
  ],
31
- "homepage": "https://donmahallem.github.io/js-libs/",
29
+ "homepage": "https://github.com/donmahallem/rollup-config/",
32
30
  "author": {
33
31
  "name": "donmahallem",
34
32
  "email": "donmahallem@users.noreply.github.com",
@@ -36,11 +34,11 @@
36
34
  },
37
35
  "license": "Apache-2.0",
38
36
  "bugs": {
39
- "url": "https://github.com/donmahallem/js-libs/issues"
37
+ "url": "https://github.com/donmahallem/rollup-config/issues"
40
38
  },
41
39
  "repository": {
42
40
  "type": "git",
43
- "url": "https://github.com/donmahallem/js-libs.git"
41
+ "url": "https://github.com/donmahallem/rollup-config.git"
44
42
  },
45
43
  "engines": {
46
44
  "node": ">=14"
@@ -49,20 +47,37 @@
49
47
  "access": "public"
50
48
  },
51
49
  "devDependencies": {
50
+ "@donmahallem/eslint-config": "0.5.5",
51
+ "@rollup/plugin-commonjs": "*",
52
52
  "@rollup/plugin-json": "4.1.0",
53
53
  "@rollup/plugin-node-resolve": "13.1.3",
54
54
  "@rollup/plugin-replace": "3.0.1",
55
55
  "@rollup/plugin-typescript": "8.3.0",
56
+ "@semantic-release/changelog": "6.0.1",
57
+ "@semantic-release/git": "10.0.1",
58
+ "@types/chai": "4.3.0",
59
+ "@types/mocha": "9.0.0",
60
+ "@types/node": "17.0.8",
61
+ "chai": "4.3.4",
62
+ "eslint": "8.6.0",
63
+ "mocha": "9.1.3",
64
+ "nyc": "15.1.0",
65
+ "prettier": "2.5.1",
56
66
  "rollup": "2.63.0",
57
- "rollup-plugin-dts": "4.1.0"
67
+ "rollup-plugin-dts": "4.1.0",
68
+ "semantic-release": "18.0.1",
69
+ "ts-node": "10.4.0",
70
+ "tslib": "2.3.1",
71
+ "typedoc": "0.22.10",
72
+ "typescript": "4.5.4"
58
73
  },
59
74
  "peerDependencies": {
75
+ "@rollup/plugin-commonjs": "^21.0.1",
60
76
  "@rollup/plugin-json": "^4.1.0",
61
77
  "@rollup/plugin-node-resolve": "^13.0.0",
62
78
  "@rollup/plugin-replace": "^3.0.0",
63
79
  "@rollup/plugin-typescript": "^8.2.0",
64
80
  "rollup": "^2.39.0",
65
81
  "rollup-plugin-dts": "^4.0.0"
66
- },
67
- "gitHead": "e2af192e734e8d884a8cde9537b152721ca53cee"
82
+ }
68
83
  }
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
3
+ * Source https://github.com/donmahallem/rollup-config/
4
4
  */
5
5
 
6
6
  import { expect } from 'chai';
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
3
+ * Source https://github.com/donmahallem/rollup-config/
4
4
  */
5
5
 
6
6
  import commonjs, { RollupCommonJSOptions } from '@rollup/plugin-commonjs';
package/src/dts-config.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
3
+ * Source https://github.com/donmahallem/rollup-config/
4
4
  */
5
5
 
6
6
  import dts from 'rollup-plugin-dts';
package/src/index.spec.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
3
+ * Source https://github.com/donmahallem/rollup-config/
4
4
  */
5
5
 
6
6
  import { expect } from 'chai';
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
3
+ * Source https://github.com/donmahallem/rollup-config/
4
4
  */
5
5
 
6
6
  export { baseConfig } from './base-config';
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
3
+ * Source https://github.com/donmahallem/rollup-config/
4
4
  */
5
5
 
6
6
  export interface IPartialPackage {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Package @donmahallem/rollup-config
3
- * Source https://donmahallem.github.io/js-libs/
3
+ * Source https://github.com/donmahallem/rollup-config/
4
4
  */
5
5
 
6
6
  import replace from '@rollup/plugin-replace';