pixelcog / parallax.js

Simple parallax scrolling effect inspired by Spotify.com implemented as a jQuery plugin
MIT License
3.53k stars 838 forks source link

Feature/typescript #215

Closed deinok closed 7 years ago

deinok commented 7 years ago

This ports all the code to *.ts files. Also, it exposes the library as TypeScript and JavaScript.

deinok commented 7 years ago

@wstoettinger I think this is ready to be merged to features/typescript

wstoettinger commented 7 years ago

thanks!

wstoettinger commented 7 years ago

looks quite good, thanks! i have a view questions though: what was the reason why you chose to compile with tsc again in favor of webpack? is there something webpack cant compile with the ts-loader? the other thing i was a bit confused about, is the .ts file in the dist directory. i'm used to have only generated content in the dist directory which can be re-generated every time (even after deleting the whole directory) and which is ready for immediate use.

please clarify. thanks!

deinok commented 7 years ago

Well, for me the dist directory is where all the "Release" content is putted. So, if you want to consume the library with TS, you catch the .ts file, if you want the JavaScript version you catch the .min.js or js.

And about the ts-loader: if we can target TS to ES3 and make the ES2015 modules work on ES3 we should be able to reduce the size of the .min.js (WebPack writes a lot of code).

deinok commented 7 years ago

@wstoettinger if you could give me rights to the feature/typescript branch i would be able to work faster :)

wstoettinger commented 7 years ago

unfortunately I can't since i don't have admin rights. this has to be done by @mikegreiling