Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dojo/cli-create-widget

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dojo/cli-create-widget - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

6

package.json
{
"name": "@dojo/cli-create-widget",
"version": "4.0.0",
"version": "5.0.0",
"description": "Command to scaffold a new widget",

@@ -20,4 +20,4 @@ "homepage": "https://dojo.io",

"devDependencies": {
"@dojo/cli": "^4.0.0",
"@dojo/scripts": "~3.0.1",
"@dojo/cli": "^5.0.0",
"@dojo/scripts": "~3.1.0",
"@dojo/loader": "^2.0.0",

@@ -24,0 +24,0 @@ "@types/fs-extra": "^5.0.0",

@@ -8,3 +8,3 @@ # cli-create-widget

A [Dojo CLI](https://github/dojo/cli) command that creates a Dojo 2 widget template with an optional custom element descriptor.
A [Dojo CLI](https://github.com/dojo/cli) command that creates a Dojo 2 widget template with an optional custom element descriptor.

@@ -11,0 +11,0 @@ - [Usage](#usage)

@@ -32,2 +32,6 @@ "use strict";

const name = args.name;
const className = args.name
.replace(/(?:^\w|[A-Z]|\b\w)/g, (letter) => letter.toUpperCase())
.replace(/\s+/g, '')
.replace(/\W+/g, '');
const folderName = name.toLowerCase();

@@ -43,2 +47,3 @@ const styleRoot = args.styles || `${folderName}/styles`;

name,
className,
folderName,

@@ -45,0 +50,0 @@ includeCustomElement: args.component,

@@ -10,10 +10,8 @@ import { DNode } from '@dojo/framework/widget-core/interfaces';

/**
* @type <%= name %>Properties
* @type <%= className %>Properties
*
* Properties that can be set on <%= name %> components
* Properties that can be set on <%= className %> components
*/
export interface <%= name %>Properties { }
export interface <%= className %>Properties { }
export const ThemedBase = ThemedMixin(WidgetBase);
<%if (includeCustomElement) { %>

@@ -28,3 +26,3 @@ @customElement({

@theme(css)
export class <%= name %><P extends <%= name %>Properties = <%= name %>Properties> extends ThemedBase<P> {
export class <%= className %> extends ThemedMixin(WidgetBase)<<%= className %>Properties> {
protected render(): DNode | DNode[] {

@@ -35,2 +33,2 @@ return null;

export default <%= name %>;
export default <%= className %>;

@@ -6,10 +6,10 @@ const { describe, it, beforeEach, afterEach } = intern.getInterface('bdd');

import <%= name %> from './<%= testComponentPath %>';
import <%= className %> from './<%= testComponentPath %>';
describe('<%= name %>', () => {
describe('<%= className %>', () => {
it('should construct <%= name %>', () => {
const h = harness(() => w(<%= name %>, {}));
it('should construct <%= className %>', () => {
const h = harness(() => w(<%= className %>, {}));
h.expect(() => null);
});
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc