This repository was archived by the owner on Feb 11, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +34
-38
lines changed Expand file tree Collapse file tree 10 files changed +34
-38
lines changed Original file line number Diff line number Diff line change @@ -116,30 +116,26 @@ module.exports = function(grunt) {
116
116
} ) ;
117
117
118
118
grunt . registerTask ( 'build' , function ( ) {
119
- var esperanto = require ( 'esperanto ' ) ;
119
+ var rollup = require ( 'rollup ' ) ;
120
120
var done = this . async ( ) ;
121
121
122
122
grunt . log . write ( 'Building PEP...' ) ;
123
- esperanto . bundle ( {
124
- base : 'src' ,
125
- entry : 'pointerevents.js'
123
+ rollup . rollup ( {
124
+ entry : 'src/pointerevents.js'
126
125
} ) . then ( function ( bundle ) {
127
- var umd = bundle . toUmd ( {
128
- name : 'PointerEventsPolyfill'
129
-
130
- // sourceMap: true,
131
- // sourceMapFile: 'dist/pep.js'
126
+ var result = bundle . generate ( {
127
+ moduleName : 'PointerEventsPolyfill' ,
128
+ format : 'umd' ,
129
+ banner : header
132
130
} ) ;
133
- grunt . file . write ( 'dist/pep.js' , header + umd . code ) ;
134
-
135
- // grunt.file.write('dist/pep.js.map', umd.map.toString());
131
+ grunt . file . write ( 'dist/pep.js' , result . code ) ;
136
132
} ) . then (
137
133
function ( ) {
138
134
grunt . log . ok ( ) ;
139
135
done ( ) ;
140
136
} ,
141
137
function ( error ) {
142
- grunt . log . error ( ) ;
138
+ grunt . log . error ( error ) ;
143
139
done ( error ) ;
144
140
}
145
141
) ;
Original file line number Diff line number Diff line change 22
22
"atob" : " ^1.1.2" ,
23
23
"bluebird" : " ^2.9.30" ,
24
24
"chai-spies" : " ^0.5.1" ,
25
- "esperanto" : " ^0.6.6" ,
26
25
"fs-extra" : " ^0.19.0" ,
27
26
"glob" : " ^5.0.10" ,
28
27
"grunt" : " ~0.4.1" ,
34
33
"grunt-selenium-standalone" : " 1.0.1" ,
35
34
"intern" : " 2.2.2" ,
36
35
"lodash" : " ^3.9.3" ,
37
- "request" : " ^2.58.0"
36
+ "request" : " ^2.58.0" ,
37
+ "rollup" : " ^0.26.1"
38
38
},
39
39
"web-platform-tests" : {
40
40
"repo" : " w3c/web-platform-tests#c98d1ff0ea91ba1aa9a15e8ea2d70d8ede1fdc0e" ,
Original file line number Diff line number Diff line change 1
- import dispatcher from 'dispatcher' ;
1
+ import dispatcher from './ dispatcher' ;
2
2
3
3
var n = window . navigator ;
4
4
var s , r ;
Original file line number Diff line number Diff line change 1
- import PointerEvent from 'PointerEvent' ;
2
- import PointerMap from 'pointermap' ;
1
+ import PointerEvent from './ PointerEvent' ;
2
+ import PointerMap from './ pointermap' ;
3
3
4
4
var CLONE_PROPS = [
5
5
Original file line number Diff line number Diff line change 5
5
* All nodes that wish to generate Pointer Events must have the attribute
6
6
* `touch-action` set to `none`.
7
7
*/
8
- import targeting from 'targeting' ;
8
+ import targeting from './ targeting' ;
9
9
10
10
var forEach = Array . prototype . forEach . call . bind ( Array . prototype . forEach ) ;
11
11
var map = Array . prototype . map . call . bind ( Array . prototype . map ) ;
Original file line number Diff line number Diff line change 1
- import dispatcher from 'dispatcher' ;
1
+ import dispatcher from './ dispatcher' ;
2
2
3
3
var pointermap = dispatcher . pointermap ;
4
4
Original file line number Diff line number Diff line change 1
- import dispatcher from 'dispatcher' ;
1
+ import dispatcher from './ dispatcher' ;
2
2
3
3
var pointermap = dispatcher . pointermap ;
4
4
var HAS_BITMAP_TYPE = window . MSPointerEvent &&
Original file line number Diff line number Diff line change 1
- import PointerEvent from 'PointerEvent' ;
2
- import dispatcher from 'dispatcher' ;
3
- import mouseEvents from 'mouse' ;
4
- import touchEvents from 'touch' ;
5
- import msEvents from 'ms' ;
1
+ import PointerEvent from './ PointerEvent' ;
2
+ import dispatcher from './ dispatcher' ;
3
+ import mouseEvents from './ mouse' ;
4
+ import touchEvents from './ touch' ;
5
+ import msEvents from './ ms' ;
6
6
7
7
export function applyPolyfill ( ) {
8
8
Original file line number Diff line number Diff line change 1
- import dispatcher from 'dispatcher' ;
2
- import PointerMap from 'pointermap' ;
3
- import Installer from 'installer' ;
4
- import targeting from 'targeting' ;
5
- import PointerEvent from 'PointerEvent' ;
6
- import { applyAttributeStyles } from 'touch-action' ;
7
- import { applyPolyfill as applyPointerEventPolyfill } from 'platform-events' ;
8
- import { applyPolyfill as applyCapturePolyfill } from 'capture' ;
1
+ import dispatcher from './ dispatcher' ;
2
+ import PointerMap from './ pointermap' ;
3
+ import Installer from './ installer' ;
4
+ import targeting from './ targeting' ;
5
+ import PointerEvent from './ PointerEvent' ;
6
+ import { applyAttributeStyles } from './ touch-action' ;
7
+ import { applyPolyfill as applyPointerEventPolyfill } from './ platform-events' ;
8
+ import { applyPolyfill as applyCapturePolyfill } from './ capture' ;
9
9
10
10
applyAttributeStyles ( ) ;
11
11
applyPointerEventPolyfill ( ) ;
Original file line number Diff line number Diff line change 1
- import targeting from 'targeting' ;
2
- import dispatcher from 'dispatcher' ;
3
- import Installer from 'installer' ;
4
- import mouseEvents from 'mouse' ;
1
+ import targeting from './ targeting' ;
2
+ import dispatcher from './ dispatcher' ;
3
+ import Installer from './ installer' ;
4
+ import mouseEvents from './ mouse' ;
5
5
6
6
var captureInfo = dispatcher . captureInfo ;
7
7
var findTarget = targeting . findTarget . bind ( targeting ) ;
You can’t perform that action at this time.
0 commit comments