Negligent Parachute Maintainers

    @devasolutions/bring-me

    0.3.9 • Public • Published

    bring-me

    npm (scoped) npm

    NPM CLI tool for delivering common front-end libraries, frameworks, stylesheets, etc. for lightweight and easy development without needing them stored in node_modules or when internet connection could be a problem in the future.

    Install

    Install globally with NPM: npm install -g @devasolutions/bring-me

    Or install in development: npm install --save-dev @devasolutions/bring-me

    Introduction

    Bring-me is a CLI tool used to download popular frameworks from there CDNs so that you can use them offline when needed in mostly Front-End Development scenerios

    Summary:

    Bring-me scans a bmconfig.json file inside the module's directory to get the most popular frameworks and libraries (bootstrap,bulma,jquery,lodash,phaser at the moment).

    bmconfig.json example:

    [
      {
        "url": "https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.js",
        "file-name": "jquery.js",
        "lib-name": "jquery",
        "format": "js",
        "version": "3.6.0"
      },
      ...
    ]

    bmconfig.json fields:

    url: (contains the url of the library from cdn) file-name: (the name of the library with extension) lib-name: (library name with out extension) format: (in which format is the file (js,css,html,etc.)) version (version of the file that has been added)

    _ Note: _ The bmconfig.json file is embedded inside the module's directory and the program cannot read a bmconfig.json in the current working directory. If you want to edit the bmconfig.json manually you have to go to ´node_modules/@devasolutions/bring-me/bmconfig.json`.

    From this config file you can run the following V0.3.0 bring-me commands:

    Bring-me Commands

    bring-me lib [-d,--dir ]

    Running:

    $ bring-me lib <lib-name>

    Will download the library into your project root directory.

    Running:

    $ bring-me lib <lib-name> [-d, --dir <directory>]

    Will download the library into your project with the directory you specified.

    bring-me add [-n, --info ] [-c, --cdn ] [-i, --include [directory]]

    Running:

    $ bring-me add [-n, --info <library-and-version...>]

    Will add the specified library and version to the bmconfig.json file, but will not be downloaded yet. _ Important: _ it is important to just put 2 arguments library-name and version or the program won't add the library to the bmconfig.json file.

    Running:

    $ bring-me add [-c, --cdn <cdn>]

    Will add the specified library from the CDN URL into the bmconfig.json. _ Important: _ it is important to know that V0.3.0 just parses jsdelivr.com CDNs. In later versions, more CDNs URLs will be added

    Running:

    $ bring-me add [-n, --info <library-and-version>] [-c, --cdn <cdn>] [-i, --include [directory]]

    Will add the specified library to the bmconfig.json file and will download the file to the current working directory. if [directory] is specified then it will download the specified library to the specified [directory].

    bring-me list

    Running:

    $ bring-me list

    Will list your libraries and versions added in the bmconfig.json file.

    bring-me rm [library] [version] [-r, --restart]

    Running:

    $ bring-me rm

    Will remove all libraries from bmconfig.json. When saying 'remove', the bmconfig.json file becomes an empty array ([]).

    Running:

    $ bring-me rm [library] [version]

    Will remove the specified library and version from the bmconfig.json file.

    Running:

    $ bring-me rm [-r, --restart]

    Will restart the current bmconfig.json to its default saved libraries: (bootstrap, lodash, bulma, phaser, jquery).

    Conclusion

    The purpose of this app is to not be dependent of node_modules when you need some simple application since node_modules can become really heavy and complex during your projects, which means that if you only want to include your files to a simple .html, you can safely add them by only running the "bring-me" command.

    Contribute

    You are free to contribute and add functionalities to the librrary if you want, and I will consider them in later releases

    Much Obliged (the-unfactoring-guru)

    Install

    npm i @devasolutions/bring-me

    DownloadsWeekly Downloads

    3

    Version

    0.3.9

    License

    MIT

    Unpacked Size

    19.4 kB

    Total Files

    12

    Last publish

    Collaborators

    • 4tydev