Skip to content

Commit a2d1e5d

Browse files
chore(build): update build and deps (#137)
1 parent 45fc295 commit a2d1e5d

File tree

4 files changed

+39
-34
lines changed

4 files changed

+39
-34
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
22
.idea/
33
coverage/
4-
dist/
4+
dist/
5+
.nyc_output/

package.json

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,23 @@
22
"name": "@most/dom-event",
33
"version": "1.5.0",
44
"description": "Streamlined DOM Events for most.js",
5-
"main": "dist/mostDomEvent.js",
6-
"module": "dist/mostDomEvent.es.js",
5+
"main": "dist/index.js",
6+
"module": "dist/index.es.js",
77
"typings": "type-definitions/dom-event.d.ts",
88
"files": [
9-
"src/*",
10-
"dist/*",
11-
"type-definitions/dom-event.d.ts"
9+
"dist",
10+
"type-definitions"
1211
],
1312
"scripts": {
1413
"build": "npm run build:dist && npm run build:min && npm run build:flow",
15-
"build:dist": "mkdir -p dist && rollup -c && rollup -c rollup.es.js",
16-
"build:min": "uglifyjs dist/mostDomEvent.js -o dist/mostDomEvent.min.js",
17-
"build:flow": "cpy src/index.js.flow dist --rename mostDomEvent.js.flow",
14+
"build:dist": "rollup -c",
15+
"build:min": "uglifyjs dist/index.js -o dist/index.min.js",
16+
"build:flow": "cpy src/index.js.flow dist --rename index.js.flow",
1817
"prepublish": "npm run build",
19-
"preversion": "npm run build",
2018
"test": "npm run test:lint && npm run test:unit && npm run test:flow",
21-
"test:unit": "istanbul cover _mocha",
19+
"test:unit": "nyc mocha",
2220
"test:lint": "standard --fix 'src/*.js' 'test/*.js' --verbose | snazzy",
23-
"test:flow": "flow check",
24-
"postpublish": "greenkeeper-postpublish"
21+
"test:flow": "flow check"
2522
},
2623
"repository": {
2724
"type": "git",
@@ -44,17 +41,16 @@
4441
"devDependencies": {
4542
"@briancavalier/assert": "^3.4.0",
4643
"@most/core": "^0.13.0",
47-
"buba": "^3.0.0",
44+
"buba": "^4.0.2",
4845
"cpy-cli": "^1.0.1",
49-
"flow-bin": "^0.54.0",
50-
"greenkeeper-postpublish": "^1.0.1",
51-
"istanbul": "^1.1.0-alpha.1",
46+
"flow-bin": "^0.55.0",
5247
"mocha": "^3.0.2",
53-
"rollup": "0.40.0",
48+
"nyc": "^11.2.1",
49+
"rollup": "^0.50.0",
5450
"rollup-plugin-buble": "0.15.0",
5551
"snazzy": "^7.0.0",
5652
"standard": "^10.0.3",
57-
"uglify-js": "^2.7.1"
53+
"uglify-js": "^3.1.1"
5854
},
5955
"standard": {
6056
"ignore": [

rollup.config.js

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
1-
import buble from 'rollup-plugin-buble';
1+
import buble from 'rollup-plugin-buble'
2+
import pkg from './package.json'
23

34
export default {
4-
entry: 'src/index.js',
5-
dest: 'dist/mostDomEvent.js',
6-
format: 'umd',
7-
moduleName: 'mostDomEvent',
8-
sourceMap: true,
9-
plugins: [buble()]
5+
input: 'src/index.js',
6+
plugins: [
7+
buble()
8+
],
9+
external: ['@most/scheduler'],
10+
output: [
11+
{
12+
file: pkg.main,
13+
format: 'umd',
14+
name: 'mostDomEvent',
15+
sourcemap: true,
16+
globals: {
17+
'@most/scheduler': 'mostScheduler'
18+
}
19+
},
20+
{
21+
file: pkg.module,
22+
format: 'es',
23+
sourcemap: true
24+
}
25+
]
1026
}

rollup.es.js

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

0 commit comments

Comments
 (0)