loadPlugins from vfs doesn't always work


#1
  1. what should I give in place of username : my userid to login c9 account (or) user permission who is working on workspace ?

  2. should i keep {} braces as given in the syntax or can I give username/workspace directly ?

I tried with all combination of username as mentioned in my first question, but it was not working

Thanks,
Siva.


Distributing and installing custom Cloud9 plugins
#2

c9.workspaceId is the part of url after ide.c9.io, so you can use a string which matches that, or you can skip the if and load plugins for all workspaces.
If other users are accessing your workspace, they need to add pluginManager.loadPackage call to their init scripts.


#3

I kept below code in init.js file, but still it is not working :

alert(“hello”);
services.pluginManager.loadPackage([
"~/.c9/plugins/my.own.plugins/dragndrop.js"
]);

but alert box came at the time of loading


#4

what is in "~/.c9/plugins/my.own.plugins/dragndrop.js" if it is an unpacked plugin use "~/.c9/plugins/my.own.plugins/package.json or run

npm install c9 -g
cd ~/.c9/plugins/my.own.plugins
c9 build

and use "~/.c9/plugins/my.own.plugins/package.my.own.plugins.js


#5

my folder structure is like :

~/.c9/plugins/my.own.plugin/dragndrop.js
~/.c9/plugins/my.own.plugin/installed.js
~/.c9/plugins/my.own.plugin/dragndrop_test.js
~/.c9/plugins/my.own.plugin/package.json
~/.c9/plugins/my.own.plugin/README.md

so it is packed plugin I belive, so no need to use package.json, I opened and saw package.json content is like :

{
“name”: “”,
“description”: “”,
“version”: “0.0.1”,
“author”: “”,
“contributors”: [
{
“name”: “”,
“email”: “”
}
],
“repository”: {
“type”: “git”,
“url”: “”
},
“plugins”: {
“dragndrop”: {}
},
“categories”: [“miscellaneous”],
“licenses”: []
}

NOTE: In the same path I have another plugin that is working fine.


#6

the old __installed__.js is not used anymore, so you need to use package.json, or run c9 build again.


#7

I used installed.js file and worked fine.

content of the installed.js file is :

define(function(require, exports, module) {

 return [
     "plugins/my.own.plugin/dragndrop",
 ];

});

Thank you harutyun.


#8

hey harutyun,

Did you done anything on cloud9 servers, now it is not working with intalled.js file ?


#9

even package.json is not working