This repository was archived by the owner on Oct 9, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +137
-25
lines changed
Expand file tree Collapse file tree 10 files changed +137
-25
lines changed Original file line number Diff line number Diff line change 11---
2+ addons :
3+ apt :
4+ packages :
5+ - xvfb
26git :
37 depth : 1
48sudo : false
59cache :
610 directories :
7- - node_modules
8- - build-babel/node_modules
911 - build-babel/jspm_packages
12+ - build-babel/node_modules
13+ - node_modules
14+ - test/jspm_packages
15+ - test/jspm_bundles
16+ - test/node_modules
1017language : node_js
1118matrix :
1219 include :
@@ -15,6 +22,11 @@ matrix:
1522 - node_js : ' 4'
1623 - node_js : ' 5'
1724 - node_js : ' 6'
25+ install :
26+ - export DISPLAY=':99.0'
27+ - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
28+ - npm install
1829before_script :
1930 - " npm i jspm@beta --prefix build-babel" # Force install in build-babel/node_modules
31+ - " npm run build:tape"
2032 - " npm run build"
Original file line number Diff line number Diff line change 55 "jspmPackage" : true ,
66 "scripts" : {
77 "build" : " ./build.sh" ,
8+ "build:tape" : " test/bundleTape.sh" ,
89 "clear" : " rm -rf build-babel/node_modules build-babel/jspm_packages regenerator-runtime.js systemjs-babel-node.js systemjs-babel-browser.js" ,
910 "prepublish" : " npm run build" ,
1011 "preversion" : " npm run test" ,
11- "test" : " node test/index.js"
12+ "test" : " npm run test:node && npm run test:browser" ,
13+ "test:node" : " node test/index.js" ,
14+ "test:browser" : " cat test/index.html | browser-run --input html --static ./"
1215 },
1316 "main" : " plugin-babel.js" ,
1417 "map" : {
Original file line number Diff line number Diff line change 1+ /jspm_bundles
2+ /jspm.config.js
Original file line number Diff line number Diff line change 1+ #! /bin/bash -xv
2+
3+ NODE_CWD=./node_modules/.bin
4+ JSPM_CMD=${NODE_CWD} /jspm
5+
6+ TMP_DIR=test
7+ BUNDLE_DEST_DIR=test
8+ JSPM_VERSION=beta
9+
10+ #
11+
12+ cd $TMP_DIR
13+
14+ npm install jspm@${JSPM_VERSION} --cache-min=Infinity
15+
16+ ${JSPM_CMD} install tape=npm:tape --yes --quick --log err
17+ ${JSPM_CMD} build tape jspm_bundles/tape.amd-bundle.min.js --format amd --skip-source-maps --skip-rollup --minify --log ok
18+
19+ cd ..
Original file line number Diff line number Diff line change 1+ < script src ="test/jspm_packages/system.src.js "> </ script >
2+ < script type ="text/javascript ">
3+ System . config ( {
4+ 'map' : {
5+ 'tape' : './test/jspm_bundles/tape.amd-bundle.min.js' ,
6+ 'systemjs' : './test/jspm_packages/system.src.js'
7+ } ,
8+ 'packages' : {
9+ 'systemjs' : {
10+ format : 'global'
11+ }
12+ }
13+ } )
14+
15+ System . config ( {
16+ map : {
17+ 'plugin-babel' : './plugin-babel.js' ,
18+ 'systemjs-babel-build' : './systemjs-babel-browser.js'
19+ } ,
20+ transpiler : 'plugin-babel'
21+ } ) ;
22+ </ script >
23+
24+ < script type ="text/javascript ">
25+ SystemJS
26+ . import ( './test/scenarios/index.js' )
27+ . then ( registerTapeOnFinish , window . close ) ;
28+
29+ //
30+
31+ function registerTapeOnFinish ( ) {
32+ SystemJS . import ( 'tape' )
33+ . then ( function ( tape$m ) {
34+ tape$m . onFinish ( window . close )
35+ } )
36+ }
37+ </ script >
Original file line number Diff line number Diff line change 33var test = require ( 'tape' ) ;
44var SystemJS = require ( 'systemjs' ) ;
55
6- test ( 'systemjs-plugin-babel' , function ( t ) {
7- t . plan ( 1 ) ;
8-
9- // given
10- System . config ( {
11- map : {
12- 'plugin-babel' : './plugin-babel.js' ,
13- 'systemjs-babel-build' : './systemjs-babel-node.js'
14- } ,
15- transpiler : 'plugin-babel'
16- } ) ;
17-
18- // when
19- System . import ( 'test/testing-code.js' )
20-
21- // then
22- . then ( function ( m ) {
23- return m . p ( ) . then ( function ( message ) {
24- t . equal ( message , 'Rocks :)' ) ;
25- } ) ;
26- } )
27- . then ( t . end , t . end ) ;
6+ System . config ( {
7+ map : {
8+ 'plugin-babel' : './plugin-babel.js' ,
9+ 'systemjs-babel-build' : './systemjs-babel-node.js'
10+ } ,
11+ transpiler : 'plugin-babel'
2812} ) ;
13+
14+ require ( './scenarios/index.js' ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "jspm" : {
3+ "dependencies" : {
4+ "tape" : " npm:tape"
5+ },
6+ "peerDependencies" : {
7+ "assert" : " github:jspm/nodelibs-assert@^0.2.0-alpha" ,
8+ "buffer" : " github:jspm/nodelibs-buffer@^0.2.0-alpha" ,
9+ "child_process" : " github:jspm/nodelibs-child_process@^0.2.0-alpha" ,
10+ "events" : " github:jspm/nodelibs-events@^0.2.0-alpha" ,
11+ "fs" : " github:jspm/nodelibs-fs@^0.2.0-alpha" ,
12+ "http" : " github:jspm/nodelibs-http@^0.2.0-alpha" ,
13+ "path" : " github:jspm/nodelibs-path@^0.2.0-alpha" ,
14+ "process" : " github:jspm/nodelibs-process@^0.2.0-alpha" ,
15+ "stream" : " github:jspm/nodelibs-stream@^0.2.0-alpha" ,
16+ "url" : " github:jspm/nodelibs-url@^0.2.0-alpha" ,
17+ "util" : " github:jspm/nodelibs-util@^0.2.0-alpha"
18+ },
19+ "overrides" : {
20+ "npm:inherits@2.0.1" : {
21+ "ignore" : [
22+ " test.js"
23+ ]
24+ }
25+ }
26+ }
27+ }
File renamed without changes.
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ var test = require ( 'tape' ) ;
4+ var SystemJS = require ( 'systemjs' ) ;
5+
6+ test ( 'systemjs-plugin-babel' , function ( t ) {
7+ t . plan ( 1 ) ;
8+
9+ // given
10+
11+ // when
12+ System . import ( __dirname + '/actual.js' )
13+
14+ // then
15+ . then ( function ( m ) {
16+ return m . p ( ) . then ( function ( message ) {
17+ t . equal ( message , 'Rocks :)' ) ;
18+ } ) ;
19+ } )
20+ . then ( t . end , t . end ) ;
21+ } ) ;
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ //
4+
5+ require ( './basic/index.js' ) ;
You can’t perform that action at this time.
0 commit comments