Open enuchi opened 6 years ago
@enuchi Thanks. I am trying to use your tern-googleappsscript I noticed that npm doc shows
// .tern-project
{
"libs": [
],
"plugins": {
"googleappsscript"
}
}
but should likely be this i think
// .tern-project
{
"libs": [
],
"plugins": {
"googleappsscript": {}
}
}
Either way, i am getting this error I cannot resolve when trying to setup in atom with ternjs setup
atom-ternjs Cannot find module 'tern/lib/"infer'"
my .tern-project file is:
{
"ecmaVersion": 6,
"libs": [
"browser"
],
"loadEagerly": [
"./Add-on/*.gs"
],
"dontLoad": [],
"plugins": {
"node": {},
"doc_comment": true,
"googleappsscript": {},
"modules": {
"dontLoad": "",
"load": "",
"modules": ""
}
}
}
Any ideas or suggestions? Thank you @aki2o Any suggestions, sir?
Yes, you're right about the .tern-project file. Is tern installed globally? Locally? And where is atom's version of tern installed?
this is the atom install https://github.com/tststs/atom-ternjs
the readme has some instructions there about Third party plugins where they are an issue....trying to sort that out
Until tern-gas is in npm, using https://www.npmjs.com/package/tern-googleappsscript
These have to be installed inside atom in addition to the .tern-project file.
SO, per https://github.com/tststs/atom-ternjs
readme on Third party plugins
cd ~/.atom/packages/atom-ternjs
npm install tern-googleappsscript
Getting warning: npm WARN tern-googleappsscript@1.0.2 requires a peer of tern@0.22.3 but none is installed. You must install peer dependencies yourself. What is required? @enuchi
Would you be able to publish
tern-gas
on npm? If not I am happy to set it up.I've temporarily set up
tern-googleappsscript
on npm to host the plugin only. See here, with minor modifications. I've temporarily included it in my React + Google Apps Script project, but if you set uptern-gas
on npm I'm happy to update my project and reference your npm package.The reason for adding to npm is it would be nice to install
tern-gas
to individual projects, not globally, using simple commandnpm install tern-gas
, then adding.tern-project
file to project root directory like this:Tern documentation: