You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

create-dlightjs

Package Overview
Dependencies
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-dlightjs - npm Package Compare versions

Comparing version

to
0.10.1

2

package.json
{
"name": "create-dlightjs",
"version": "0.10.0",
"version": "0.10.1",
"description": "DLight cli",

@@ -5,0 +5,0 @@ "author": {

@@ -6,3 +6,4 @@ import { View } from "@dlightjs/dlight"

export default class App extends View {
@View
export default class App {
count = 0

@@ -9,0 +10,0 @@

import { View } from "@dlightjs/dlight"
import { countBtn, btnHover } from "./style.module.css"
export default class Button extends View {
_$content
@View
export default class Button {
@Content content
onclick

@@ -10,3 +11,3 @@ btnStatus = 0

Body() {
button(this._$content)
button(this.content)
.className(this.btnStatus[index] === 1 ? `${countBtn} ${btnHover}` : countBtn)

@@ -13,0 +14,0 @@ .onclick(this.onclick)

import { View } from "@dlightjs/dlight"
import { headerWrap, navBtn, headerLogo } from "./style.module.css"
class Header extends View {
@View
export default class Header {
navList = [
{
url: "",
url: "https://dlight-js.com/docs",
navName: "Docs"
},
{
url: "https://www.baidu.com",
url: "https://dlight-js.com/examples",
navName: "Examples"
},
{
url: "",
navName: "Tutorials"
url: "https://dlight-js.com/playground",
navName: "Playground"
}

@@ -38,3 +39,1 @@ ]

}
export default Header

@@ -10,4 +10,4 @@ import { defineConfig } from 'vite'

plugins: [
dlight({ appendix: [".view.js"] }),
dlight({ files: "**/*.view.js" })
]
});

@@ -10,4 +10,4 @@ import { defineConfig } from 'vite'

plugins: [
dlight({ appendix: [".view.js"] }),
dlight({ files: "**/*.view.js" })
]
});
{
"compilerOptions": {
"jsx": "react",
"target": "ESNext",

@@ -5,0 +4,0 @@ "useDefineForClassFields": true,

@@ -10,4 +10,4 @@ import { defineConfig } from 'vite'

plugins: [
dlight({ appendix: [".view.ts"] }),
dlight({ files: "**/*.view.ts" })
]
});
import { View } from "@dlightjs/dlight"
import { type Typed, div, p, button, span, type Pretty } from "@dlightjs/types"
import { type Typed, div, p, button, span, type Pretty, SubTyped } from "@dlightjs/types"
import Header from "./Header.view"
import { wrap, slogan2, countWrap, countBtn, btnHover, btnWrap, countText, colorD, colorL, m0 } from "./style.module.css"
class App extends View {
interface BtnProps {
content: string
onclick: () => void
index: number
}
@View
class App {
count = 0
btnStatus = [0, 0]
@View
Btn({ _$content, onclick, index }: any): any {
button(_$content)
Btn = (({ content, onclick, index }: BtnProps) => {
button(content)
.className(this.btnStatus[index] === 1 ? `${countBtn} ${btnHover}` : countBtn)

@@ -22,3 +29,3 @@ .onclick(onclick)

})
}
}) as any as SubTyped<BtnProps>

@@ -25,0 +32,0 @@

import { View } from "@dlightjs/dlight"
import { headerWrap, navBtn, headerLogo } from "./style.module.css"
import { type Typed, div, img, a type Pretty } from "@dlightjs/types"
import { type Typed, div, img, a, type Pretty } from "@dlightjs/types"
class Header extends View {
interface NavProps {
url: string
navName: string
}
@View
class Header {
navList = [
{
url: "",
url: "https://dlight-js.com/docs",
navName: "Docs"
},
{
url: "https://www.baidu.com",
url: "https://dlight-js.com/examples",
navName: "Examples"
},
{
url: "",
navName: "Tutorials"
url: "https://dlight-js.com/playground",
navName: "Playground"
}

@@ -22,7 +28,7 @@ ]

@View
Nav({ url, navName }: any): any {
Nav = (({ url, navName }: NavProps) => {
a(navName)
.className(navBtn)
.href(url)
}
}) as any as Typed<NavProps>

@@ -39,3 +45,3 @@ Body() {

for (const navItem of this.navList) {
this.Nav({})
this.Nav()
.url(navItem.url)

@@ -42,0 +48,0 @@ .navName(navItem.navName)

{
"compilerOptions": {
"jsx": "react",
"target": "ESNext",

@@ -5,0 +4,0 @@ "useDefineForClassFields": true,

@@ -10,4 +10,4 @@ import { defineConfig } from 'vite'

plugins: [
dlight({ appendix: [".view.ts"] }),
dlight({ files: "**/*.view.ts" })
]
});