summaryrefslogtreecommitdiff
path: root/examples/with-nanostores/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-11-27Merge branch 'main' into nextnextGravatar Chris Swithinbank 3-5/+11
2024-11-27Examples fixes and preview.astro.new support (#12543)Gravatar Chris Swithinbank 3-5/+11
Co-authored-by: Emanuele Stoppa <602478+ematipico@users.noreply.github.com>
2024-09-03feat(next): better tsconfig (#11859)Gravatar Florian Lefebvre 1-1/+0
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-08-14Content Layer (#11360)Gravatar Matt Kane 1-1/+1
* Empty commit * Changeset * feat: add Content Layer loader (#11334) * wip * wip * wip * Update demo * Add meta * wip * Add file loader * Add schema validation * Remove log * Changeset * Format * Lockfile * Fix type * Handle loading for data store JSON * Use rollup util to import JSON * Fix types * Format * Add tests * Changes from review * fix: sync content layer in dev (#11365) * wip * wip * wip * Update demo * Add meta * wip * Add file loader * Add schema validation * Remove log * Changeset * Format * Lockfile * Fix type * Handle loading for data store JSON * Use rollup util to import JSON * Fix types * Format * Add tests * Changes from review * Sync content layer in dev * feat: add typegen for loaders (#11358) * fix: watch for content layer changes (#11371) * fix: watch for content layer changes * Add test * feat: adds simple loader (#11386) * wip * Add simple loader * Fix type guard * Tighten loader schema * Add loader function to type * Reinstall vitest * feat: add glob loader (#11398) * feat: add glob loader * Enable watching and fix paths * Store the full entry object, not just data * Add generateId support * Fix test * Rename loaders to sync * Refacctor imports * Use getEntry * Format * Fix import * Remove type from output * Windows path * Add test for absolute path * Update lockfile * Debugging windows * Allow file URL for base dir * Reset time limit * feat: add markdown rendering to content layer (#11440) * feat: add glob loader * Enable watching and fix paths * Store the full entry object, not just data * Add generateId support * Fix test * Rename loaders to sync * Refacctor imports * Use getEntry * Format * Fix import * Remove type from output * Windows path * Add test for absolute path * Update lockfile * Debugging windows * Allow file URL for base dir * Reset time limit * wip: add markdown rendering to content layer * use cached entries * CLean up types * Instrument more of the build * Add digest helper * Add comments * Make image extraction work * feat: image support for content layer (#11469) * wip * wip * Add image to benchmark * Stub assets if missing * Resolve assets in data * Ignore virtual module * Format * rm log * Handle images when using cached data * Fix CCC * Add a comment * Changes from review * Format * Use relative paths for asset files * Pass all md props to getImage * Ensure dotastro dir exists * Fix tests * Changes from review * Don't use temp array in getcollection * Add error handling * Format * Handle paths that are already relative * Dedupe sync runs * Fix syncing in dev * Changes from review * Windows paths ftw * feat(content-layer): support references in content layer (#11494) * Support references in content layer * Fix utf8 rendering * Warn for invalid entries * Fix test * lol windows paths * Remove assertion * chore: fix content layer types (#11527) * Add experimental_content type * Fix import * Make data store methods generic * fix loader types * Lockfile * Clean content layer with `--force` (#11541) * Clearn content layer with `--force` * Add tests * Document --force flag * Fixes to content layer render types (#11558) * Lockfile * feat: use devalue to serialize content layer data (#11562) * feat: use devalue to serialize content layer data * Fix import * Use devalue stringify * Unused import * Propagate error messages correctly * Support --force flag in sync and dev (#11581) * Support --force flag in sync and dev * Fix test * Separate render function and merge content layer types (#11579) * Separate render function and merge content layer types * Changes from review * fix: clear content layer cache if config has changed (#11591) * fix: clear content layer cache if config has changed * Add test * Watch config * Change from review * fix: skip glob files in content dir (#11622) * fix: skip glob files in content dir * Changes from review * Log pattern * Refactor content layer into shared instance (#11625) * Refactor content layer into shared instance * Clean up when testing * Handle cleanup * fix: support filters in content layer getCollection (#11631) * Throw when using deprecated getEntryByX functions with content layer (#11637) * Updates to content layer types and jsdocs (#11643) * Add hot key to reload content layer (#11626) * Add hot key to reload content layer * Fix filename * Remove cli message * Update example * Change key to "s" * feat: handle simple mdx rendering (#11633) * feat: handle simple mdx rendering * cleanup * feedback * fix regression * remove log * flip condition * update tests * log collections to understand the error * let's try this alternative * try parallel test to understand the issue * chore: use a new fixture to fix tests * rebase and docs * fix regressions * remove old code * address feedback * rename param * log error * rebase * chore: try a different cache dir to solve the error test * fix invalidation of the module when there's no store available * address suggestion * run formatter * update lock file * Lint * Add experimental content layer flag (#11652) * Add experimental content layer flag * Syntax and format * Aside * Format * Reset content config between runs * Update fixture * Update terminology * Lint * wut * Normalize render function return value (#11663) * Add markdoc support to content layer (#11664) * Add markdoc support to content layer * Switch test to cheerio * Update benchmarks * update lock file * Update content layer flag docs (#11682) * Update content layer flag docs * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * More markdoc * Typo * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Add changeset for content layer experimental release (#11644) * Add changeset for content layer experimental release * Update changeset * Update .changeset/smooth-chicken-wash.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * feat: injectTypes (#11551) * feat: make inline config 1st arg * fix: run config done in sync * feat: start working on injectTypes * feat: write files * feat: adapt core features * feat: migrate db to injectTypes * feat: special db handling * feat: update settings instead of workarounds * fix: create dotAstroDir * feat: refactor sync tests * fix: path * fix: paths * chore: add comments * feat: overwrite content file if exists * chore: remove unused db env related code * feat: use dotAstroDir for settings * chore: simplify astro env sync * feat: use dotAstroDir for preferences * feat: handle db in integration api * chore: reorganize * feat: format * feat: add test * Discard changes to examples/basics/astro.config.mjs * Discard changes to examples/basics/package.json * Discard changes to pnpm-lock.yaml * chore: remove test files * feat: update examples dts * fix: dts * chore: changesets * fix: indentation * Apply suggestions from code review Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Apply suggestions from code review Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * chore: format * Update packages/astro/src/integrations/hooks.ts * Update .changeset/mean-horses-kiss.md * feat: remove formatting * feat: handle fs errors * feat: remove astro:db special path handling * feat: add fs error * Update packages/astro/src/content/types-generator.ts * Update .changeset/mean-horses-kiss.md * Update errors-data.ts * Update .changeset/mean-horses-kiss.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/mean-horses-kiss.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com> * Add file generation and flag for content intellisense (#11639) * feat: add type to infer input type of collection * refactor: * feat: generate json schema for content too * feat: generate a manifest of all the collections * refactor: unnecessary type * fix: only add content collections to manifest * chore: changeset * fix: generate file URLs * fix: flag it properly * fix: save in lower case * docs: add jsdoc to experimental option * nit: move function out * fix: match vscode flag name * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update serious-pumas-run.md * test: add tests * Add content layer support * Apply suggestions from code review * fix: test * Update .changeset/serious-pumas-run.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Apply suggestions from code review * Remove check for json --------- Co-authored-by: Matt Kane <m@mk.gg> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * nit: use same filesystem error as injectTypes * fix: code component was missing support for meta string (#11605) * fix: code component was missing support for meta string Fixed #11604 * Create odd-buttons-pay.md * <Code>: add reference link for meta prop * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/odd-buttons-pay.md * Update .changeset/odd-buttons-pay.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * Deprecates exporting prerender with dynamic values (#11657) * wip * done i think * Add changeset * Use hook instead * Reorder hooks [skip ci] * Update .changeset/eleven-pens-glow.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Fix run * Fix link * Add link Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com> * More accurate migration [skip ci] --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com> * Use node parseArgs instead of yargs-parser and arg (#11645) * wip * done * Add changeset * Format * Update * Fix houston * Fix test * Fix test * [ci] format * resolve conflict --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com> Co-authored-by: Julien Cayzac <jcayzac@users.noreply.github.com> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com> Co-authored-by: Bjorn Lu <ematipico@users.noreply.github.com>
2024-05-01Fix typos (#10923)Gravatar Viktor Szépe 1-1/+1
2024-03-13Fix check example CI fail (#10415)Gravatar Bjorn Lu 1-1/+1
2023-12-28fix(examples): make astro check pass (#9542)Gravatar Florian Lefebvre 1-1/+1
2023-09-06[ci] formatGravatar natemoo-re 1-23/+28
2023-07-14nit: export props has been unnecessary.. forever (#7646)Gravatar Erika 1-3/+3
2022-08-26Remove "as Props" from the astro examples (#4494)Gravatar Mohammed Elhaouari 1-1/+1
2022-08-17Switch examples favicon to use svg (#4331)Gravatar Nate Moore 1-1/+1
* chore(examples): switch favicon to svg * chore: astro.svg => favicon.svg * Update examples/basics/README.md Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Nate Moore <nate@astro.build> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2022-08-08Add Astro.generator (#4012)Gravatar Nate Moore 1-0/+1
* feat: add generator property and component * chore: remove `Generator` component * chore: update generator description * chore: include generator in examples * chore: update lockfile * chore: format * fix: do not reference core from server runtime * chore: remove component test Co-authored-by: Nate Moore <nate@astro.build>
2022-08-06[ci] formatGravatar FredKSchott 2-6/+15
2022-08-05Move types to a .d.ts file inside examples projects (#4171)Gravatar Erika 1-0/+1
* Move types to a .d.ts file to avoid making types explicit * Rename to proper types * Move to proper place * Add noEmit to tsconfig.json * Add back removed code by accident
2022-07-11[ci] formatGravatar bholmesdev 4-13/+8
2022-07-11Update `with-nanostores` example to match docs walkthrough (#3840)Gravatar Ben Holmes 17-278/+302
* feat: replace with-nanostores with new example * docs: update README with docs call-out * chore: small formatting inconsistencies * nit: standardize to spaces :'( * nit: standardize to tabs! * refactor: use html "hidden" property * nit: beta.66 for sanity
2022-07-08Format astro files in examples (#3862)Gravatar Marcus Otterström 1-6/+6
2022-04-02update prettier width (#2968)Gravatar Fred K. Schott 2-3/+5
2022-03-09Update examples for 0.24.0 (#2740)Gravatar Tony Sullivan 1-5/+4
* removing Astro.resolve, adding sass dev dependencies * updating tailwind example to use ESM style imports * moving from `<style global>@import` to ESM imports * updating lockfile to pick up examples sass deps * chore(lint): ESLint fix Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-08Upgrade Vite to latest (#2424)Gravatar Nate Moore 2-32/+0
* chore: unvendor vite * chore: upgrade vue and svelte * feat(renderer-solid): upgrade for vite@2.7.x * chore: update yarn.lock * fix(solid): upgrade solid renderer for vite@2.7.x * test: improve css test * chore: upgrade to vite@2.8.0-beta.3 * fix: replace hacky serialization with 'serialize-javascript' * fix: externalize serialize-javascript * fix: explicitly add execa@6.x.x to devDependencies * test(css): skip css?url test * chore: update vite-plugin-svelte * fix: ssr option * chore: update changeset * chore: remove changeset * chore: add changeset * chore: add back missing changeset * chore: update vite * chore: update to latest vite * test: update proload? * chore: update dependencies * fix: remove preact from nanostores example * fix: update static-build-pkg to use `.mjs` extension * fix: exclude './server.js' from custom-elements test * chore: remove unused file
2022-01-18Update examples to move away from Astro.resolve on styles (#2393)Gravatar Matthew Phillips 1-2/+4
* Update examples to move away from Astro.resolve on styles * Prepend the subpath * Adds a changeset * Switch to @import for the starter
2021-12-22Use accessible indentation (#2253)Gravatar Jonathan Neal 9-164/+167
2021-12-13[ci] yarn formatGravatar FredKSchott 4-4/+4
2021-12-13Adding Solid to with-nanostores example (#2079)Gravatar Agustin Mulet 8-26/+66
2021-11-24move styles to src (#2003)Gravatar Fred K. Schott 3-2/+69
2021-11-21Patch: Example Nanostores Update (#1955)Gravatar Withered Flowers 7-46/+42
* Mention astro.new in docs (#1935) * Fix - Deprecated nanostores functions createStore and getValue is deprecated in nanostores, changed it to atom and atom.get() * fix: change code to nanostores non-deprecated functions Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com>
2021-08-16cleanup example faviconsGravatar Fred K. Schott 1-2/+1
2021-08-16Adding favicon to examples (#1084)Gravatar Rafid Muhymin Wafi 1-1/+2
2021-08-04Reduce meta viewport tag (#1006)Gravatar Jonathan Neal 1-1/+1
2021-07-20[ci] yarn formatGravatar FredKSchott 1-12/+12
2021-07-16Update docs in compiler messages (#710)Gravatar Caleb Jasik 1-1/+1
* `github.com/snowpackjs/astro/blob/main/docs/*.md` -> `docs.astro.build/*/` * convert links to docs site links * Fix broken links that didn't work w/ the regex. * Add changeset * Delete five-weeks-destroy.md Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2021-07-08Move hydration directives to special attributes (#618)Gravatar Tony Sullivan 1-4/+4
* feat: :recycle: updating hydration to work with the directive syntax * test: :white_check_mark: Updating tests for the hydration directive syntax * refactor: Updating example projects for the hydration directive syntax * test: :white_check_mark: Found a test fixture still needing an update to the hydration directive syntax * style: Prettier strikes again! Reverting code formatting changes * refactor: :recycle: moving directive matching to a Set * refactor: Updating syntax to `client:load` * refactor: :recycle: Simplifying the `client:` directive match Per PR feedback from @matthewp * chore: errant console.warn() snuck into the last commit * feat: :loud_sound: Adding a super fancy build warning to update to the directive syntax * refactor: :recycle: Removing unnecessary checks when matching supported hydration directives `val` isn't being used for now, but leaving it in the attr destructuring as a reminder since it'll be needed for `client:media` * test: :white_check_mark: Including the original hydration syntax in a test to make sure it builds * style: :memo: Adding a comment to make it clear why the old hydration syntax is included in a the test markup * fix: :bug: updating `head` logic to recognize hydration directive syntax * docs: Adding changeset * refactor: :fire: Removing unnecessary `!hasComponents` check * docs: :memo: Adding more detail to the changset Co-authored-by: Tony Sullivan <tony.f.sullivan@gmail.com>
2021-07-01update example astro inline docs (#592)Gravatar Fred K. Schott 1-2/+4
2021-06-28Restructure examples (#568)Gravatar Nate Moore 8-0/+205
* rename kitchen sink, pull out react example * split out the rest of the examples * align versions * chore: rename examples * chore: normalize gitignore * chore: update package versions * chore: move framework examples to `framework` namespace * docs: add README to examples Co-authored-by: Austin Crim <crim.austin@principal.com>