Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 8 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
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
spec
script
src
lib
.npmignore
.DS_Store
npm-debug.log
Expand Down
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ notifications:
on_failure: change

node_js:
- 8
- 10
- 12
- 14

git:
depth: 10
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,9 @@ const {Disposable} = require('event-kit')

const disposable = new Disposable(() => this.destroyResource())
```

### Using ES6 Code
You can use the ES6 style classes from `lib` directory.
```
const {Disposable} = require('event-kit/lib/event-kit')
```
6 changes: 5 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
environment:
nodejs_version: "6"
matrix:
- nodejs_version: "10"
- nodejs_version: "12"
- nodejs_version: "14"

platform:
- x64
- x86

install:
- SET PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\bin;%PATH%
- ps: Install-Product node $env:nodejs_version
- npm install

Expand Down
10 changes: 10 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let presets = ["babel-preset-atomic"];

let plugins = ["@babel/plugin-transform-classes"] // this is needed so Disposabale can be extended by ES5-style classes

module.exports = {
presets: presets,
plugins: plugins,
exclude: "node_modules/**",
sourceMap: true,
}
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"description": "Simple library for implementing and consuming evented APIs",
"main": "./dist/event-kit",
"scripts": {
"prepublish": "babel lib --out-dir dist --presets @babel/env && joanna-tello -o api.json package.json lib",
"build": "cross-env BABEL_KEEP_MODULES=false babel lib --out-dir dist --delete-dir-on-start",
"docs": "joanna-tello -o api.json package.json lib",
"prepublish": "npm run build && npm run docs",
"test": "jasmine-focused --captureExceptions --forceexit spec"
},
"repository": {
Expand All @@ -16,12 +18,11 @@
},
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"@babel/preset-env": "^7.1.0",
"jasmine-focused": "^1.0.4",
"joanna": "0.0.11",
"rimraf": "^2.2.2",
"temp": "^0.6.0"
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"babel-preset-atomic": "^2.5.4",
"cross-env": "^7.0.2",
"jasmine-focused": "^1.0.7",
"joanna": "https://github.com/aminya/joanna"
Comment thread
sadick254 marked this conversation as resolved.
}
}