-
Notifications
You must be signed in to change notification settings - Fork 319
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
Tasks cleanup #44
Comments
A setup script that allowed selection of options would be excellent, e.g.
Even though these examples may be single line changes, it can be intimidating to find where to make them, especially while also dealing with the huge number of new things to install. |
I know this is about "clean-up", but if we are adding configurable options, I think the profiler should be considered as well |
@bryanbecker We could do that, yes. Speaking of which, do we want to make the logger (located in |
I think that having both the logger and profiler as selectable modules is an excellent idea. |
Perhaps a few question that should be decided first are:
|
I think we should really start assuming that the users have little to no knowledge of TypeScript, since we've already seen quite a few Screeps newcomers would come across this project (sometimes with even no prior knowledge of JS), wanting to know what this project is all about. In which case...
The readme that we currently have is the only guide that we have right now, and I have to admit that I'm not that good at writing guides. We should provide the bare essentials to get started on the readme, and use the currently-empty wiki as a community-maintained effort to provide some noob-friendly guides on how to get started on the starter kit itself, or in general (TypeScript, Screeps, etc.) |
I agree, we should assume very little knowledge. I am happy to write a guide for the wiki here, but I wonder - should we instead (also?) provide a guide on TS for the actual screeps website? |
I agree that we should approach it as a tool for beginners. I quite like the logger. It was useful to me as an example on how to use memory to store config data. It would be disappointing if it was moved to a separate where it may be ignored by beginners. Also, might want to keep the wiki ts-related. Considering the Screeps' wiki pays real $$ for contributions, the wiki here may not get too much use for Screeps content On a different topic, does the current set-up support webpack's "dead code elimination"? If so, we could take a much more configurable and user-friendly approach for some things by using build toggles |
Not at the moment, but it's a useful feature to have. |
Looking at brunch now... it provides "skeleton" features, which would make this project nicer Update: I no longer think brunch is a good choice for this project (see below). I'm looking into seeing how much we can get done with webpack alone
|
@bryanbecker Cool. I'm going to start experimenting on removing |
If anyone can provide a list of exactly what tasks the old gulpfile did, I think that would help in the rewrite |
@bryanbecker Here's what I could gather for now:
Let me know if you have any more questions! |
Also, I'm going to leave testing integration for someone else to do, but it should be fairly straightforward |
@resir014 OK, I think the PR is finished and documented (with exception of github/gitlab logging documentation). Let me know what you think. A few things of note (copied from my PR comment): Testing is not implemented whatsoever. I'm leaving that task to someone else who wants to test their screeps code (ha). I imagine it's extremely straightforward to set up, though. The webpack version of the source map / git interaction can not automatically pick up the repository path, as it did before. The path now needs to be manually set in the config. There are two large "TODO"s in the Readme where documentation on how to accomplish this needs to be added. Since I don't use this feature, I'm not sure how it should be set. The screeps-webpack-plugin is set to install from my fork, pending this PR: langri-sha/screeps-webpack-plugin#28 |
@bryanbecker re: testing - I've done some quick investigations to testing and found this file to be the culprit: https://github.com/screepers/screeps-typescript-starter/blob/master/test/mock/game.ts IIRC, what that file does is that it mocks the game constants located here We simply copied it over and saved it as a When I run the tests on That's what the TypeScript compiler kept complaining about whenever you have |
What's the right way to go here? Does the code need to fixed, or does the error need to be suppressed? I guess, that's asked "is this working as intended?" or a false error? |
@bryanbecker The thing is, if I think I'll see if I could fix the compile errors easily. If not, then we'll have to rewrite the entire testing framework. I'm looking into |
I took another look at those errors. I'm pretty sure the thrown error is working as intending. Those declarations don't look like they meet ex: // mock/game.ts
BODYPARTS_ALL: [
this.MOVE,
this.WORK,
this.CARRY,
this.ATTACK,
this.RANGED_ATTACK,
this.TOUGH,
this.HEAL,
this.CLAIM,
], Looks like you have a few ways to type a lazy way that might work is to just change it to: const gameConsts: ThisType<any> = { it's still typed as |
@bryanbecker I just tried using |
Besides testing support, is anything left with this issue (perhaps a cleaning of the docs)? Maybe close it and reopen a more specific issue referencing this one? |
Yeah, I think the general gist of this thread is all implemented, aside
from testing support and documentation. We could close and open a new issue
threads for the two.
…On Thu, 25 May 2017, 09:10 Bryan, ***@***.***> wrote:
Besides testing support, is anything left with this issue (perhaps a
cleaning of the docs)?
Maybe close it and reopen a more specific issue referencing this one?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#44 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFZshbITULicwZuReXOGsQf1GCMh1If3ks5r9OMtgaJpZM4NXcR1>
.
|
Our current gulpfile/tasks pipeline has grown too much it might be overwhelming for new users to get started with the starter kit. Rewriting the entire tasks system should be our main priority before upgrading to TS 2.3.
yo
generator perhaps?)gulp
for other better alternatives (purenpm
tasks/brunch
) (might have to ditch the flattened directory option)Look into usingWe might just use purebrunch
(idea: @bryanbecker)npm
tasks + Webpack after all.The text was updated successfully, but these errors were encountered: