Skip to content

prophecy/wpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wpm (Wonder Package Manager)

wpm is very personal package manager for general purpose. wpm make developer be possible to download packages (Following wonderconf.json) and run package script (Following conf.json). For example developer can inject any file from package to one's project.

Structure

Executable files

wpm
wpmPackageInit

Project structure and configurations

wonderconf.json
wonder_modules/
---- [module_name]/
------ conf.json

Sample

wpm install -clean
wpm run wonderSample

Sample configurations

For Android

{
  "Android": [
    {
      "command": "settings.gradle",
      "upsert": "awesomelib"
    },
    {
      "command": "copy",
      "src": "./Src/awesomelib/",
      "dst": "./awesomelib/"
    }
  ]
}

For Node.js HTTP Server (WonderHttpServer)

{
  "node.js": [
    {
      "command": "copy",
      "src": "Sample/",
      "dst": ""
    },
    {
      "command": "exec",
      "parm": "npm install --prefix ./wonder_modules/WonderHttpServer/Core/"
    },
    {
      "command": "copy",
      "src": "Core/node_modules/",
      "dst": "node_modules"
    }
  ]
}

wonderconf.json for both above configurations

{
  "name": "WonderSystem",
  "description": "Simple Wonder System",
  "host": "http://wondersaga.com/wonder_modules/",
  "version": "0.0.1",
  "dependencies": {
    "Android": {
      "projectPath": "./MyProjectPath/",
      "TestGradleMod": "latest",
      "settingGradleSubPath": "/"
    },
    "node.js": {
      "projectPath": "./WonderHttpSample/",
      "WonderHttpServer": "latest"
    }
  }
}

Command list (Shown when type wpm help)

  • exec: Run OS command
    • -reverse_copy: Execute reverse copy
  • help: Show helpful info
  • install: Install package
    • -clean: Remove repository before downloading it.
  • npm: Call npm
  • run: Execute command(s) inside the package
  • uninstall: Uninstall package
  • update: Update package
  • version: Show wpm version
  • view: View package info