Scripts for umm modules.
- init
- generate_assembly_definition
- module/install
- module/uninstall
- project/deploy
- project/remove
- info
- synchronize
{
  "scripts": {
    "umm:init": "umm-init",
    "umm:generate_assembly_definition": "umm-generate_assembly_definition",
    "umm:module:install": "umm-module-install",
    "umm:module:uninstall": "umm-module-uninstall",
    "postinstall": "npm run --silent umm:module:install",
    "postuninstall": "npm run --silent umm:module:uninstall"
  },
}- Automatic deployment by umm:module:install.
- Copy assets to Assets/Modules/<module_name>/fromAssets/in modules excepts listed in.npmignore.
{
  "scripts": {
    "umm:init": "umm-init",
    "umm:generate_assembly_definition": "umm-generate_assembly_definition",
    "umm:module:install": "umm-module-install",
    "umm:module:uninstall": "umm-module-uninstall",
    "postinstall": "npm run --silent umm:module:install Foo Bar",
    "postuninstall": "npm run --silent umm:module:uninstall"
  },
}- Specify command line arguments to umm:module:install.
- Copy assets to Assets/Modules/<module_name>/Foo/andAssets/Modules/<module_name>/Bar/fromFoo/andBar/in modules excepts listed in.npmignore.
- You can specify one or more argument.
{
  "scripts": {
    "umm:init": "umm-init",
    "umm:generate_assembly_definition": "umm-generate_assembly_definition",
    "umm:module:install": "umm-module-install",
    "umm:module:uninstall": "umm-module-uninstall",
    "postinstall": "npm run --silent umm:module:install && node ./scripts/postinstall.js",
    "postuninstall": "npm run --silent umm:module:uninstall"
  },
}- Append calling script into postinstallsection if you need to customized deploy.
{
  "scripts": {
    "umm:init": "umm-init",
    "umm:generate_assembly_definition": "umm-generate_assembly_definition",
    "umm:project:deploy": "umm-project-deploy",
    "umm:project:remove": "umm-project-remove",
    "postinstall": "npm run --silent umm:project:deploy",
    "postuninstall": "npm run --silent umm:project:remove"
  },
}- Automatic deployment by umm:project:deploy
- Copy assets to Assets/Projects/<module_name>/fromAssets/in modules excepts listed in.npmignore.
const umm = require('@umm/scripts');
umm.libraries.synchronize("path/to/source", "path/to/destination");- You can generate .asmdeffile for module.- See also: Unity Manual
 
- Simply run npm run umm:generate_assembly_definition.
- Append referencesnode automatic from dependencies ofpackage.json.
- Synchronize assets flexiblly.
| Argument | Type | Description | 
|---|---|---|
| source_path | {String} | Copy source path | 
| destination_path | {String} | Copy destination path | 
| patterns | `{Array<String | Object>}` | 
| overwrite_options | {Object} | Overwrite default options | 
| callback | {Function} | Callback function | 
| Key | Type | Description | Default | 
|---|---|---|---|
| pattern | {String} | Designation patterns as glob. | - | 
| overwrite | {Boolean} | Overwrite files if already exists. | true | 
| remove_source | {Boolean} | Remove source files when finish copy. | false | 
| remove_empty_source_directory | {Boolean} | Remove empty directory in source path after finish processing remove_source. | false | 
| remove_deleted_files | {Boolean} | Remove files that do not exist on the source path. | false | 
- Parameters are ignored if specified by patterns.
| Key | Type | Description | Default | 
|---|---|---|---|
| overwrite | {Boolean} | Overwrite files if already exists. | true | 
| remove_source | {Boolean} | Remove source files when finish copy. | false | 
| remove_empty_source_directory | {Boolean} | Remove empty directory in source path after finish processing remove_source. | false | 
| remove_deleted_files | {Boolean} | Remove files that do not exist on the source path. | false | 
- Information of module as JavaScript Object.
| Key | Type | Description | 
|---|---|---|
| npm_package_name | {String} | Name of npm package. | 
| has_scope | {Boolean} | Package name has scope? (Package name has @character if scoped.) | 
| development_install | {Boolean} | Set trueif installation process is development. | 
| module_name | {String} | Module name. | 
| scope | {String} | Scope of module. | 
| name | {String} | Name of module. | 
| package_path | {String} | Path to package install. | 
| base_path | {String} | Path of project. | 
{
  npm_package_name: "@umm/sample_module",
  has_scope: true,
  development_install: false,
  module_name: "umm@sample_module",
  scope: "umm",
  name: "sample_module",
  package_path: "/Users/monry/Development/git/monry/some_project/node_modules/@umm/sample_module",
  base_path: "/Users/monry/Development/git/monry/some_project",
}Copyright (c) 2018 Tetsuya Mori
Released under the MIT license, see LICENSE.txt