Commit Graph

41 Commits

Author SHA1 Message Date
Kirk Scheibelhut
d76cd108dd Create test pages for sprites
Similar to styles/STYLING.html and styles/hpbartest.html, test pages
prove to be more robust and convenient for testing than the unit
tests (which are already broken).

These pages are primarily intended to help with delivering #1369,
but can be used to test improvements to sprites across the board.
2020-04-02 11:48:50 -07:00
Kirk Scheibelhut
9714d936a5
Begin adding sprite tests (#1476) 2020-03-15 22:34:44 -07:00
Guangcong Luo
651f875cf2 Suppress build error
This build error doesn't appear locally and I can't reproduce it, but
I've heard others report it, and now Travis is having it as an issue.

I'm going to try to explicitly specify this dependency to see if it
makes a difference.
2019-11-11 21:33:01 +13:00
Guangcong Luo
0d05feb41b Migrate to optional chaining and TypeScript 3.7
This is something I probably wouldn't have rushed nearly as much,
except I have a serious use-case coming up; specifically

```js
foo = document.querySelector('foo')?.bar;
```

in a class property.

`document.querySelector('foo') && document.querySelector('foo').bar`
is incredibly inefficient here, but TypeScript doesn't consider
`(document.querySelector('foo') || {}).bar` to be valid because `{}`
doesn't have the `.bar` property. Creating a temporary variable
would have been a huge mess because this was a class property
initializer.

In hindsight, `(document.querySelector('foo')! || {}).bar` would
probably have worked, but too late now.
2019-10-13 01:28:36 +11:00
Guangcong Luo
9114cb9894 Make minor tweaks to teambuilder
Most of these update the pokemon/item/etc lists to be slightly more
modern, in preparation for their use in the Preact client.

(Also update TypeScript)
2019-06-07 18:36:36 -05:00
Guangcong Luo
25d2422a58 Add support for chat userlists and usercards
This involves a relatively substantial refactor to how panels work, but
it should be somewhat finalized now. Popups are now fully supported.
2019-03-17 19:02:53 +09:00
Guangcong Luo
e93277437d Update dependencies 2019-02-26 07:17:19 -06:00
Guangcong Luo
b0b014fdda Remove types/node dependency
Any Node stuff we use (mostly, NWjs and pseudo-UMD) is an ugly hack
that TypeScript has trouble with, anyway.
2019-02-18 13:45:52 -06:00
Guangcong Luo
432ccd64be Make Travis CI auto-run tslint
I'm reasonably confident that the tslint settings are where I want
them to be, at this point. Going over the line length limit is a
warning, not an error, so I don't have to worry about that being
too harsh.
2018-12-16 11:09:59 -06:00
Guangcong Luo
ad3b39b673 Add build scripts
This mostly makes it easier to build in VS Code just by pressing
Cmd+Shift+B or whatever the equivalent is for your platform.
2018-11-29 18:40:31 -06:00
Guangcong Luo
f62060c8ac Add data/text.js to eslint 2018-11-22 21:51:27 -06:00
Guangcong Luo
8669bae196 Add tslint
Probably the most controversial change here is that I have a max line
length limit, currently set to 140 columns. Lines that set up a
string buffer, lines involving regexes, and the text parser's replace
chains are excluded from the limit.

PS has otherwise been moving towards a line length limit, it just
hasn't been linter-enforced yet. I worry about contributors being
annoyed by it, especially since it's not like it's handled
automatically by Prettier or something.

Oh well, it's set to "warning" so Travis won't yell about it.
2018-11-15 23:01:03 -06:00
Guangcong Luo
76805f9068 Add TypeScript to npm test 2018-10-16 21:45:18 -05:00
Guangcong Luo
26f78dcce6 Add Preact dependency
Preact is currently unused in the client, but will be used in an
upcoming rewrite. This adds the foundation to support `.tsx` files in
`src/`.
2018-10-16 14:53:27 -05:00
Guangcong Luo
6e8e112b24 Update Babel version
I'm not sure why Travis tests are failing, but this is a common
recommendation when googling the error message...
2018-10-16 03:45:08 -05:00
Guangcong Luo
f86245febb Add mocha tests to npm test 2018-10-16 03:31:27 -05:00
Guangcong Luo
fb4f83a580 Remove testcafe dependency
It was unused and vulnerable.
2018-10-16 03:04:52 -05:00
Dan Huang
ee91a72dc6 Support headless client Battle (#1151) 2018-10-16 02:48:59 -05:00
Guangcong Luo
382a5334b3 Add image-size dependency to package.json 2018-05-19 21:59:46 -04:00
Guangcong Luo
6e7b3b6d5c Update Google Auth Library dependency 2018-05-19 19:30:51 -04:00
Guangcong Luo
4e7f998afa TypeScript data/graphics.js 2018-05-18 17:10:58 -05:00
Guangcong Luo
b3c6c2a308 Make eslint ignore compiled files 2018-05-14 12:53:34 -05:00
Guangcong Luo
a15ec64d1d Move battledata.js to TypeScript
This is the first step of moving the entire client over to
TypeScript + Preact!!!!

The main change here is that battledata.js has been split into three
files:
- `src/battle-dex.ts`
- `src/battle-dex-data.ts`
- `src/battle-dex-misc.js`

These are concatenated back into `battledata.js` in the client, so
third parties (and specifically, old replay files) should be
unaffected. Also, this makes sure that we don't have more than two
dependencies right now.

The compilation is done with Babel 7 beta, because no stable version
of Babel supports TypeScript. We're not using `tsc` because it can't
compile to ES3 and it doesn't support preserving line numbers.

`toRoomid` has been moved from client.js to battle-dex.ts.
2018-05-14 12:53:34 -05:00
Guangcong Luo
15c73c922f Refactor build system
We no longer have the relevant Githook for automatic building, so
putting it in `githooks/` no longer makes much sense. It's now manually
called with a build script `./build`, like other PS websites (most
notably PSDex and the damagecalc).
2017-12-04 17:37:01 -05:00
Guangcong Luo
5bed590db0 Update testcafe dependency 2017-11-22 07:16:39 -06:00
Guangcong Luo
2c57bdfb14 Update eslint version 2017-11-22 07:15:29 -06:00
Guangcong Luo
24c090a08d Default to HTTPS
Chrome peer-pressuring us by locking Notification behind HTTPS... they
also lock plenty of other things behind HTTPS and the trade-off seems
worth-it now.
2017-11-21 07:50:32 -05:00
Konrad Borowski
cfd87a91c1 Add level 50 Pokemon test for VGC (#964) 2017-07-06 15:34:20 +09:00
Konrad Borowski
156b5bf3d5 Add testclient unit tests (#957) 2017-06-27 17:43:54 -07:00
Felix Rilling
faaaedadcb Make package name lowercase (#905) 2017-04-23 12:59:14 -05:00
Guangcong Luo
e96b9b9fd1 Improve animated sprite update script
BW animated sprites are now also automatically generated. In addition,
the generation script can now handle female sprites and cosmetic forms.

The storage format has also changed to be more concise.
2016-12-29 15:32:26 -05:00
Guangcong Luo
d593d5355e Version 0.11.0 2016-11-29 18:46:30 -05:00
Guangcong Luo
15fc14856d pokedex-mini.js is now autogenerated 2016-11-29 18:44:52 -05:00
Ivo Julca
40e296a219 Deps: Sync ESLint version and settings with server 2016-08-05 00:50:20 -05:00
Ivo Julca
2211924c49 Sync ESLint version and rules with server repo 2016-06-13 14:05:56 -05:00
Guangcong Luo
7cd3058542 Fix warnings in npm test 2016-03-15 15:44:07 -04:00
Ivo Julca
a62e85b822 Build: remove sugar dependency 2016-03-05 22:30:15 -05:00
Ivo Julca
0f5810a054 Lint: check githooks folder 2016-03-05 22:10:32 -05:00
Ivo Julca
96f722fe14 Lint: check data files for errors 2016-03-04 19:20:15 -05:00
Guangcong Luo
02f0c8e82c Add githooks/build-indexes
This is the search index build script from the Gen 6 Learnsets
repository, slightly rewritten for the PS client environment. It
expects a checkout of the server respository in
`data/Pokemon-Showdown`.
2015-12-21 20:09:55 -06:00
Ivo Julca
d694099484 Implement basic linting 2015-12-03 03:36:01 -05:00