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

Refactor imports #157

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2

- name: Check formatting
run: deno fmt --check
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ blog();

To initialize your own blog you can run following script:

```shellsession
$ deno run -r --allow-read --allow-write https://deno.land/x/blog/init.ts ./directory/for/blog/
```sh
deno run -r --allow-read --allow-write https://deno.land/x/blog/init.ts ./directory/for/blog/
```

_This command will setup a blog with a "Hello world" post so you can start
writing right away._

Start local server with live reload:

```shellsession
$ deno task dev
```sh
deno task dev
```

To ensure the best development experience, make sure to follow
Expand Down Expand Up @@ -106,6 +106,6 @@ To deploy the project to the live internet, you can use

You can also self-host the blog, in such case run:

```shellsession
$ deno task serve
```sh
deno task serve
```
File renamed without changes
2 changes: 1 addition & 1 deletion testdata/my_blog.ts → content/main.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import blog from "../blog.tsx";
import blog from "../src/blog.tsx";

blog({
author: "Dino",
Expand Down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why rename this directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the components are all collated rather than knocking around in the root. Separate them from the configuration files etc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to move source under src/ but the rename is testdata/posts/fifth.mdcontent/posts/fifth.md, presumably calling it content instead of testdata has no impact on where the components are located. testdata is intentionally named for test fixtures.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, thought I saw the comment attached to the above file.
My thought for the rename was that it was a better example of a sensible file name, that users can 'clone and go', But not a hill I would die on, happy to change it back.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest undoing the content change and intead move testdata to src/testdata

File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"tasks": {
"dev": "deno run --allow-net --allow-read --allow-env=NODE_DEBUG,NO_COLOR,FORCE_COLOR,TERM --watch --no-check ./content/main.tsx --dev",
"test": "deno test --allow-net --allow-read --allow-env=NODE_DEBUG,NO_COLOR,FORCE_COLOR,TERM --no-check=remote",
"serve": "deno run --allow-net --allow-read --allow-env --no-check ./content/main.tsx"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--no-check and --no-check=remote are not needed here and above in modern deno

},
"imports": {
"@deno/gfm": "jsr:@deno/gfm@^0.10.0",
"@std/testing": "jsr:@std/testing@^1.0.4",
"@std/assert": "jsr:@std/assert@^1.0.7",
"@std/async": "jsr:@std/async@^1.0.8",
"@std/front-matter": "jsr:@std/front-matter@^1.0.5",
"@std/fs": "jsr:@std/fs@^1.0.5",
"@std/http": "jsr:@std/http@^1.0.9",
"@std/path": "jsr:@std/path@^1.0.8",
"@denoland/htm": "https://deno.land/x/htm@0.1.3/mod.ts",
"@denoland/htm/plugins/color-scheme": "https://deno.land/x/htm@0.1.3/plugins/color-scheme.ts",
"@denoland/htm/plugins/unocss": "https://deno.land/x/htm@0.1.3/plugins/unocss.ts",
"@denoland/g_a": "https://deno.land/x/g_a@0.1.2/mod.ts",
"@githubcontent/kt3k/callsites": "https://raw.githubusercontent.com/kt3k/callsites/v1.0.0/mod.ts",
"@esm/feed": "https://esm.sh/feed@4.2.2",
"@esm/remove-markdown": "https://esm.sh/remove-markdown@0.5.0",
"@esm/prism-c": "https://esm.sh/prismjs@1.29.0/components/prism-c?no-check",
"@outdated/std-http": "https://deno.land/std@0.193.0/http/mod.ts"
}
}
7 changes: 0 additions & 7 deletions deno.jsonc

This file was deleted.

Loading
Loading