@ripple-ts/cli 0.3.25 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -146,4 +146,4 @@ export default defineConfig({
146
146
  });
147
147
  `);let n=i(e,`.vscode`);u(n,{recursive:!0});let r=JSON.stringify({"tailwindCSS.includeLanguages":{ripple:`html`},"tailwindCSS.classAttributes":[`class`,`className`],"files.associations":{"*.tsrx":`ripple`},"editor.quickSuggestions":{strings:!0}},null,` `);m(i(n,`settings.json`),r+`
148
148
  `)}else if(t===`bootstrap`){let t=`import 'bootstrap/dist/css/bootstrap.min.css';
149
- `+d(i(e,`src`,`index.ts`),`utf-8`);m(i(e,`src`,`index.ts`),t)}}function ni(e){let t={ripple:`latest`,"@ripple-ts/vite-plugin":`latest`,"@ripple-ts/prettier-plugin":`latest`,"@ripple-ts/eslint-plugin":`latest`,"@ripple-ts/eslint-parser":`latest`,"@ripple-ts/typescript-plugin":`latest`};if(e.dependencies)for(let[n,r]of Object.entries(t))e.dependencies[n]&&(e.dependencies[n]=r);if(e.devDependencies)for(let[n,r]of Object.entries(t))e.devDependencies[n]&&(e.devDependencies[n]=r)}function ri(e){e.scripts&&(e.scripts.format&&(e.scripts.format=`prettier --write .`),e.scripts[`format:check`]&&(e.scripts[`format:check`]=`prettier --check .`))}function ii(e){return{yarn:`yarn@4.0.0`,pnpm:`pnpm@9.0.0`,bun:`bun@1.3.0`}[e]||e}function ai(e,t){let n=[`.DS_Store`,`.git`,`.gitattributes`,`.gitignore`,`.gitlab-ci.yml`,`.hg`,`.hgcheck`,`.hgignore`,`.idea`,`.npmignore`,`.travis.yml`,`LICENSE`,`Thumbs.db`,`docs`,`mkdocs.yml`,`npm-debug.log`,`yarn-debug.log`,`yarn-error.log`,`yarnrc.yml`,`.yarn`],r=f(e).filter(e=>!n.includes(e)&&!/\.iml$/.test(e));if(r.length>0){console.log(`The directory ${Oe(t)} contains files that could conflict:`),console.log();for(let t of r)try{l(i(e,t)).isDirectory()?console.log(` ${A(t)}/`):console.log(` ${t}`)}catch{console.log(` ${t}`)}return console.log(),console.log(`Either try using a new directory name, or remove the files listed above.`),console.log(),!1}return!0}function oi(){let e=process.env.npm_config_user_agent;if(e){if(e.startsWith(`pnpm/`))return`pnpm`;if(e.startsWith(`yarn/`))return`yarn`;if(e.startsWith(`bun/`))return`bun`;if(e.startsWith(`npm/`))return`npm`}let t=process.env.npm_execpath;if(t){let e=t.toLowerCase().replace(/\\/g,`/`);if(e.includes(`pnpm`))return`pnpm`;if(e.includes(`yarn`))return`yarn`;if(e.includes(`bun`))return`bun`}return process.env.PNPM_HOME||process.env.PNPM_SCRIPT_SRC_DIR?`pnpm`:process.env.YARN_WRAP_OUTPUT||process.env.npm_config_yarn?`yarn`:process.env.BUN_INSTALL?`bun`:`npm`}async function si(e,t){if(console.log(),console.log(ke(`🌊 Welcome to Create Ripple App!`)),console.log(Ee(`Let's create a new Ripple application`)),console.log(),!e)e=await Jt();else{let t=Ae(e);t.valid||(console.error(De(`✖ ${t.message}`)),process.exit(1))}let r=o(process.cwd(),e);c(r)&&!ai(r,n(r))&&process.exit(1);let i=t.template;i?Fe(i)||(console.error(De(`✖ Template "${i}" not found`)),console.error(`Available templates: ${M().join(`, `)}`),process.exit(1)):i=await Yt();let a,s=oi();a=!t.packageManager&&!t.yes?await Xt(s):t.packageManager||s;let l;l=t.git===!1?!1:t.yes?!0:await Zt();let u=`vanilla`;t.yes||(u=await Qt()),console.log(),console.log(`Creating Ripple app in ${Oe(r)}...`),console.log();try{await $r({projectName:e,projectPath:r,templateName:i,packageManager:a,gitInit:l,stylingFramework:u}),ci(r,a),process.exit(0)}catch(e){let t=e;console.error(De(`✖ Failed to create project:`)),console.error(t.message),process.exit(1)}}function ci(e,t){let n=li(t),r=ui(t),i=a(process.cwd(),e);console.log(),console.log(Oe(`🎉 Success! Your Ripple app is ready to go.`)),console.log(),console.log(Te(`Next steps:`)),console.log(),console.log(` ${Oe(`1.`)} ${Ee(`cd`)} ${i}`),console.log(` ${Oe(`2.`)} ${Ee(n)}`),console.log(` ${Oe(`3.`)} ${Ee(r)}`),console.log(` ${Oe(`4.`)} visit: ${ke(`http://localhost:3000`)}`),console.log(` ${Oe(`5.`)} make changes in the: ${ke(`src/`)} directory`),console.log(),console.log(Te(`Need help? Check out:`)),console.log(` ${Ee(`•`)} README.md in your project folder`),console.log(` ${Ee(`•`)} Documentation: ${ke(`https://www.ripple-ts.com/docs/introduction`)}`),console.log(),console.log(`Happy coding! 🌊`),console.log()}function li(e){return{npm:`npm install`,yarn:`yarn install`,pnpm:`pnpm install`,bun:`bun install`}[e]||`npm install`}function ui(e){return{npm:`npm run dev`,yarn:`yarn dev`,pnpm:`pnpm dev`,bun:`bun dev`}[e]||`npm run dev`}const di=r(g(import.meta.url)),fi=JSON.parse(d(i(di,`../package.json`),`utf-8`)),pi=new ge;pi.name(`create-ripple`).description(`Interactive CLI tool for creating Ripple applications`).version(fi.version).helpOption(`-h, --help`,`Display help for command`),pi.argument(`[project-name]`,`Name of the project to create`).option(`-t, --template <template>`,`Template to use (default: basic)`).option(`-p, --package-manager <pm>`,`Package manager to use (npm, yarn, pnpm, bun)`).option(`--no-git`,`Skip Git repository initialization`).option(`-y, --yes`,`Skip all prompts and use defaults`).action(async(e,t)=>{try{await si(e,t)}catch(e){let t=e;console.error(De(`✖ Unexpected error:`)),console.error(t.message),process.exit(1)}}),process.on(`unhandledRejection`,e=>{console.error(De(`✖ Unhandled error:`)),console.error(e),process.exit(1)}),process.on(`SIGINT`,()=>{console.log(),console.log(De(`✖ Operation cancelled`)),process.exit(1)}),pi.parse();export{};
149
+ `+d(i(e,`src`,`index.ts`),`utf-8`);m(i(e,`src`,`index.ts`),t)}}function ni(e){let t={ripple:`latest`,"@ripple-ts/vite-plugin":`latest`,"@tsrx/prettier-plugin":`latest`,"@tsrx/eslint-plugin":`latest`,"@tsrx/eslint-parser":`latest`,"@ripple-ts/typescript-plugin":`latest`};if(e.dependencies)for(let[n,r]of Object.entries(t))e.dependencies[n]&&(e.dependencies[n]=r);if(e.devDependencies)for(let[n,r]of Object.entries(t))e.devDependencies[n]&&(e.devDependencies[n]=r)}function ri(e){e.scripts&&(e.scripts.format&&(e.scripts.format=`prettier --write .`),e.scripts[`format:check`]&&(e.scripts[`format:check`]=`prettier --check .`))}function ii(e){return{yarn:`yarn@4.0.0`,pnpm:`pnpm@9.0.0`,bun:`bun@1.3.0`}[e]||e}function ai(e,t){let n=[`.DS_Store`,`.git`,`.gitattributes`,`.gitignore`,`.gitlab-ci.yml`,`.hg`,`.hgcheck`,`.hgignore`,`.idea`,`.npmignore`,`.travis.yml`,`LICENSE`,`Thumbs.db`,`docs`,`mkdocs.yml`,`npm-debug.log`,`yarn-debug.log`,`yarn-error.log`,`yarnrc.yml`,`.yarn`],r=f(e).filter(e=>!n.includes(e)&&!/\.iml$/.test(e));if(r.length>0){console.log(`The directory ${Oe(t)} contains files that could conflict:`),console.log();for(let t of r)try{l(i(e,t)).isDirectory()?console.log(` ${A(t)}/`):console.log(` ${t}`)}catch{console.log(` ${t}`)}return console.log(),console.log(`Either try using a new directory name, or remove the files listed above.`),console.log(),!1}return!0}function oi(){let e=process.env.npm_config_user_agent;if(e){if(e.startsWith(`pnpm/`))return`pnpm`;if(e.startsWith(`yarn/`))return`yarn`;if(e.startsWith(`bun/`))return`bun`;if(e.startsWith(`npm/`))return`npm`}let t=process.env.npm_execpath;if(t){let e=t.toLowerCase().replace(/\\/g,`/`);if(e.includes(`pnpm`))return`pnpm`;if(e.includes(`yarn`))return`yarn`;if(e.includes(`bun`))return`bun`}return process.env.PNPM_HOME||process.env.PNPM_SCRIPT_SRC_DIR?`pnpm`:process.env.YARN_WRAP_OUTPUT||process.env.npm_config_yarn?`yarn`:process.env.BUN_INSTALL?`bun`:`npm`}async function si(e,t){if(console.log(),console.log(ke(`🌊 Welcome to Create Ripple App!`)),console.log(Ee(`Let's create a new Ripple application`)),console.log(),!e)e=await Jt();else{let t=Ae(e);t.valid||(console.error(De(`✖ ${t.message}`)),process.exit(1))}let r=o(process.cwd(),e);c(r)&&!ai(r,n(r))&&process.exit(1);let i=t.template;i?Fe(i)||(console.error(De(`✖ Template "${i}" not found`)),console.error(`Available templates: ${M().join(`, `)}`),process.exit(1)):i=await Yt();let a,s=oi();a=!t.packageManager&&!t.yes?await Xt(s):t.packageManager||s;let l;l=t.git===!1?!1:t.yes?!0:await Zt();let u=`vanilla`;t.yes||(u=await Qt()),console.log(),console.log(`Creating Ripple app in ${Oe(r)}...`),console.log();try{await $r({projectName:e,projectPath:r,templateName:i,packageManager:a,gitInit:l,stylingFramework:u}),ci(r,a),process.exit(0)}catch(e){let t=e;console.error(De(`✖ Failed to create project:`)),console.error(t.message),process.exit(1)}}function ci(e,t){let n=li(t),r=ui(t),i=a(process.cwd(),e);console.log(),console.log(Oe(`🎉 Success! Your Ripple app is ready to go.`)),console.log(),console.log(Te(`Next steps:`)),console.log(),console.log(` ${Oe(`1.`)} ${Ee(`cd`)} ${i}`),console.log(` ${Oe(`2.`)} ${Ee(n)}`),console.log(` ${Oe(`3.`)} ${Ee(r)}`),console.log(` ${Oe(`4.`)} visit: ${ke(`http://localhost:3000`)}`),console.log(` ${Oe(`5.`)} make changes in the: ${ke(`src/`)} directory`),console.log(),console.log(Te(`Need help? Check out:`)),console.log(` ${Ee(`•`)} README.md in your project folder`),console.log(` ${Ee(`•`)} Documentation: ${ke(`https://www.ripple-ts.com/docs/introduction`)}`),console.log(),console.log(`Happy coding! 🌊`),console.log()}function li(e){return{npm:`npm install`,yarn:`yarn install`,pnpm:`pnpm install`,bun:`bun install`}[e]||`npm install`}function ui(e){return{npm:`npm run dev`,yarn:`yarn dev`,pnpm:`pnpm dev`,bun:`bun dev`}[e]||`npm run dev`}const di=r(g(import.meta.url)),fi=JSON.parse(d(i(di,`../package.json`),`utf-8`)),pi=new ge;pi.name(`create-ripple`).description(`Interactive CLI tool for creating Ripple applications`).version(fi.version).helpOption(`-h, --help`,`Display help for command`),pi.argument(`[project-name]`,`Name of the project to create`).option(`-t, --template <template>`,`Template to use (default: basic)`).option(`-p, --package-manager <pm>`,`Package manager to use (npm, yarn, pnpm, bun)`).option(`--no-git`,`Skip Git repository initialization`).option(`-y, --yes`,`Skip all prompts and use defaults`).action(async(e,t)=>{try{await si(e,t)}catch(e){let t=e;console.error(De(`✖ Unexpected error:`)),console.error(t.message),process.exit(1)}}),process.on(`unhandledRejection`,e=>{console.error(De(`✖ Unhandled error:`)),console.error(e),process.exit(1)}),process.on(`SIGINT`,()=>{console.log(),console.log(De(`✖ Operation cancelled`)),process.exit(1)}),pi.parse();export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ripple-ts/cli",
3
- "version": "0.3.25",
3
+ "version": "1.0.0",
4
4
  "description": "Interactive CLI tool for creating Ripple applications",
5
5
  "type": "module",
6
6
  "license": "MIT",