@stencil/angular-output-target 0.8.4 → 0.9.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.
@@ -21,4 +21,4 @@ export declare const createAngularComponentDefinition: (tagName: string, inputs:
21
21
  * @param customElementsDir The custom elements directory.
22
22
  * @returns The component interface type definition as a string.
23
23
  */
24
- export declare const createComponentTypeDefinition: (outputType: OutputType, tagNameAsPascal: string, events: readonly ComponentCompilerEvent[], componentCorePackage: string, customElementsDir?: string | undefined) => string;
24
+ export declare const createComponentTypeDefinition: (outputType: OutputType, tagNameAsPascal: string, events: readonly ComponentCompilerEvent[], componentCorePackage: string, customElementsDir?: string) => string;
@@ -149,8 +149,8 @@ export const createComponentTypeDefinition = (outputType, tagNameAsPascal, event
149
149
  const eventTypes = publicEvents.map((event) => {
150
150
  const comment = createDocComment(event.docs);
151
151
  let eventName = event.name;
152
- if (event.name.includes('-')) {
153
- // If an event name includes a dash, we need to wrap it in quotes.
152
+ if (/[-/]/.test(event.name)) {
153
+ // If an event name includes a dash or a forward slash, we need to wrap it in quotes.
154
154
  // https://github.com/ionic-team/stencil-ds-output-targets/issues/212
155
155
  eventName = `'${event.name}'`;
156
156
  }
@@ -1,8 +1,8 @@
1
- import type { OutputTargetAngular } from './types';
1
+ import { OutputTargetAngular, OutputType } from './types';
2
2
  import type { CompilerCtx, ComponentCompilerMeta, Config } from '@stencil/core/internal';
3
3
  export interface ValueAccessor {
4
4
  elementSelectors: string[];
5
5
  eventTargets: [string, string][];
6
6
  }
7
7
  export default function generateValueAccessors(compilerCtx: CompilerCtx, components: ComponentCompilerMeta[], outputTarget: OutputTargetAngular, config: Config): Promise<void>;
8
- export declare function createValueAccessor(srcFileContents: string, valueAccessor: ValueAccessor): string;
8
+ export declare function createValueAccessor(srcFileContents: string, valueAccessor: ValueAccessor, outputType?: OutputType): string;
@@ -1,5 +1,6 @@
1
1
  import { EOL } from 'os';
2
2
  import path from 'path';
3
+ import { OutputTypes } from './utils';
3
4
  export default async function generateValueAccessors(compilerCtx, components, outputTarget, config) {
4
5
  if (!Array.isArray(outputTarget.valueAccessorConfigs) || outputTarget.valueAccessorConfigs.length === 0) {
5
6
  return;
@@ -25,20 +26,21 @@ export default async function generateValueAccessors(compilerCtx, components, ou
25
26
  const targetFilePath = path.join(targetDir, targetFileName);
26
27
  const srcFilePath = path.join(__dirname, '../resources/control-value-accessors/', targetFileName);
27
28
  const srcFileContents = await compilerCtx.fs.readFile(srcFilePath);
28
- const finalText = createValueAccessor(srcFileContents, normalizedValueAccessors[valueAccessorType]);
29
+ const finalText = createValueAccessor(srcFileContents, normalizedValueAccessors[valueAccessorType], outputTarget.outputType);
29
30
  await compilerCtx.fs.writeFile(targetFilePath, finalText);
30
31
  }));
31
32
  await copyResources(config, ['value-accessor.ts'], targetDir);
32
33
  }
33
- export function createValueAccessor(srcFileContents, valueAccessor) {
34
+ export function createValueAccessor(srcFileContents, valueAccessor, outputType) {
34
35
  const hostContents = valueAccessor.eventTargets.map((listItem) => VALUE_ACCESSOR_EVENTTARGETS.replace(VALUE_ACCESSOR_EVENT, listItem[0]).replace(VALUE_ACCESSOR_TARGETATTR, listItem[1]));
35
36
  return srcFileContents
36
37
  .replace(VALUE_ACCESSOR_SELECTORS, valueAccessor.elementSelectors.join(', '))
37
- .replace(VALUE_ACCESSOR_EVENTTARGETS, hostContents.join(`,${EOL}`));
38
+ .replace(VALUE_ACCESSOR_EVENTTARGETS, hostContents.join(`,${EOL}`))
39
+ .replace(VALUE_ACCESSOR_STANDALONE, outputType && outputType === OutputTypes.Standalone ? ',standalone: true' : '');
38
40
  }
39
41
  function copyResources(config, resourcesFilesToCopy, directory) {
40
42
  if (!config.sys || !config.sys.copy) {
41
- throw new Error('stencil is not properly intialized at this step. Notify the developer');
43
+ throw new Error('stencil is not properly initialized at this step. Notify the developer');
42
44
  }
43
45
  const copyTasks = resourcesFilesToCopy.map((rf) => {
44
46
  return {
@@ -46,6 +48,7 @@ function copyResources(config, resourcesFilesToCopy, directory) {
46
48
  dest: path.join(directory, rf),
47
49
  keepDirStructure: false,
48
50
  warn: false,
51
+ ignore: [],
49
52
  };
50
53
  });
51
54
  return config.sys.copy(copyTasks, path.join(directory));
@@ -53,4 +56,5 @@ function copyResources(config, resourcesFilesToCopy, directory) {
53
56
  const VALUE_ACCESSOR_SELECTORS = `<VALUE_ACCESSOR_SELECTORS>`;
54
57
  const VALUE_ACCESSOR_EVENT = `<VALUE_ACCESSOR_EVENT>`;
55
58
  const VALUE_ACCESSOR_TARGETATTR = '<VALUE_ACCESSOR_TARGETATTR>';
59
+ const VALUE_ACCESSOR_STANDALONE = '<VALUE_ACCESSOR_STANDALONE>';
56
60
  const VALUE_ACCESSOR_EVENTTARGETS = ` '(<VALUE_ACCESSOR_EVENT>)': 'handleChangeEvent($event.target.<VALUE_ACCESSOR_TARGETATTR>)'`;
package/dist/index.cjs.js CHANGED
@@ -58,18 +58,18 @@ function normalizePath(str) {
58
58
  return str;
59
59
  }
60
60
  function relativeImport(pathFrom, pathTo, ext) {
61
- let relativePath = path__default['default'].relative(path__default['default'].dirname(pathFrom), path__default['default'].dirname(pathTo));
61
+ let relativePath = path__default["default"].relative(path__default["default"].dirname(pathFrom), path__default["default"].dirname(pathTo));
62
62
  if (relativePath === '') {
63
63
  relativePath = '.';
64
64
  }
65
65
  else if (relativePath[0] !== '.') {
66
66
  relativePath = './' + relativePath;
67
67
  }
68
- return normalizePath(`${relativePath}/${path__default['default'].basename(pathTo, ext)}`);
68
+ return normalizePath(`${relativePath}/${path__default["default"].basename(pathTo, ext)}`);
69
69
  }
70
70
  async function readPackageJson(config, rootDir) {
71
71
  var _a;
72
- const pkgJsonPath = path__default['default'].join(rootDir, 'package.json');
72
+ const pkgJsonPath = path__default["default"].join(rootDir, 'package.json');
73
73
  let pkgJson;
74
74
  try {
75
75
  pkgJson = (await ((_a = config.sys) === null || _a === void 0 ? void 0 : _a.readFile(pkgJsonPath, 'utf8')));
@@ -294,8 +294,8 @@ const createComponentTypeDefinition = (outputType, tagNameAsPascal, events, comp
294
294
  const eventTypes = publicEvents.map((event) => {
295
295
  const comment = createDocComment(event.docs);
296
296
  let eventName = event.name;
297
- if (event.name.includes('-')) {
298
- // If an event name includes a dash, we need to wrap it in quotes.
297
+ if (/[-/]/.test(event.name)) {
298
+ // If an event name includes a dash or a forward slash, we need to wrap it in quotes.
299
299
  // https://github.com/ionic-team/stencil-ds-output-targets/issues/212
300
300
  eventName = `'${event.name}'`;
301
301
  }
@@ -336,7 +336,7 @@ async function generateValueAccessors(compilerCtx, components, outputTarget, con
336
336
  if (!Array.isArray(outputTarget.valueAccessorConfigs) || outputTarget.valueAccessorConfigs.length === 0) {
337
337
  return;
338
338
  }
339
- const targetDir = path__default['default'].dirname(outputTarget.directivesProxyFile);
339
+ const targetDir = path__default["default"].dirname(outputTarget.directivesProxyFile);
340
340
  const normalizedValueAccessors = outputTarget.valueAccessorConfigs.reduce((allAccessors, va) => {
341
341
  const elementSelectors = Array.isArray(va.elementSelectors) ? va.elementSelectors : [va.elementSelectors];
342
342
  const type = va.type;
@@ -354,37 +354,40 @@ async function generateValueAccessors(compilerCtx, components, outputTarget, con
354
354
  await Promise.all(Object.keys(normalizedValueAccessors).map(async (type) => {
355
355
  const valueAccessorType = type; // Object.keys converts to string
356
356
  const targetFileName = `${type}-value-accessor.ts`;
357
- const targetFilePath = path__default['default'].join(targetDir, targetFileName);
358
- const srcFilePath = path__default['default'].join(__dirname, '../resources/control-value-accessors/', targetFileName);
357
+ const targetFilePath = path__default["default"].join(targetDir, targetFileName);
358
+ const srcFilePath = path__default["default"].join(__dirname, '../resources/control-value-accessors/', targetFileName);
359
359
  const srcFileContents = await compilerCtx.fs.readFile(srcFilePath);
360
- const finalText = createValueAccessor(srcFileContents, normalizedValueAccessors[valueAccessorType]);
360
+ const finalText = createValueAccessor(srcFileContents, normalizedValueAccessors[valueAccessorType], outputTarget.outputType);
361
361
  await compilerCtx.fs.writeFile(targetFilePath, finalText);
362
362
  }));
363
- await copyResources(config, ['value-accessor.ts'], targetDir);
363
+ await copyResources$1(config, ['value-accessor.ts'], targetDir);
364
364
  }
365
- function createValueAccessor(srcFileContents, valueAccessor) {
365
+ function createValueAccessor(srcFileContents, valueAccessor, outputType) {
366
366
  const hostContents = valueAccessor.eventTargets.map((listItem) => VALUE_ACCESSOR_EVENTTARGETS.replace(VALUE_ACCESSOR_EVENT, listItem[0]).replace(VALUE_ACCESSOR_TARGETATTR, listItem[1]));
367
367
  return srcFileContents
368
368
  .replace(VALUE_ACCESSOR_SELECTORS, valueAccessor.elementSelectors.join(', '))
369
- .replace(VALUE_ACCESSOR_EVENTTARGETS, hostContents.join(`,${os.EOL}`));
369
+ .replace(VALUE_ACCESSOR_EVENTTARGETS, hostContents.join(`,${os.EOL}`))
370
+ .replace(VALUE_ACCESSOR_STANDALONE, outputType && outputType === OutputTypes.Standalone ? ',standalone: true' : '');
370
371
  }
371
- function copyResources(config, resourcesFilesToCopy, directory) {
372
+ function copyResources$1(config, resourcesFilesToCopy, directory) {
372
373
  if (!config.sys || !config.sys.copy) {
373
- throw new Error('stencil is not properly intialized at this step. Notify the developer');
374
+ throw new Error('stencil is not properly initialized at this step. Notify the developer');
374
375
  }
375
376
  const copyTasks = resourcesFilesToCopy.map((rf) => {
376
377
  return {
377
- src: path__default['default'].join(__dirname, '../resources/control-value-accessors/', rf),
378
- dest: path__default['default'].join(directory, rf),
378
+ src: path__default["default"].join(__dirname, '../resources/control-value-accessors/', rf),
379
+ dest: path__default["default"].join(directory, rf),
379
380
  keepDirStructure: false,
380
381
  warn: false,
382
+ ignore: [],
381
383
  };
382
384
  });
383
- return config.sys.copy(copyTasks, path__default['default'].join(directory));
385
+ return config.sys.copy(copyTasks, path__default["default"].join(directory));
384
386
  }
385
387
  const VALUE_ACCESSOR_SELECTORS = `<VALUE_ACCESSOR_SELECTORS>`;
386
388
  const VALUE_ACCESSOR_EVENT = `<VALUE_ACCESSOR_EVENT>`;
387
389
  const VALUE_ACCESSOR_TARGETATTR = '<VALUE_ACCESSOR_TARGETATTR>';
390
+ const VALUE_ACCESSOR_STANDALONE = '<VALUE_ACCESSOR_STANDALONE>';
388
391
  const VALUE_ACCESSOR_EVENTTARGETS = ` '(<VALUE_ACCESSOR_EVENT>)': 'handleChangeEvent($event.target.<VALUE_ACCESSOR_TARGETATTR>)'`;
389
392
 
390
393
  /**
@@ -411,7 +414,7 @@ async function angularDirectiveProxyOutput(compilerCtx, outputTarget, components
411
414
  const finalText = generateProxies(filteredComponents, pkgData, outputTarget, config.rootDir);
412
415
  await Promise.all([
413
416
  compilerCtx.fs.writeFile(outputTarget.directivesProxyFile, finalText),
414
- copyResources$1(config, outputTarget),
417
+ copyResources(config, outputTarget),
415
418
  generateAngularDirectivesFile(compilerCtx, filteredComponents, outputTarget),
416
419
  generateValueAccessors(compilerCtx, filteredComponents, outputTarget, config),
417
420
  ]);
@@ -419,24 +422,25 @@ async function angularDirectiveProxyOutput(compilerCtx, outputTarget, components
419
422
  function getFilteredComponents(excludeComponents = [], cmps) {
420
423
  return sortBy(cmps, (cmp) => cmp.tagName).filter((c) => !excludeComponents.includes(c.tagName) && !c.internal);
421
424
  }
422
- async function copyResources$1(config, outputTarget) {
425
+ async function copyResources(config, outputTarget) {
423
426
  if (!config.sys || !config.sys.copy || !config.sys.glob) {
424
427
  throw new Error('stencil is not properly initialized at this step. Notify the developer');
425
428
  }
426
- const srcDirectory = path__default['default'].join(__dirname, '..', 'angular-component-lib');
427
- const destDirectory = path__default['default'].join(path__default['default'].dirname(outputTarget.directivesProxyFile), 'angular-component-lib');
429
+ const srcDirectory = path__default["default"].join(__dirname, '..', 'angular-component-lib');
430
+ const destDirectory = path__default["default"].join(path__default["default"].dirname(outputTarget.directivesProxyFile), 'angular-component-lib');
428
431
  return config.sys.copy([
429
432
  {
430
433
  src: srcDirectory,
431
434
  dest: destDirectory,
432
435
  keepDirStructure: false,
433
436
  warn: false,
437
+ ignore: [],
434
438
  },
435
439
  ], srcDirectory);
436
440
  }
437
441
  function generateProxies(components, pkgData, outputTarget, rootDir) {
438
- const distTypesDir = path__default['default'].dirname(pkgData.types);
439
- const dtsFilePath = path__default['default'].join(rootDir, distTypesDir, GENERATED_DTS);
442
+ const distTypesDir = path__default["default"].dirname(pkgData.types);
443
+ const dtsFilePath = path__default["default"].join(rootDir, distTypesDir, GENERATED_DTS);
440
444
  const { outputType } = outputTarget;
441
445
  const componentsTypeFile = relativeImport(outputTarget.directivesProxyFile, dtsFilePath, '.d.ts');
442
446
  const includeSingleComponentAngularModules = outputType === OutputTypes.Scam;
@@ -560,11 +564,11 @@ function normalizeOutputTarget(config, outputTarget) {
560
564
  if (outputTarget.directivesProxyFile == null) {
561
565
  throw new Error('directivesProxyFile is required. Please set it in the Stencil config.');
562
566
  }
563
- if (outputTarget.directivesProxyFile && !path__default['default'].isAbsolute(outputTarget.directivesProxyFile)) {
564
- results.directivesProxyFile = normalizePath(path__default['default'].join(config.rootDir, outputTarget.directivesProxyFile));
567
+ if (outputTarget.directivesProxyFile && !path__default["default"].isAbsolute(outputTarget.directivesProxyFile)) {
568
+ results.directivesProxyFile = normalizePath(path__default["default"].join(config.rootDir, outputTarget.directivesProxyFile));
565
569
  }
566
- if (outputTarget.directivesArrayFile && !path__default['default'].isAbsolute(outputTarget.directivesArrayFile)) {
567
- results.directivesArrayFile = normalizePath(path__default['default'].join(config.rootDir, outputTarget.directivesArrayFile));
570
+ if (outputTarget.directivesArrayFile && !path__default["default"].isAbsolute(outputTarget.directivesArrayFile)) {
571
+ results.directivesArrayFile = normalizePath(path__default["default"].join(config.rootDir, outputTarget.directivesArrayFile));
568
572
  }
569
573
  if (outputTarget.includeSingleComponentAngularModules !== undefined) {
570
574
  throw new Error("The 'includeSingleComponentAngularModules' option has been removed. Please use 'outputType' instead.");
package/dist/index.js CHANGED
@@ -286,8 +286,8 @@ const createComponentTypeDefinition = (outputType, tagNameAsPascal, events, comp
286
286
  const eventTypes = publicEvents.map((event) => {
287
287
  const comment = createDocComment(event.docs);
288
288
  let eventName = event.name;
289
- if (event.name.includes('-')) {
290
- // If an event name includes a dash, we need to wrap it in quotes.
289
+ if (/[-/]/.test(event.name)) {
290
+ // If an event name includes a dash or a forward slash, we need to wrap it in quotes.
291
291
  // https://github.com/ionic-team/stencil-ds-output-targets/issues/212
292
292
  eventName = `'${event.name}'`;
293
293
  }
@@ -349,20 +349,21 @@ async function generateValueAccessors(compilerCtx, components, outputTarget, con
349
349
  const targetFilePath = path.join(targetDir, targetFileName);
350
350
  const srcFilePath = path.join(__dirname, '../resources/control-value-accessors/', targetFileName);
351
351
  const srcFileContents = await compilerCtx.fs.readFile(srcFilePath);
352
- const finalText = createValueAccessor(srcFileContents, normalizedValueAccessors[valueAccessorType]);
352
+ const finalText = createValueAccessor(srcFileContents, normalizedValueAccessors[valueAccessorType], outputTarget.outputType);
353
353
  await compilerCtx.fs.writeFile(targetFilePath, finalText);
354
354
  }));
355
- await copyResources(config, ['value-accessor.ts'], targetDir);
355
+ await copyResources$1(config, ['value-accessor.ts'], targetDir);
356
356
  }
357
- function createValueAccessor(srcFileContents, valueAccessor) {
357
+ function createValueAccessor(srcFileContents, valueAccessor, outputType) {
358
358
  const hostContents = valueAccessor.eventTargets.map((listItem) => VALUE_ACCESSOR_EVENTTARGETS.replace(VALUE_ACCESSOR_EVENT, listItem[0]).replace(VALUE_ACCESSOR_TARGETATTR, listItem[1]));
359
359
  return srcFileContents
360
360
  .replace(VALUE_ACCESSOR_SELECTORS, valueAccessor.elementSelectors.join(', '))
361
- .replace(VALUE_ACCESSOR_EVENTTARGETS, hostContents.join(`,${EOL}`));
361
+ .replace(VALUE_ACCESSOR_EVENTTARGETS, hostContents.join(`,${EOL}`))
362
+ .replace(VALUE_ACCESSOR_STANDALONE, outputType && outputType === OutputTypes.Standalone ? ',standalone: true' : '');
362
363
  }
363
- function copyResources(config, resourcesFilesToCopy, directory) {
364
+ function copyResources$1(config, resourcesFilesToCopy, directory) {
364
365
  if (!config.sys || !config.sys.copy) {
365
- throw new Error('stencil is not properly intialized at this step. Notify the developer');
366
+ throw new Error('stencil is not properly initialized at this step. Notify the developer');
366
367
  }
367
368
  const copyTasks = resourcesFilesToCopy.map((rf) => {
368
369
  return {
@@ -370,6 +371,7 @@ function copyResources(config, resourcesFilesToCopy, directory) {
370
371
  dest: path.join(directory, rf),
371
372
  keepDirStructure: false,
372
373
  warn: false,
374
+ ignore: [],
373
375
  };
374
376
  });
375
377
  return config.sys.copy(copyTasks, path.join(directory));
@@ -377,6 +379,7 @@ function copyResources(config, resourcesFilesToCopy, directory) {
377
379
  const VALUE_ACCESSOR_SELECTORS = `<VALUE_ACCESSOR_SELECTORS>`;
378
380
  const VALUE_ACCESSOR_EVENT = `<VALUE_ACCESSOR_EVENT>`;
379
381
  const VALUE_ACCESSOR_TARGETATTR = '<VALUE_ACCESSOR_TARGETATTR>';
382
+ const VALUE_ACCESSOR_STANDALONE = '<VALUE_ACCESSOR_STANDALONE>';
380
383
  const VALUE_ACCESSOR_EVENTTARGETS = ` '(<VALUE_ACCESSOR_EVENT>)': 'handleChangeEvent($event.target.<VALUE_ACCESSOR_TARGETATTR>)'`;
381
384
 
382
385
  /**
@@ -403,7 +406,7 @@ async function angularDirectiveProxyOutput(compilerCtx, outputTarget, components
403
406
  const finalText = generateProxies(filteredComponents, pkgData, outputTarget, config.rootDir);
404
407
  await Promise.all([
405
408
  compilerCtx.fs.writeFile(outputTarget.directivesProxyFile, finalText),
406
- copyResources$1(config, outputTarget),
409
+ copyResources(config, outputTarget),
407
410
  generateAngularDirectivesFile(compilerCtx, filteredComponents, outputTarget),
408
411
  generateValueAccessors(compilerCtx, filteredComponents, outputTarget, config),
409
412
  ]);
@@ -411,7 +414,7 @@ async function angularDirectiveProxyOutput(compilerCtx, outputTarget, components
411
414
  function getFilteredComponents(excludeComponents = [], cmps) {
412
415
  return sortBy(cmps, (cmp) => cmp.tagName).filter((c) => !excludeComponents.includes(c.tagName) && !c.internal);
413
416
  }
414
- async function copyResources$1(config, outputTarget) {
417
+ async function copyResources(config, outputTarget) {
415
418
  if (!config.sys || !config.sys.copy || !config.sys.glob) {
416
419
  throw new Error('stencil is not properly initialized at this step. Notify the developer');
417
420
  }
@@ -423,6 +426,7 @@ async function copyResources$1(config, outputTarget) {
423
426
  dest: destDirectory,
424
427
  keepDirStructure: false,
425
428
  warn: false,
429
+ ignore: [],
426
430
  },
427
431
  ], srcDirectory);
428
432
  }
@@ -31,6 +31,7 @@ async function copyResources(config, outputTarget) {
31
31
  dest: destDirectory,
32
32
  keepDirStructure: false,
33
33
  warn: false,
34
+ ignore: [],
34
35
  },
35
36
  ], srcDirectory);
36
37
  }
package/dist/types.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * - `scam` - Generate a Single Component Angular Module for each component.
5
5
  * - `standalone` - Generate a component with the `standalone` flag set to `true`.
6
6
  */
7
- export declare type OutputType = 'component' | 'scam' | 'standalone';
7
+ export type OutputType = 'component' | 'scam' | 'standalone';
8
8
  export interface OutputTargetAngular {
9
9
  /**
10
10
  * The package name of the component library.
@@ -28,7 +28,7 @@ export interface OutputTargetAngular {
28
28
  */
29
29
  outputType?: OutputType;
30
30
  }
31
- export declare type ValueAccessorTypes = 'text' | 'radio' | 'select' | 'number' | 'boolean';
31
+ export type ValueAccessorTypes = 'text' | 'radio' | 'select' | 'number' | 'boolean';
32
32
  export interface ValueAccessorConfig {
33
33
  elementSelectors: string | string[];
34
34
  event: string;
package/dist/types.js CHANGED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/angular-output-target",
3
- "version": "0.8.4",
3
+ "version": "0.9.1",
4
4
  "description": "Angular output target for @stencil/core components.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -14,15 +14,18 @@
14
14
  "access": "public"
15
15
  },
16
16
  "scripts": {
17
- "prepublishOnly": "npm run build",
18
- "prebuild": "rimraf ./dist && npm run test",
19
- "build": "tsc && npm run rollup",
17
+ "prepublishOnly": "pnpm run build",
18
+ "prebuild": "rimraf ./dist && pnpm run test",
19
+ "build": "tsc && pnpm run rollup",
20
+ "dev": "run-p dev:*",
21
+ "dev:build": "tsc --watch --preserveWatchOutput",
22
+ "dev:rollup": "rollup -c --watch --preserveWatchOutput",
20
23
  "watch": "tsc --watch",
21
24
  "rollup": "rollup -c",
22
- "version": "npm run build",
23
- "prettier": "npm run prettier.base -- --write",
25
+ "version": "pnpm run build",
26
+ "prettier": "pnpm run prettier.base --write",
24
27
  "prettier.base": "prettier \"./({angular-component-lib,src,test,__tests__}/**/*.{ts,tsx,js,jsx})|*.{ts,tsx,js,jsx}\"",
25
- "prettier.dry-run": "npm run prettier.base -- --list-different",
28
+ "prettier.dry-run": "pnpm run prettier.base --list-different",
26
29
  "release": "np",
27
30
  "test": "jest --passWithNoTests",
28
31
  "test.watch": "jest --watch"
@@ -39,7 +42,14 @@
39
42
  },
40
43
  "devDependencies": {
41
44
  "@angular/core": "8.2.14",
42
- "@angular/forms": "8.2.14"
45
+ "@angular/forms": "8.2.14",
46
+ "@types/node": "^18.0.0",
47
+ "jest": "^27.0.0",
48
+ "jest-environment-jsdom": "^27.0.0",
49
+ "npm-run-all2": "^6.2.4",
50
+ "rimraf": "^5.0.0",
51
+ "rollup": "^2.23.1",
52
+ "typescript": "~5.0.4"
43
53
  },
44
54
  "peerDependencies": {
45
55
  "@stencil/core": ">=2.0.0 || >=3 || >= 4.0.0-beta.0 || >= 4.0.0"
@@ -58,8 +68,5 @@
58
68
  ],
59
69
  "testURL": "http://localhost"
60
70
  },
61
- "gitHead": "a3588e905186a0e86e7f88418fd5b2f9531b55e0",
62
- "volta": {
63
- "extends": "../../package.json"
64
- }
71
+ "gitHead": "a3588e905186a0e86e7f88418fd5b2f9531b55e0"
65
72
  }
@@ -15,7 +15,7 @@ import { ValueAccessor } from './value-accessor';
15
15
  useExisting: BooleanValueAccessor,
16
16
  multi: true
17
17
  }
18
- ]
18
+ ]<VALUE_ACCESSOR_STANDALONE>
19
19
  })
20
20
  export class BooleanValueAccessor extends ValueAccessor {
21
21
  constructor(el: ElementRef) {
@@ -15,7 +15,7 @@ import { ValueAccessor } from './value-accessor';
15
15
  useExisting: NumericValueAccessor,
16
16
  multi: true
17
17
  }
18
- ]
18
+ ]<VALUE_ACCESSOR_STANDALONE>
19
19
  })
20
20
  export class NumericValueAccessor extends ValueAccessor {
21
21
  constructor(el: ElementRef) {
@@ -15,7 +15,7 @@ import { ValueAccessor } from './value-accessor';
15
15
  useExisting: RadioValueAccessor,
16
16
  multi: true
17
17
  }
18
- ]
18
+ ]<VALUE_ACCESSOR_STANDALONE>
19
19
  })
20
20
  export class RadioValueAccessor extends ValueAccessor {
21
21
  constructor(el: ElementRef) {
@@ -15,7 +15,7 @@ import { ValueAccessor } from './value-accessor';
15
15
  useExisting: SelectValueAccessor,
16
16
  multi: true
17
17
  }
18
- ]
18
+ ]<VALUE_ACCESSOR_STANDALONE>
19
19
  })
20
20
  export class SelectValueAccessor extends ValueAccessor {
21
21
  constructor(el: ElementRef) {
@@ -15,7 +15,7 @@ import { ValueAccessor } from './value-accessor';
15
15
  useExisting: TextValueAccessor,
16
16
  multi: true
17
17
  }
18
- ]
18
+ ]<VALUE_ACCESSOR_STANDALONE>
19
19
  })
20
20
  export class TextValueAccessor extends ValueAccessor {
21
21
  constructor(el: ElementRef) {