New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

rolib-cli

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rolib-cli

A rollup cli: create a dev-environment includes Rollup, TypeScrit, Babel, Git, ESlint, Prettier...

latest
Source
npmnpm
Version
1.2.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

rolib-cli 🎉

A rollup cli : create a dev-environment includes Rollup, TypeScrit, Babel, Git, ESlint, Prettier...

🚀 Quick Start

npx rolib-cli my-app
cd my-app
npm start

If you've previously installed  rolib-cli  globally via  npm install -g rolib-cli , we recommend you uninstall the package using  npm uninstall -g rolib-cli  or  yarn global remove rolib-cli  to ensure that  npx  always uses the latest version.

(npx comes with npm 5.2+ and higher, see instructions for older npm versions)

🎨 Output

my-app
 ├─ .git/
 ├─ .husky/
 ├─ node_modules/
 ├─ src
 │ └─ index.ts
 ├─ .cz-config.js
 ├─ .eslintignore
 ├─ .eslintrc.js
 ├─ .gitignore
 ├─ .prettierignore
 ├─ .prettierrc.js
 ├─ babel.config.js
 ├─ commitlint.config.js
 ├─ package-lock.json
 ├─ package.json
 ├─ rollup.config.ts
 └─ tsconfig.json

✏️ extend

We can add some dev-libs by enriching installFeatures.

Example

// src/utils/installName.ts
// you need to prefix "install" in the filename
// "Name" is the value that user select feature via inquirer.prompt

export async function installName(){
    // code...
}
// src/utils/index.ts

import { installName } from './installName'

export const installMethods = {
    installName,
}
// src/utils/initPro.ts

export async function selectFeature() {
    const questions: inquirer.Answers = [
        {
          type: 'checkbox',
          name: 'multiple',
          choices: [
            {
              name: 'Install Name1?',
              value: 'Name1',  // relate to installName1
              checked: true,
            },
            {
              name: 'Install Name2?',
              value: 'Name2', // relate to installName2
            },
          ],
        },
        {
          type: 'confirm',
          name: 'Name3',
          message: 'Install Name3 ?', // relate to installName3
          default: true,
        },
    ];
    const answers = await inquirer.prompt(questions);

    const features = [...(answers.multiple|| [])]; // type checkbox

    const confirmIds: string[] = []; // type confirm

    questions.slice(1).forEach(q => {
        q.type === 'confirm' && confirmIds.push(q.name);
    });

    confirmIds.forEach(v => {
        answers[v] && features.push(v);
    });

    await installFeatures(features);
}

👔 Author

Jay-Ohhh

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check [issues page](Issues · Jay-Ohhh/rolib-cli · GitHub). You can also take a look at the contributing guide.

✨ Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 Jay-Ohhh.

This project is MIT licensed.

Keywords

cli

FAQs

Package last updated on 26 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts