File tree Expand file tree Collapse file tree 5 files changed +74
-170
lines changed Expand file tree Collapse file tree 5 files changed +74
-170
lines changed Original file line number Diff line number Diff line change 9
9
runs-on : ubuntu-latest
10
10
steps :
11
11
- uses : actions/checkout@v2
12
+
12
13
-
uses :
denoland/[email protected]
13
14
with :
14
15
deno-version : v1.x
15
- # Setup .npmrc file to publish to npm
16
+
17
+ - name : check format
18
+ run : deno fmt --check
19
+
20
+ - name : check linting
21
+ run : deno lint
22
+
23
+ - name : build npm package
24
+ run : deno run -A _build_npm.ts {{ github.ref }}
25
+
16
26
- uses : actions/setup-node@v2
17
27
with :
18
28
node-version : ' 16.x'
19
29
registry-url : ' https://registry.npmjs.org'
20
- - run : npm run prepare
21
- - run : npm publish
30
+
31
+ - run : |
32
+ cd npm
33
+ npm publish
22
34
env:
23
35
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 103
103
# TernJS port file
104
104
.tern-port
105
105
106
- index.bundle.js
106
+ npm /
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env -S deno run --allow-read --allow-write --allow-net --allow-env --allow-run
2
+ // Copyright 2018-2022 the oak authors. All rights reserved. MIT license.
3
+
4
+ /**
5
+ * This is the build script for building the oak framework into a Node.js
6
+ * compatible npm package.
7
+ *
8
+ * @module
9
+ */
10
+
11
+ import { build , emptyDir } from "https://deno.land/x/[email protected] /mod.ts" ;
12
+
13
+ async function start ( ) {
14
+ await emptyDir ( "./npm" ) ;
15
+
16
+ await build ( {
17
+ entryPoints : [ "./mod.ts" ] ,
18
+ outDir : "./npm" ,
19
+ shims : {
20
+ deno : true ,
21
+ timers : true ,
22
+ } ,
23
+ test : true ,
24
+ compilerOptions : {
25
+ importHelpers : true ,
26
+ target : "ES2021" ,
27
+ } ,
28
+ package : {
29
+ name : "jimmy-js" ,
30
+ version : Deno . args [ 0 ] . substring ( 1 ) ,
31
+ description : "An simple mediator for both Deno and Node.js" ,
32
+ license : "MIT" ,
33
+ author : "Michael Tyson" ,
34
+ engines : {
35
+ node : ">=16.5.0 <18" ,
36
+ } ,
37
+ repository : {
38
+ type : "git" ,
39
+ url : "git+https://github.com/myty/jimmy.git" ,
40
+ } ,
41
+ bugs : {
42
+ url : "https://github.com/myty/jimmy/issues" ,
43
+ } ,
44
+ homepage : "https://github.com/myty/jimmy#readme" ,
45
+ dependencies : {
46
+ "tslib" : "~2.3.1" ,
47
+ } ,
48
+ devDependencies : {
49
+ "@types/node" : "^16" ,
50
+ } ,
51
+ } ,
52
+ } ) ;
53
+
54
+ await Deno . copyFile ( "LICENSE" , "npm/LICENSE" ) ;
55
+ await Deno . copyFile ( "README.md" , "npm/README.md" ) ;
56
+ }
57
+
58
+ start ( ) ;
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments