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

chore: Convert to Deno #17

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
bc16527
chore: Convert to Deno
ebebbington Jun 3, 2021
ad914aa
Merge branch 'master' into use-deno2
ebebbington Jun 3, 2021
3198a15
Handle duplicate modify events for watcher
ebebbington Jun 6, 2021
819868f
Remove fmt from scripts
ebebbington Jun 6, 2021
2f82977
Cast stylesheet in CSSTemplate.ts
ebebbington Jun 7, 2021
306eb48
Use native Deno way of formatting diagnostics
ebebbington Jun 10, 2021
ffb7af1
Merge branch 'master' into use-deno2
ebebbington Jun 29, 2021
c6a7022
fix compile.ts and src imports
ebebbington Jun 30, 2021
0423c8d
add example of using destiny with node TMP
ebebbington Jun 30, 2021
85ebccd
im sorry ok okku
ebebbington Jun 30, 2021
c19747d
update examples, add browser example
ebebbington Jul 1, 2021
3360ced
use crumpets
ebebbington Jul 1, 2021
c24c328
remove files that were added in the merge, but not present in master.…
ebebbington Jul 1, 2021
a8bba7d
few fixes
ebebbington Jul 1, 2021
951a647
Fix examples and watch
ebebbington Jul 1, 2021
e80958e
move examples imports into its own file to reduce dep tree
ebebbington Jul 1, 2021
ab230c8
dont use ws server when watching
ebebbington Jul 1, 2021
082abc7
Merge branch 'master' into use-deno2
ebebbington Jul 4, 2021
ccaedba
improve deno examples
ebebbington Jul 6, 2021
3647b7f
make some internal code adjustments to account for some minor problem…
ebebbington Jul 6, 2021
f46807e
add workflow
ebebbington Jul 6, 2021
fd7a0dd
add bumper workflow
ebebbington Jul 6, 2021
c81cb90
remove loggin
ebebbington Jul 6, 2021
2538f28
deno lint
ebebbington Jul 6, 2021
4461918
remove dead code
ebebbington Jul 6, 2021
018454f
correct compile.ts
ebebbington Jul 6, 2021
8d5c29f
correct examples readme
ebebbington Jul 6, 2021
ff241b1
fix .d.ts file extensions
ebebbington Jul 10, 2021
bf2ffaa
Update crumpets
ebebbington Jul 11, 2021
ac08c06
once again, i am sorry okku
ebebbington Jul 11, 2021
7782dc0
just for you okku
ebebbington Jul 11, 2021
60525bd
okku.includes(good suggestions) // true
ebebbington Jul 11, 2021
a947c79
move tsconfig into its own file
ebebbington Jul 11, 2021
2d0fbdf
1:1 with master
ebebbington Jul 11, 2021
56adfaa
remove package-lock.json
ebebbington Jul 11, 2021
9369184
fixes nd remove hack
ebebbington Oct 14, 2021
efe1455
cleanup readme
ebebbington Oct 14, 2021
4179ddf
Merge branch 'master' of https://github.com/ebebbington/destiny into …
ebebbington May 13, 2022
6bf424e
rm examples dir
ebebbington May 13, 2022
c034870
fmt
ebebbington May 13, 2022
34a35b8
tidy up
ebebbington May 13, 2022
b815a53
correct workflow
ebebbington May 13, 2022
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
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

177 changes: 0 additions & 177 deletions .eslintrc.cjs

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/bumper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: bumper
on:
schedule:
- cron: '0 0 * * 0'

jobs:
update-dep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Deno
uses: denolib/setup-deno@master

- name: Update Build Deps
run: |
deno run --allow-net --allow-read --allow-write https://deno.land/x/dmm/mod.ts update

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.CI_USER_PAT }} # TODO This needs to be a personal access token on the GH user eg Okku
commit-message: Update dependencies
title: Update dependencies
body: This was auto-generated by GitHub Actions.
branch: update-dependencies
51 changes: 51 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: master

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Deno
uses: denolib/setup-deno@master

- name: Deno version
run: echo deno --version

- name: Check Any Type Errors
run: deno cache src/mod.ts

- name: Can Compile To Dist
run: npm run compile # mainly to check if there are any errors when running this command

- name: Basic Example Can Be Compiled
run: |
cd examples/deno
deno bundle --config tsconfig.json components/App.ts components/app.js
cd ../node
npm i
node_modules/.bin/webpack --config webpack.config.js
cd ../browser
echo "No build step so no testing here"

linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Deno
uses: denolib/setup-deno@master

- name: Formatter
run: echo "Is this something we want?" #deno fmt --check --ignore=dist

- name: Linter
run: npm run lint
36 changes: 36 additions & 0 deletions compile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// transpile.ts
import { Crumpets } from "./deps.ts";

const compilerOptions = (JSON.parse(Deno.readTextFileSync("./tsconfig.json"))).compilerOptions

async function compile(
rootFile: string,
) {
const crumpet = new Crumpets({
rootFile,
compilerOptions,
filenameReplaceOptions: {
search: "/src/",
replacer: "/dist/",
},
});

await crumpet.run();
}

async function watch() {
const crumpets = new Crumpets({
rootFile: "./src/mod.ts",
directoryToWatch: "./src",
compilerOptions,
});
await crumpets.watch()
}

await Promise.all([
"./src/mod.ts",
"./src/examples_mod.ts",
].map(compile));
if (Deno.args.includes("--watch")) {
await watch();
}
1 change: 1 addition & 0 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Crumpets } from "https://deno.land/x/[email protected]/mod.ts";
3 changes: 3 additions & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node/package-lock.json
Copy link
Author

Choose a reason for hiding this comment

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

Purely making a note here so I remember to remove the examples directory - would be great if we could turn these into tutorials :)

Copy link
Owner

Choose a reason for hiding this comment

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

Yeah honestly the examples don't make a ton of sense as part of the lib core, but that's where I run the tests, so I don't know if it's feasible to remove the examples completely 😬

Copy link
Author

Choose a reason for hiding this comment

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

It was more to help both us understand if it works for each environment :) After all we could turn the 'setups' into written tutorials

though i see what you mean...might be worth something to you, just maybe there's a better place to put these directories?

Copy link
Owner

Choose a reason for hiding this comment

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

I might've actually misunderstood what you meant, my bad. Ignore my previous comment.

Copy link
Author

Choose a reason for hiding this comment

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

resolving, pr desc now includes a note about this

node/public
node/node_modules
Loading