My plugin can't auto start


#1

My plugin https://github.com/mcheung63/make-runner-panel can’t auto start, every time i press ctrl+option+command+l to reload atom, it just don’t start automatically.
Please tell me how to fix.
thanks


#2

Remove the activationCommands: from your package.json. Using it will only load your package after the activation command has been triggered.


#3

Hi, i don’t even have that in my package.json, here is the content:

{
  "name": "make-runner-panel",
  "main": "./lib/make-runner-panel",
  "version": "0.19.0",
  "description": "Run make command",
  "keywords": [
      "make",
      "build"
  ],
  "engines": {
    "atom": ">=0.174.0 <2.0.0"
  },
  "homepage": "https://github.com/mcheung63/make-runner-panel",
  "author": "Peter Cheung",
  "repository": {
    "type": "git",
    "url": "https://github.com/mcheung63/make-runner-panel"
  },
  "license": "MIT",
  "engines": {
    "atom": ">=1.0.0 <2.0.0"
  },
  "dependencies": {
      "atom-space-pen-views": "^2.0.3",
      "xregexp": "latest"
  },
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/mcheung63/make-runner-panel/issues"
  }
}

#4

Where do you have the package installed?


#5

When i am doing development, i create a soft link from ~/.atom/package to my package.


#6

Do you use the apm link command to ensure that the symlink is in the correct location? Because unless the package exists in either ~/.atom/packages/package-name or ~/.atom/dev/packages/package-name when running in Dev Mode, it won’t be loaded automatically.


#7

I just tried the apm link command, result is same. when i start atom, my package won’t activate.


#8

Well you had it in your repository when I looked at it at least.

Have you run apm install after linking it to install dependencies?


#9

Still negative, i have run “apm install”, after i restarted atom, the activate method still not called.
here is my source https://github.com/mcheung63/make-runner-panel , please help


#10

It is activating, it just isn’t doing what you want it to do. Here’s what I did:

  1. Cloned your repository to my normal development directory
  2. Changed into the root directory of the local repo
  3. Executed apm link --dev
  4. Executed apm install
  5. Added the line console.log "Test" as the first line in the package’s activate method
  6. Started Atom with atom --dev .
  7. Opened the developer tools
  8. Opened the Settings View and scrolled down to the make-runner-panel package (it’s at the bottom in the Development Packages section)
  9. Clicked the Disable button (which runs deactivate on the package)
  10. Clicked the Enable button (which runs activate on the package)

Expected and Actual: Test was printed to the console.

So activate is getting called. It probably is that you’re trying to create a view before the window is even displayed or something.


#11

Thanks Mr Leedohm, you saved me, thanks