You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

create-webflow-extension

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-webflow-extension - npm Package Compare versions

Comparing version
0.0.0
to
1.0.0
+1
-1
dist/index.js

@@ -5,3 +5,3 @@ #!/usr/bin/env node

`)}async function x(e,t){let i=y.join(e,"webflow.json"),n=await f.readFile(i,"utf-8"),u=JSON.parse(n),r=t.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ");u.name=r,await f.writeFile(i,JSON.stringify(u,null," ")+`
`)}async function P(e){a.intro(v.cyan("Set up your project by answering a few questions:"));let t=await a.group({name:async()=>{if(e.name)return d(e.name);let i=await a.text({message:"What is the name of your Webflow Designer Extension?",placeholder:"My Webflow Extension",defaultValue:"My Webflow Extension",validate:n=>{if(!n)return"You must provide a name for your extension"}});if(a.isCancel(i))throw new Error("USER_CANCELLED");return d(i)},pm:()=>e.pm?Promise.resolve(e.pm):a.select({message:"Package Manager",options:[{value:"pnpm",label:"pnpm",hint:"recommended"},{value:"npm",label:"npm"},{value:"yarn",label:"yarn"},{value:"bun",label:"bun"}],initialValue:"pnpm"}),linter:()=>e.linter?Promise.resolve(e.linter):a.select({message:"Linter and Formatter",options:[{value:"oxlint",label:"Oxlint and Oxfmt",hint:"recommended"},{value:"biome",label:"Biome"},{value:"eslint",label:"ESLint, Prettier, Stylelint"}],initialValue:"oxlint"}),skipGit:()=>e.skipGit!==void 0?Promise.resolve(e.skipGit):a.confirm({message:"Skip initializing a git repository?",initialValue:!1})},{onCancel:()=>{throw new Error("USER_CANCELLED")}});return{name:t.name,pm:t.pm,linter:t.linter,skipGit:t.skipGit,skipInstall:e.skipInstall??!1,quiet:!1}}import*as p from"@clack/prompts";import j from"degit";import{execa as c}from"execa";import C from"path";import o from"picocolors";var N="Flash-Brew-Digital/webflow-extension-starter#template";async function E(e){let t=C.resolve(process.cwd(),e.name),i=e.quiet?()=>{}:console.log;if(await h(t)){if(e.quiet)throw new Error(`Directory "${e.name}" already exists!`);let r=await p.confirm({message:`Directory "${e.name}" already exists. Overwrite?`,initialValue:!1});if(p.isCancel(r)||!r)throw new Error("USER_CANCELLED")}let n=e.quiet?null:p.spinner();n?.start("Cloning the built-in template...");try{await j(N,{cache:!1,force:!0}).clone(t),n?.stop("Template cloned!")}catch(r){throw n?.stop("Sorry, we could not clone the template"),r}if(n?.start("Configuring your extension..."),!(e.pm==="npm"?!0:await c(e.pm,["--version"]).then(()=>!0).catch(()=>!1))&&(await c("npm",["install","-g","-s",e.pm])).failed)throw n?.stop(`Sorry, we could not install ${e.pm}. Please install it manually and try again.`),new Error(`Failed to install ${e.pm}`);try{await b(t,e.name,e.pm),await x(t,e.name),n?.stop("Extension configured!")}catch(r){throw n?.stop("Sorry, we could not configure the extension"),r}n?.start("Setting up your linter and formatter...");try{let r,l=[];if(e.pm==="npm")r="npx";else if(e.pm==="bun")r="bunx";else if(e.pm==="yarn"){let{stdout:s}=await c("yarn",["--version"]),m=s.startsWith("1.");r=m?"npx":"yarn",l=m?[]:["dlx"]}else r=e.pm;await c(r,[...l,"ultracite","init","--linter",e.linter,"--pm",e.pm,"--editors","vscode","--quiet"],{cwd:t}),n?.stop("Linter and formatter set up!")}catch(r){throw n?.stop("Sorry, we could not set up the linter and formatter"),r}if(!e.skipGit){n?.start("Initializing git repository...");try{if((await c("git",["--version"])).failed){n?.stop("Git is not installed, skipping git initialization. Visit https://git-scm.com/install/ to install it.");return}await c("git",["init"],{cwd:t}),n?.stop("Git repository initialized!")}catch{n?.stop("Sorry, we could not initialize a git repository")}}if(!e.skipInstall){n?.start(`Installing dependencies with ${e.pm}...`);try{await c(e.pm,["install"],{cwd:t}),n?.stop("Dependencies installed!")}catch(r){throw n?.stop("Sorry, we could not install the dependencies"),r}}e.quiet||(p.outro(o.green("Your extension is ready to go!")),i(""),i(o.bold(" To get started:")),i(""),i(` ${o.cyan("cd")} ${e.name}`),e.skipInstall&&i(` ${o.cyan(`${e.pm} install`)}`),i(` ${o.cyan(`${e.pm} dev`)}`),i(""),i(o.bold(" Then in Webflow:")),i(""),i(o.dim(" 1. Open your Webflow workspace settings")),i(o.dim(" 2. Navigate to Apps & Integrations \u2192 Develop")),i(o.dim(" 3. Click Create an App and configure it accordingly")),i(o.dim(" 4. Open a project in the Designer")),i(o.dim(" 5. Press E to open the apps panel and launch your extension")),i(""))}var O="0.0.0",_=`
`)}async function P(e){a.intro(v.cyan("Set up your project by answering a few questions:"));let t=await a.group({name:async()=>{if(e.name)return d(e.name);let i=await a.text({message:"What is the name of your Webflow Designer Extension?",placeholder:"My Webflow Extension",defaultValue:"My Webflow Extension",validate:n=>{if(!n)return"You must provide a name for your extension"}});if(a.isCancel(i))throw new Error("USER_CANCELLED");return d(i)},pm:()=>e.pm?Promise.resolve(e.pm):a.select({message:"Package Manager",options:[{value:"pnpm",label:"pnpm",hint:"recommended"},{value:"npm",label:"npm"},{value:"yarn",label:"yarn"},{value:"bun",label:"bun"}],initialValue:"pnpm"}),linter:()=>e.linter?Promise.resolve(e.linter):a.select({message:"Linter and Formatter",options:[{value:"oxlint",label:"Oxlint and Oxfmt",hint:"recommended"},{value:"biome",label:"Biome"},{value:"eslint",label:"ESLint, Prettier, Stylelint"}],initialValue:"oxlint"}),skipGit:()=>e.skipGit!==void 0?Promise.resolve(e.skipGit):a.confirm({message:"Skip initializing a git repository?",initialValue:!1})},{onCancel:()=>{throw new Error("USER_CANCELLED")}});return{name:t.name,pm:t.pm,linter:t.linter,skipGit:t.skipGit,skipInstall:e.skipInstall??!1,quiet:!1}}import*as p from"@clack/prompts";import j from"degit";import{execa as c}from"execa";import C from"path";import o from"picocolors";var N="Flash-Brew-Digital/webflow-extension-starter#template";async function E(e){let t=C.resolve(process.cwd(),e.name),i=e.quiet?()=>{}:console.log;if(await h(t)){if(e.quiet)throw new Error(`Directory "${e.name}" already exists!`);let r=await p.confirm({message:`Directory "${e.name}" already exists. Overwrite?`,initialValue:!1});if(p.isCancel(r)||!r)throw new Error("USER_CANCELLED")}let n=e.quiet?null:p.spinner();n?.start("Cloning the built-in template...");try{await j(N,{cache:!1,force:!0}).clone(t),n?.stop("Template cloned!")}catch(r){throw n?.stop("Sorry, we could not clone the template"),r}if(n?.start("Configuring your extension..."),!(e.pm==="npm"?!0:await c(e.pm,["--version"]).then(()=>!0).catch(()=>!1))&&(await c("npm",["install","-g","-s",e.pm])).failed)throw n?.stop(`Sorry, we could not install ${e.pm}. Please install it manually and try again.`),new Error(`Failed to install ${e.pm}`);try{await b(t,e.name,e.pm),await x(t,e.name),n?.stop("Extension configured!")}catch(r){throw n?.stop("Sorry, we could not configure the extension"),r}n?.start("Setting up your linter and formatter...");try{let r,l=[];if(e.pm==="npm")r="npx";else if(e.pm==="bun")r="bunx";else if(e.pm==="yarn"){let{stdout:s}=await c("yarn",["--version"]),m=s.startsWith("1.");r=m?"npx":"yarn",l=m?[]:["dlx"]}else r=e.pm;await c(r,[...l,"ultracite","init","--linter",e.linter,"--pm",e.pm,"--editors","vscode","--quiet"],{cwd:t}),n?.stop("Linter and formatter set up!")}catch(r){throw n?.stop("Sorry, we could not set up the linter and formatter"),r}if(!e.skipGit){n?.start("Initializing git repository...");try{if((await c("git",["--version"])).failed){n?.stop("Git is not installed, skipping git initialization. Visit https://git-scm.com/install/ to install it.");return}await c("git",["init"],{cwd:t}),n?.stop("Git repository initialized!")}catch{n?.stop("Sorry, we could not initialize a git repository")}}if(!e.skipInstall){n?.start(`Installing dependencies with ${e.pm}...`);try{await c(e.pm,["install"],{cwd:t}),n?.stop("Dependencies installed!")}catch(r){throw n?.stop("Sorry, we could not install the dependencies"),r}}e.quiet||(p.outro(o.green("Your extension is ready to go!")),i(""),i(o.bold(" To get started:")),i(""),i(` ${o.cyan("cd")} ${e.name}`),e.skipInstall&&i(` ${o.cyan(`${e.pm} install`)}`),i(` ${o.cyan(`${e.pm} dev`)}`),i(""),i(o.bold(" Then in Webflow:")),i(""),i(o.dim(" 1. Open your Webflow workspace settings")),i(o.dim(" 2. Navigate to Apps & Integrations \u2192 Develop")),i(o.dim(" 3. Click Create an App and configure it accordingly")),i(o.dim(" 4. Open a project in the Designer")),i(o.dim(" 5. Press E to open the apps panel and launch your extension")),i(""))}var O="1.0.0",_=`
${w.bold(w.cyan("Create Webflow Extension"))}

@@ -8,0 +8,0 @@ ${w.dim("Scaffold a new Webflow Designer Extension project with a built-in template.")}

{
"name": "create-webflow-extension",
"displayName": "Create Webflow Extension",
"version": "0.0.0",
"version": "1.0.0",
"description": "Scaffold a new Webflow Designer Extension project with a built-in template.",

@@ -6,0 +6,0 @@ "keywords": [