Skip to content

Commit 319254b

Browse files
authored
Cleanup and release scripts (#24)
* Updated scripts * Put back d.ts * Fixed package-lock * Fixed package-lock * Fixed package-lock
1 parent a3f16b8 commit 319254b

14 files changed

+11046
-4951
lines changed

.github/workflows/node.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
1-
name: Node
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
25

36
on:
47
push:
5-
branches: ['*']
8+
branches: [master]
69
pull_request:
710
branches: [master]
811

912
jobs:
10-
test:
13+
build:
1114
runs-on: ubuntu-latest
15+
1216
strategy:
1317
matrix:
14-
node-version: [10.x, 12.x]
15-
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v2
18+
node-version: [14.x, 16.x]
1819

19-
- name: Use Node ${{ matrix.node-version }}
20-
uses: actions/setup-node@v1
21-
with:
22-
node-version: ${{ matrix.node-version }}
23-
24-
- name: Install dependencies with Yarn
25-
run: npm install
26-
27-
- name: Build the bundle
28-
run: npm run build
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
2923

30-
- name: Run tests
31-
run: npm test
24+
- name: Build ${{ matrix.node-version }}
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
- run: npm ci
29+
- run: npm test
30+
- run: npm run build --if-present

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*.*.*'
5+
6+
jobs:
7+
publish:
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
- run: npm ci
17+
- run: npm run build
18+
- run: npm test
19+
- uses: JS-DevTools/npm-publish@v1
20+
with:
21+
token: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ node_modules
2626

2727
# Users Environment Variables
2828
.lock-wscript
29+
dist/*.js
30+
dist/*.map
31+
dist/*.css

.npmignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmjs.org/
Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +0,0 @@
1-
import * as L from 'leaflet';
2-
import { Feature, LineString } from 'geojson';
3-
4-
declare module 'leaflet' {
5-
interface SelectOptions {
6-
layer: L.Polyline;
7-
feature: Feature<LineString>;
8-
}
9-
10-
export interface LineStringSelectOptions {
11-
startMarkerClass?: string;
12-
endMarkerClass?: string;
13-
movingMarkerClass?: string;
14-
name?: string;
15-
lineWeight?: number;
16-
lineTolerance?: boolean;
17-
movingMarkerStyle?: L.CircleMarkerOptions;
18-
endpointStyle?: L.CircleMarkerOptions;
19-
selectionStyle?: L.PolylineOptions;
20-
useTouch?: boolean;
21-
position?: L.ControlPosition;
22-
}
23-
24-
namespace Control {
25-
26-
class LineStringSelect extends L.Control {
27-
constructor(options: LineStringSelectOptions);
28-
onAdd(map: L.Map): HTMLElement;
29-
enable(options: SelectOptions): this;
30-
reset(): this;
31-
disable(): this;
32-
toGeoJSON(): Feature<LineString> | null;
33-
selectMeters(start: number, end: number): this;
34-
movingMarkerFactory(pos: L.LatLng, style: L.CircleMarkerOptions): LineStringSelect.ControlMarker;
35-
endpointFactory(pos: L.LatLng, style: L.CircleMarkerOptions, isEnd?: boolean): LineStringSelect.EndPoint;
36-
selectionFactory(coords: L.LatLng[], style: L.PolylineOptions, layer: L.Polyline): LineStringSelect.Selection;
37-
}
38-
39-
namespace LineStringSelect {
40-
class Selection extends L.Polyline { }
41-
class EndPoint extends L.CircleMarker { }
42-
class ControlMarker extends L.CircleMarker { }
43-
}
44-
}
45-
46-
namespace control {
47-
function lineStringSelect(options: LineStringSelectOptions): Control.LineStringSelect;
48-
}
49-
}

0 commit comments

Comments
 (0)