Closed deinok closed 7 years ago
Hey! thanks for submitting you pull request! i'll check it out immediately to see how the introduced options class influences size of the minified file. As you might see from the source, I tried really hard to keep the file size at a minimum.
@wstoettinger didnt know you are taking in cosideration the minification so much. I will take it in consideration for future PR ;)
yes, we do ;) @mikegreiling, the creator, had it always in mind to keep it lightweight and this was the reason I stared using and consequently contributing to it ;)
V1.5 has 6.71 KB, v2 has even less at 6.35 KB while simultaneously increasing flexibility/functionality! ;)
did you test it? i can't get it to work. I did have to change the module definition of the options class, otherwise it wasn't even included in the outputted js file. unfortunately the file size also gets bigger with the new class. maybe we should revert the defaults to a plain object and convert the main parallax file into typescript
and could you change the config so that the compiled .ts files end up in a separate folder? that way it's easier to include them in the .gitignore
I can take a look. Probably we should have some kind of tests. A simple .html file that shows some parallax images. What do you think?
definitely! i did create a test folder in my local repo, but empty folders don't get pushed :smile: just haven't had time to do it yet.
create a file called .gitkeep inside the folder, this will keep the folder
@wstoettinger Hey, I have copy the content of GH-PAGES to a folder called tests. And changed the parallax.js version to use the v2 branch. Seems like the images are not loading, also, no error on console. Probably some problem with WebPack
@deinok I had exactly the same idea :smile: ! check out the latest commit in the alpha branch, it's working.
I had to change a bit more than you did to make it work. webpack wasn't the problem
@wstoettinger I check it and seems like it is working in this branch. Can you check it please? Also, great work ;)
i created a feature branch and merged it, so i don't have to create two project directories (with all settings and node_modules for the build process, etc). simply create new PRs on this branch in the future! thanks
@wstoettinger okey, i will port all the code to TypeScript in the features branch so we can then merge it into v2
i also integrated the TS build process into webpack and moved the TS temporary output into the build folder.
is there a reason why there is a main.ts?
Yes, by convention, main.ts files contain export and import directives. So in the future, i will include this directives.
This helps TypeScript developers to import all the library without thinking what other files they have to import.
Note: this dont impact the generation of *.js files. It only works when you are consuming a library with TypeScript
@wstoettinger I think its ready to merge ;) My intention is to add more src as TypeScript, for now i only added the parallaxOptions class