Code Monkey home page Code Monkey logo

unirx_observabletween's Introduction

What is umm?

umm is an abbreviation Unity Module Manager, a management system for assets of Unity.

We call various assets aggregation as modules, and manage thier dependencies using yarn which is an upward compatible tool of npm which is a package management system in Node.js.

How to use?

To construct environment to use umm

Will explain the environment construction method to use umm.

  1. Install Node.js.
    • It is a good idea to install the latest version.
  2. Install yarn.

To retrieve modules

Will explain how to retrieve some modules in a Unity project already module managed by umm.

  1. Run yarn install command in the root directory of the Unity project for which you want to retrieve the modules.
  2. Modules are deploying under the Assets/Modules/ of the Unity project automatically.

To add modules

Will exprain how to add a module into a Unity project.

  1. Run yarn install command in the root directory of the Unity project for which you want to add the module.
  2. Module is deploying under the Assets/Modules/ of the Unity project, also create of update the files which named package.json and yarn.lock.
    • I strongly recommend to version control each manifest files which manage information of modules.

Name of modules

Module name specification method differs according to module publication destination.

Specify the npm registry such as npmjs.org
yarn add @$SCOPE/$MODULE
Specify the git repository such as GitHub
yarn add github:$ORGANIZATION/$REPOSITORY
Specify the tar ball URL directly
yarn add $TAR_BALL_URL
Specify the path to some local storage
yarn add file:$PATH_TO_MODULE

Versioning

Specify the version to be installed according to SemVer's rules

Please check the document of npm to specify the range of versions.

You can specify a range of versions for a git repository like GitHub if you use yarn.

yarn add "umm/cafu_core#^1.0.0"
                        ^^^^^^

To create modules

Create .umm-config.json

To create umm modules needs configuration file names .umm-config.json.

Replace placeholders in template when initialize module accoring to this file.

Write the configuration like below and put to your home directory.

{
  "scopes": {
    "@monry": {
      "repository": {
        "type": "<REPOSITORY_TYPE>",
        "host": "<REPOSITORY_HOST>",
        "group": "<REPOSITORY_GROUP>",
        "user": "<REPOSITORY_USER>"
      },
      "author": {
        "name": "<AUTHOR_NAME>",
        "email": "<AUTHOR_EMAIL>",
        "url": "<AUTHOR_HOMEPAGE>"
      },
      "license": "<DEFAULT_LICENSE>"
    }
  }
}

Means of parameters are defined below table.

Parameter Example Description
REPOSITORY_TYPE git Specify type of repository. Currently supported only git ๐Ÿ˜“
REPOSITORY_HOST github.com Specify hostname of repository.
REPOSITORY_GROUP monry Specify name of user or organization of repository.
REPOSITORY_USER git Specify ssh username of repository.
AUTHOR_NAME monry Specify name of author.
AUTHOR_EMAIL [email protected] Specify email of author.
AUTHOR_HOMEPAGE https://github.com/monry Specify homepage of author.
DEFAULT_LICENSE MIT Specify default license.

Prepare modules

  1. Executing the following command creates a template for the module.
    • Thanks @mattak !!
bash <(curl -L https://gist.githubusercontent.com/mattak/f95a8f4c8750ee61aea79ec09d87f659/raw/cb49f66f5a7747fa700b2e8fb57f386969e64b49/umm-create.sh)
  1. You can develop the module like normally Unity project.
    • Of cource, you can use other umm modules.
  2. Publish the module into some repository like GitHub.
    • But, you must deploy into private repository if your module includes paid assets or private codes.
    • You can contribute as contributer of umm if you want, so you can publish module in umm organizations.
    • I don't recommend to publish to npmjs.org with use npm publish command, because assets is not codes of Node.js.

Distribution destination of modules

The module can publishes into any destination which supported by npm, such as GitHub, BitBucket and local storage.

Versioning of modules

Versioning according to SemVer's rules.

If you publish a module to GitHub, you can think of it as a module version by setting the tag of SemVer notation as git tag.

By using the npm version command, you can changes version of package.json and run git tag command at the same time.

Links

README.md (Japanese)

unirx_observabletween's People

Contributors

fakestarbaby avatar milkcocoa avatar monry avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.