diff --git a/.npmignore b/.npmignore index 9f5475ffcc7ac017788aaf12548e74b9b3f02e76..b80d64b114722276c8d73d8062166967b84f0c31 100644 --- a/.npmignore +++ b/.npmignore @@ -1,7 +1,6 @@ .idea/ .rpt2_cache/ .babelrc -demo.html rollup.config.js tsconfig.json yarn.lock diff --git a/README.md b/README.md index e7898a41d32d353256afdb2d4c08735479202cdc..a69c4571b5af7e1857eab15c0824f3b9b37251af 100644 --- a/README.md +++ b/README.md @@ -44,4 +44,4 @@ yarn install yarn dev ``` -If you need to check visually how the smooth scrolling behaviour acts like, you can take advantage of a testing file `demo.html` which has some lorem ipsum data and few of links to navigate through the content and test smooth scrolling. +Every piece of this library comes with its unit test sitting alongside the script. Whole library is covered by integration test sitting in `src` folder. diff --git a/demo.html b/src/integrationTest.html similarity index 99% rename from demo.html rename to src/integrationTest.html index d1f165576478fb3b0d019165b4769ba250e105f4..29398681cee6d4489b95fc27116af908eb47a6e0 100644 --- a/demo.html +++ b/src/integrationTest.html @@ -3,9 +3,9 @@ <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> - <title>Visual test of smoothscroll</title> + <title>Integration test</title> <script src="https://cdn.jsdelivr.net/npm/velocity-animate@1.5/velocity.min.js"></script> - <script src="dist/index.js" type="text/javascript"></script> + <script src="../dist/index.js" type="text/javascript"></script> <script> SmoothScroll.enable({ scrollOnLoad: true, @@ -34,6 +34,8 @@ </style> </head> <body> +<!-- @todo: improve this file --> + <div id="nahoru"></div> <a href="#item1">Item1</a> <a href="#item2">Item2</a>