Install package in other folder


Hi ! We have project: and specific hightliter for it in dependencies part (package.json):

"language-cos": "git+"

but it’s installed in node_modules folder and not worked because Atom can’t see folder node_modules\language-cos\grammar. And if i move grammar folder directly in “%user%/.atom/packages/atom-language-cos” or install atom-language-cos separatly all works well.
Question - how i can automaticly install atom-language-cos package in other folder?


There’s currently no way to depends on other Atom package.


You should just advice users that your package is intended to use with some other packages.


May be have other way? like that:

Can i load grammar from different folders when my package just installed?


Never tried that, but seems like it could work.


Why is it you need to install a grammar in a non-standard folder? What is wrong with the default way of doing things?


Because in our case package with grammar installed in subfolder - we have two dependent peojects:
first - COS syntax hightliter (or language-cos if install it from Atom)
second - primary project (for work with InterSystems Caché) (Atom-COS-Studio in Atom )
that used syntax hightliter from first project, by select link on it in package,json. In this case first project installed in node_modules/language-cos folder, and Atom don`t see grammar, but if i replace grammar folder in Atom-COS-Studio root folder - grammar worked well.
… may be the Atom have other ways to select package with grammar for our file types?


I understand that you see them as linked … but what functionality is broken in Atom-COS-Studio if language-cos is not installed?



  1. syntax highliter not worked
  2. files shows in plaintext mode
  3. when i press on plaintext link i can`t see COS language (and other languages from language-cos package)
    other linked modules work well


in perspective we planed add autocomplete, context menu and other featuers like “go to class definition” based on language-cos package, for example we need to know where class name or class body placed in text.


Items one through three are things that won’t work because language-cos aren’t installed, but they don’t appear to be features of Atom-COS-Studio except in a “we intend this all to be one big package” sort of way.

Ok, this is the part that perhaps wouldn’t work … though it sounds like the features you’re planning may require a bit more knowledge about the grammar than what the syntax highlighter is designed to handle.

I think it goes back to @abe’s answer of that there isn’t a supported way of making what you want happen. I’d recommend just creating an installation script that installs Atom, your Studio package and language-cos all as one logical operation.