Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stagas/pull-configs

pulls configuration files from a remote location and merges them with local
https://github.com/stagas/pull-configs

config dotfiles package project scripts

Last synced: 6 days ago
JSON representation

pulls configuration files from a remote location and merges them with local

Awesome Lists containing this project

README

        


pull-configs

pulls configuration files from a remote location and merges them with local



npm i pull-configs

pnpm add pull-configs

yarn add pull-configs

## API

# pullConfigs(remote, local) src/index.ts#L22

    # remote


      string

    # local

      string


    pullConfigs(remote, local)  =>


      {

      # assign src/index.ts#L89


        {


        # target

        # source


        <T, U>(target, source)  =>



      # target
      # source1
      # source2

      <T, U, V>(target, source1, source2)  =>




# target # source1 # source2 # source3

<T, U, V, W>(target, source1, source2, source3)  =>

# target

    object

# sources

    any []

(target, sources)  =>

    any
} # merge src/index.ts#L89

    # (file, replacer)

      # file


        string

      # replacer(prev, next)

        # prev


          any

        # next

          any


        replacer(prev, next)  =>


          void


(file, replacer)  =>


    Promise<void>
# omit src/index.ts#L89

    # (obj, keys)

      # obj


        Record<string, any>

      # keys

        string []


      (obj, keys)  =>



        Record<string, any>

# pick src/index.ts#L89

    # (obj, keys)

      # obj


        Record<string, any>

      # keys

        string []


      (obj, keys)  =>



        Record<string, any>

# replace src/index.ts#L89

    # (file)

      # file


        string


      (file)  =>



        Promise<void>

# sort src/index.ts#L89

    # (data)

      # data


        any


      (data)  =>


        any

} # pullConfigs(remote, local) src/index.ts#L22

    # remote


      string

    # local

      string


    pullConfigs(remote, local)  =>


      {

      # assign src/index.ts#L89


        {


        # target

        # source


        <T, U>(target, source)  =>



      # target
      # source1
      # source2

      <T, U, V>(target, source1, source2)  =>


      # target
      # source1
      # source2
      # source3

      <T, U, V, W>(target, source1, source2, source3)  =>


      # target

        object


      # sources

        any []

      (target, sources)  =>


        any
      }

# merge src/index.ts#L89

    # (file, replacer)

      # file


        string

      # replacer(prev, next)

        # prev


          any

        # next

          any


        replacer(prev, next)  =>


          void


(file, replacer)  =>


    Promise<void>
# omit src/index.ts#L89

    # (obj, keys)

      # obj


        Record<string, any>

      # keys

        string []


      (obj, keys)  =>



        Record<string, any>

# pick src/index.ts#L89

    # (obj, keys)

      # obj


        Record<string, any>

      # keys

        string []


      (obj, keys)  =>



        Record<string, any>

# replace src/index.ts#L89

    # (file)

      # file


        string


      (file)  =>



        Promise<void>

# sort src/index.ts#L89

    # (data)

      # data


        any


      (data)  =>


        any

}

## Credits

- [json-diff](https://npmjs.org/package/json-diff) by [Andrey Tarantsov](https://github.com/andreyvit) – JSON diff

## Contributing

[Fork](https://github.com/stagas/pull-configs/fork) or [edit](https://github.dev/stagas/pull-configs) and submit a PR.

All contributions are welcome!

## License

MIT © 2022 [stagas](https://github.com/stagas)