Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Guide. #10

Open
RevenantOne opened this issue Oct 12, 2015 · 17 comments
Open

Install Guide. #10

RevenantOne opened this issue Oct 12, 2015 · 17 comments

Comments

@RevenantOne
Copy link

I'm pretty new to this. Only used Visual Studio before so I'm not sure how to go about this.
Could you explain what IDE's are supported and how to install this?

Thank you.

@Zinal001
Copy link
Contributor

Most IDE's can handle this pretty easy.
I'm not sure but I do believe Visual Studio 2015 can handle javascript files.
Other IDE's that I know works are Eclipse and JetBrains WebStorm. I personally use WebStorm, but it's not free. Eclipse works perfectly with this as well.

You might want to download Github's client as well, since these files get updated once in a while.
I've forgotten to update these files so they are not 100% accurate with Screeps right now, but I'm gonna update them as soon as possible.
Nevermind that. As soon as Garethp accepts my pull request the documentation will be up-to-date with the current version of Screeps.

How to "install" this depends on what IDE you decide to use.

@RevenantOne
Copy link
Author

I've only ever really used Visual Studio (the free versions) before. I'm not sure if they count as IDE's, but I've been looking at Sublime Text 3 and Visual Studio Code recently. Is it possible to install for these?

If not, could you explain how to install it for Eclipse?

Cheers

@Zinal001
Copy link
Contributor

I tried both Sublime Text 3 and Visual Studio Code, but couldn't get them to work properly (They might work, but I have no idea on how to do it).

If you are going to use Eclipse I recommend downloading it from Here.

Setting up Eclipse is quite easy.
First, Install it (Make sure it is the Javascript Web Developers edition!).
Start it and then create a new JavaScript Project. (File -> New -> JavaScript Project).
Name the project whatever you want and then press Finish.
Once done, you'll see "Script Explorer" on the left side. (You might have to close the Welcome window first).
Expand the folder with your project's name and right-click JavaScript Resources. Then click Properties.

A new window opens. Make sure you are on the "Libraries" tab and click the Add JavaScript Library button.

Another window. Select "User Library" and then next.
On the next screen press "Configure User Libraries..." button.

Now the "User Libraries" window opens. Press new and name your new library whatever you want (I usually go with ScreepsAutocomplete, but choose whatever you want, it's not important).

Now select the library you just made and click the "add folder..." button.
Select the folder for this GitHub project (or where you extracted the files, if you downloaded them manually).

Now press OK, Finish then OK again (to close all open windows).
If you expand the "JavaScript Resources" now you should see your library's name.

All setup and done!
Create a new javascript file (I usually start with main.js, which is the main file on Screeps) and codes from there.

@Garethp
Copy link
Owner

Garethp commented Oct 13, 2015

Thanks @Zinal001 I'm going to admit, I have no idea how to get this running in Visual Studio, and I don't run Windows at the moment so I can't give it a test. If you're keen on staying in Studio, this is about the only resource I could find with a quick google search on adding it to Visual Studio. Maybe in a bit I'll write an install guide for Jetbrains, Eclipse and Sublime in the README.md of this project

@sebb7y
Copy link

sebb7y commented Jul 5, 2016

Maybe in a bit I'll write an install guide for Jetbrains, Eclipse and Sublime in the README.md of this project

Will you do this? or could you just quickly tell me how you could make this work with sublime - if you indeed can.

@Garethp
Copy link
Owner

Garethp commented Jul 6, 2016

Hi

Yeah, there's been a fair delay. I haven't used this library, or played Screeps, in a very long time. But it seems it's getting a lot more attention now, so I'm looking in to it. For Sublime Text, it seems like the best way I've found so far is using a Sublime Text plugin called TernJS. Once you've installed this, having ScreepsAutocomplete in your folder (maybe under a lib folder?) should give you autocompletion. I'm looking at how to get more detailed documentation to show up with it though

@ZeekDaGeek
Copy link

I was completely unable to get TernJS working with Sublime Text 3, here's an alternative:

  • Install Sublime Package Control: https://packagecontrol.io/installation
  • Press Ctrl + Shift + P to bring up the Sublime Command Terminal.
  • Select Package Control: Install Package and give it a second to load the list.
  • Type SublimeCodeIntel and install it.
  • Click on Preferences > Package Settings > SublimeCodeIntel > Settings -- User
  • Add the following to the (probably) blank file.
{
    /*
       Defines a configuration for each language.
    */
    "codeintel_language_settings": {
        "JavaScript": {
            "codeintel_scan_extra_dir": [],
            "codeintel_scan_exclude_dir":["/build/", "/min/"],
            "codeintel_scan_files_in_project": true,
            "codeintel_max_recursive_dir_depth": 2,
            "codeintel_selected_catalogs": ["jQuery"]
        }
    }
}
  • Save and relaunch and it should be working.

If you can tell me how to get Tern working I would be interested.

@Garethp
Copy link
Owner

Garethp commented Jul 8, 2016

Hm... I can't really say I did anything special to get TernJS working. All I did was copy ScreepsAutocomplete in to my project, then used PackageControl to install the TernJS plugin. Restarted my SublimeText, waited a minute or two to let the plugin boot up or whatever and then typed

var room = new Room();
room.loo

And let Autocompletion go to town. I'll add instructions for both TernJS and SublimeCodeIntel. I tried SublimeCodeIntel, but didn't know I had to modify the settings, so I was wondering why it didn't work

@Garethp
Copy link
Owner

Garethp commented Jul 8, 2016

Can't seem to make it work in Eclipse, but I've got VS and Sublime Text up, which seemed to be the most requested

@VirtualEvan
Copy link

Would be possible to make this work with atom?

@JanLauGe
Copy link

JanLauGe commented Sep 3, 2016

It does

On Sat, 3 Sep 2016, 20:14 Esteban Puentes, [email protected] wrote:

Would be possible to make this work with atom?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOTNWL7Wb1P3Y5g3uilCVSyiamo_6r3aks5qmcccgaJpZM4GNMSv
.

@Stiiiiz
Copy link

Stiiiiz commented Sep 27, 2016

Hello,
I've been trying to make this work with Adobe Brackets. I found an add-on for Brackets called Ternific but since i'm really not a specialist, i really have no idea how to make it work.. Any help would be greatly appreciated. Best

EDIT: Managed to make it work. Brackets didn't need the Ternific extension. Once I deactivated extension, it started working. xD

So, for Brackets, simply create a .tern-project file with (the code given for Atom IDE):

{
  "ecmaVersion": 6,
  "libs": [],
  "loadEagerly": [
  "ScreepsAutocomplete/**/*.js"
  ]
}

and place it in the "default" folder with your other Screeps files.

Thanks @Garethp for your work 👍

@Garethp
Copy link
Owner

Garethp commented Sep 29, 2016

Thanks @Leakimski I'll look at adding that to the readme

@R00tD00m
Copy link

still can't get this to work in Atom... :( the package " atom-ternjs" doesn't seem to exist in the Atom package repository :(

@VirtualEvan
Copy link

Console: apm install atom-ternjs
That should work, then just follow the readme

@SlasherZet
Copy link

I can't get the autocomplete working with Eclipse...
Adding it to libraries as described by Zinal001 does nothing, neither does copying the folder to the project. I'm at a loss... can somebody suggest how to make it work?

@lerugray
Copy link

lerugray commented Nov 4, 2017

I've tried all these suggestions, for the life of me, I can't get this to work in sublime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests