Skip to content

Commit

Permalink
feat: Move development and publishing to Deno (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallswain authored and daffl committed Nov 19, 2021
1 parent 8e4328f commit c2a1b0b
Show file tree
Hide file tree
Showing 50 changed files with 1,651 additions and 22,594 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ jobs:
uses: denolib/setup-deno@v2
with:
deno-version: v1.x

- name: Install Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14

- name: Install build tooling
run: npm install


- name: Run Tests
run: npm run test:deno
run: make test
25 changes: 0 additions & 25 deletions .github/workflows/nodejs.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/update-dependencies.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ typings/
lib/
dist/
*.sqlite

/packages/
/coverage/
5 changes: 0 additions & 5 deletions .mocharc.json

This file was deleted.

46 changes: 0 additions & 46 deletions .nycrc

This file was deleted.

9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.config": "deno.json",
"deno.codeLens.implementations": true,
"deno.codeLens.references": true,
"deno.codeLens.referencesAllFunctions": true,
"deno.unstable": true
}
25 changes: 25 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"lint": {
"files": {
"include": ["main"],
"exclude": []
},
"rules": {
"tags": [],
"include": [],
"exclude": ["no-explicit-any", "require-await"]
}
},
"fmt": {
"files": {
"include": ["main/"],
"exclude": []
},
"options": {
"useTabs": false,
"lineWidth": 120,
"indentWidth": 2,
"singleQuote": true
}
}
}
10 changes: 1 addition & 9 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,5 @@
"conventionalCommits": true,
"createRelease": "github"
}
},
"ignoreChanges": [
"**/changelog.md",
"**/CHANGELOG.md",
"**/package-lock.json",
"**/yarn.lock",
"**/test/**",
"lerna.json"
]
}
}
25 changes: 25 additions & 0 deletions main/build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as path from 'https://deno.land/std@0.115.1/path/mod.ts';
import { build } from 'https://deno.land/x/dnt@0.7.2/mod.ts';
import hooksPackage from './hooks/package.json.ts';

const __dirname = new URL('.', import.meta.url).pathname;

const buildModule = async (name: string) => {
const inDir = path.join(__dirname, name);
const outDir = path.join(__dirname, '..', `packages/${name}`);
const filesToCopy = ['LICENSE', 'README.md'];

await build({
entryPoints: [path.join(inDir, 'src/index.ts')],
outDir,
test: false,
compilerOptions: {
importHelpers: false,
},
package: hooksPackage,
});

filesToCopy.forEach((filename) => Deno.copyFileSync(path.join(inDir, filename), path.join(outDir, filename)));
};

await buildModule('hooks');
2 changes: 1 addition & 1 deletion packages/hooks/LICENSE → main/hooks/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Feathers
Copyright (c) 2021 Feathers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
File renamed without changes.
33 changes: 33 additions & 0 deletions main/hooks/package.json.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
export default {
name: '@feathersjs/hooks',
version: '0.0.0',
description: 'Async middleware for JavaScript and TypeScript',
homepage: 'https://feathersjs.com',
keywords: [
'feathers',
'hooks',
'hook',
'async',
'middleware',
],
license: 'MIT',
repository: {
type: 'git',
url: 'git://github.com/feathersjs/hooks.git',
},
author: {
name: 'Feathers contributor',
email: 'hello@feathersjs.com',
url: 'https://feathersjs.com',
},
contributors: [],
bugs: {
url: 'https://github.com/feathersjs/hooks/issues',
},
engines: {
node: '>= 14',
},
publishConfig: {
access: 'public',
},
};
Loading

0 comments on commit c2a1b0b

Please sign in to comment.