Skip to content
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

WIP Svelte rebuild #277

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft

WIP Svelte rebuild #277

wants to merge 21 commits into from

Conversation

bobbysebolao
Copy link
Owner

No description provided.

dotenv is more widely used and more actively maintained.
This is in preparation for using Svelte/SvelteKit, which expects
components to use ES6 imports and exports.
The old version of Jest I was using did not support ES module syntax in
tests.

Note: The new version of Jest requires you to run node using an
experimental  --experimental-vm-modules flag. I've added this flag to
the test command in package.json, but hopefully this can be removed when
the Jest team adds proper ES6 module support in the future.

See: https://jestjs.io/docs/ecmascript-modules
The tests in database.test.js previously set fixtures on the global
object, which increased the risk that values left over from tests that
don't properly clean up after themselves would pollute other tests.

Fixed by scoping test fixtures to the describe blocks where they are
used.
Incomplete set of arguments was being passed to
submitEmailVerificationToken by the afterAll cleanup in the final
describe block in the database.test.js tests.
Add the demo files for a SvelteKit app initialised with
npm init svelte@next my-app
With help from a plugin called svelte-preprocess, Svelte supports SASS
inside components. Now node-sass and svelte-preprocess are installed, I
can write SASS inside any <style lang="scss"> tag.

Also took the chance to update a couple of other (unrelated)
dependencies that were using deprecated dependencies.
Transfers navbar CSS from old stylesheets to <style> tag inside
Header.svelte. Also refactors some CSS to remove commented out code/
reduce repetition.
Icons contains SVG definitions for icons used in the Header and Footer.
Also copy static assets into the static/ directory.
Uses a Svelte store to manage the state for the currently active display
modes across the app. The idea is that each page in the app will
subscribe to the active_display_modes store (although currently only the
home page does). When the value of that store is updated, the page
rerenders any of its contents which receive different CSS classes
depending on the display modes that are active.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant