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

@happytiptoe/ape

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@happytiptoe/ape - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

2

bin/ape.js
#!/usr/bin/env node
import i from"fs-extra";import{dim as l,white as d}from"kolorist";import u from"node:path";import{fileURLToPath as g}from"node:url";import{addDevDependency as f}from"nypm";var o="0.1.1";import{red as a}from"kolorist";function n(t){throw new Error(a(`\u2716 ${t}`))}console.log(`Initialising ${l("@happytiptoe/")}${d("ape")} (${o})...`);async function m(){let t=["astro.config.js","astro.config.mjs","astro.config.cjs","astro.config.ts"],e=process.cwd(),s=!1;for(let r of t){let p=await i.exists(`${e}/${r}`);s=s||p}return s}async function y(){let t=["@typescript-eslint/parser","eslint","eslint-plugin-astro","eslint-plugin-jsx-a11y","prettier","prettier-plugin-astro"];console.log("\u203A Installing dependencies...");for(let e of t)await f(e,{silent:!0}),console.log(`\u203A ${e} installed successfully!`);console.log("\u203A Dependencies installed!")}async function h(){if(!await m()){n("ape must be ran inside an Astro project.");return}await y(),console.log("\u203A Copying file stubs...");let e=u.resolve(g(import.meta.url),"../../stubs");await i.copy(`${e}/eslint`,"./.eslintrc.cjs"),await i.copy(`${e}/prettier`,"./.prettierrc"),console.log("\u203A Stubs copied!"),console.clear(),console.log("\u{1F412} ESLint and Prettier are all good to go - happy coding!")}h().catch(t=>{console.error(t.message)});
import i from"fs-extra";import{dim as l,white as d}from"kolorist";import u from"node:path";import{fileURLToPath as g}from"node:url";import{addDevDependency as f}from"nypm";var o="0.2.0";import{red as a}from"kolorist";function n(t){throw new Error(a(`\u2716 ${t}`))}console.log(`Initialising ${l("@happytiptoe/")}${d("ape")} (${o})...`);async function m(){let t=["astro.config.js","astro.config.mjs","astro.config.cjs","astro.config.ts"],e=process.cwd(),s=!1;for(let r of t){let p=await i.exists(`${e}/${r}`);s=s||p}return s}async function y(){let t=["@typescript-eslint/eslint-plugin","@typescript-eslint/parser","eslint","eslint-plugin-astro","eslint-plugin-jsx-a11y","prettier","prettier-plugin-astro"];console.log("\u203A Installing dependencies...");for(let e of t)await f(e,{silent:!0}),console.log(`\u203A ${e} installed successfully!`);console.log("\u203A Dependencies installed!")}async function h(){if(!await m()){n("ape must be ran inside an Astro project.");return}await y(),console.log("\u203A Copying file stubs...");let e=u.resolve(g(import.meta.url),"../../stubs");await i.copy(`${e}/eslint`,"./.eslintrc.cjs"),await i.copy(`${e}/prettier`,"./.prettierrc"),console.log("\u203A Stubs copied!"),console.clear(),console.log("\u{1F412} ESLint and Prettier are all good to go - happy coding!")}h().catch(t=>{console.error(t.message)});
{
"name": "@happytiptoe/ape",
"version": "0.1.1",
"version": "0.2.0",
"type": "module",

@@ -5,0 +5,0 @@ "description": "Adds Prettier and ESLint to Astro Projects",

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