@wavemaker/custom-widgets-m3 12.0.0-next.45066 → 12.0.0-next.45067

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.
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@wavemaker/custom-widgets-m3",
3
- "version": "12.0.0-next.45066",
3
+ "version": "12.0.0-next.45067",
4
4
  "description": "A collection of custom widgets",
5
5
  "module": "index",
6
6
  "main": "index",
7
7
  "scripts": {
8
- "build": "tsc && webpack --mode development && node ./scripts/build.js post-build",
8
+ "build:cjs": "webpack --config webpack.config.cjs.js --mode development",
9
+ "build:esm": "webpack --config webpack.config.js --mode development",
10
+ "build": "tsc && npm run build:cjs && npm run build:esm && node ./scripts/build.js post-build",
9
11
  "test": "echo \"Error: no test specified\" && exit 1"
10
12
  },
11
13
  "keywords": [
@@ -28,6 +30,7 @@
28
30
  "tar": "^6.1.0"
29
31
  },
30
32
  "exports": {
31
- ".": "./index"
33
+ "import": "./index",
34
+ "require": "./dist/custom-widgets-bundle.cjs.js"
32
35
  }
33
36
  }
@@ -8,8 +8,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
13
  function verb(n) { return function (v) { return step([n, v]); }; }
14
14
  function step(op) {
15
15
  if (f) throw new TypeError("Generator is already executing.");
@@ -65,7 +65,8 @@ function postBuild(runtimeVersion) {
65
65
  packageData.main = 'index';
66
66
  packageData.module = 'index';
67
67
  packageData.exports = {
68
- ".": "./index"
68
+ "import": "./index",
69
+ "require": "./dist/custom-widgets-bundle.cjs.js"
69
70
  };
70
71
  delete packageData['files'];
71
72
  fs.writeFileSync("".concat(projectDir, "/dist/es2015/package.json"), JSON.stringify(packageData, null, 2));
@@ -1,4 +1,4 @@
1
- export declare const widgetRegistry: {
1
+ export const widgetRegistry: {
2
2
  name: string;
3
3
  displayName: string;
4
4
  iconClass: string;
@@ -0,0 +1,31 @@
1
+ export let entry: string;
2
+ export namespace module {
3
+ let rules: ({
4
+ test: RegExp;
5
+ use: string;
6
+ exclude: RegExp;
7
+ type?: undefined;
8
+ } | {
9
+ test: RegExp;
10
+ use: string[];
11
+ exclude: RegExp;
12
+ type?: undefined;
13
+ } | {
14
+ test: RegExp;
15
+ type: string;
16
+ exclude: RegExp;
17
+ use?: undefined;
18
+ })[];
19
+ }
20
+ export namespace resolve {
21
+ let extensions: string[];
22
+ }
23
+ export let devtool: string;
24
+ export namespace output {
25
+ let filename: string;
26
+ let path: string;
27
+ namespace library {
28
+ let type: string;
29
+ }
30
+ let globalObject: string;
31
+ }
@@ -0,0 +1,40 @@
1
+ var path = require('path');
2
+ module.exports = {
3
+ entry: './index.ts',
4
+ module: {
5
+ rules: [
6
+ {
7
+ test: /\.ts?$/,
8
+ use: 'ts-loader',
9
+ exclude: /node_modules/,
10
+ },
11
+ {
12
+ test: /\.css$/,
13
+ use: ['style-loader', 'css-loader'],
14
+ exclude: /node_modules/,
15
+ },
16
+ {
17
+ test: /\.html$/,
18
+ use: 'html-loader',
19
+ exclude: /node_modules/,
20
+ },
21
+ {
22
+ test: /\.json$/,
23
+ type: 'json',
24
+ exclude: /node_modules/,
25
+ },
26
+ ],
27
+ },
28
+ resolve: {
29
+ extensions: ['.ts', '.js', '.json', '.html', '.css'],
30
+ },
31
+ devtool: 'inline-source-map',
32
+ output: {
33
+ filename: 'custom-widgets-bundle.cjs.js',
34
+ path: path.resolve(__dirname, 'dist/es2015'),
35
+ library: {
36
+ type: 'commonjs'
37
+ },
38
+ globalObject: 'window',
39
+ },
40
+ };