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.0.3 to 0.0.4

2

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

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

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