File tree Expand file tree Collapse file tree 5 files changed +16
-30
lines changed
Expand file tree Collapse file tree 5 files changed +16
-30
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ module.exports = function(grunt) {
5858 grunt . registerTask ( 'build:test' , [
5959 'jsx:jasmine' ,
6060 'jsx:test' ,
61- 'browserify :jasmine' ,
61+ 'populist :jasmine' ,
6262 'populist:test'
6363 ] ) ;
6464
Original file line number Diff line number Diff line change @@ -76,33 +76,8 @@ var transformer = {
7676 after : [ simpleBannerify ]
7777} ;
7878
79- var jasmine = {
80- entries : [
81- "./build/jasmine/all.js"
82- ] ,
83- requires : {
84- "jasmine" : "./build/jasmine/all.js"
85- } ,
86- outfile : "./build/jasmine.js" ,
87- debug : false
88- } ;
89-
90- var test = {
91- entries : [
92- "./build/modules/test/all.js" ,
93- ] ,
94- requires : [
95- "**/__tests__/*-test.js"
96- ] ,
97- outfile : './build/react-test.js' ,
98- debug : false ,
99- standalone : false
100- } ;
101-
10279module . exports = {
10380 basic : basic ,
104- jasmine : jasmine ,
105- test : test ,
10681 min : min ,
10782 transformer : transformer
10883} ;
Original file line number Diff line number Diff line change 11'use strict' ;
22
3+ var jasmine = {
4+ rootDirectory : "build/jasmine" ,
5+ // This syntax means to require and expose the "jasmine" module
6+ // (build/jasmine/jasmine.js) as global.jasmine, and to require the
7+ // "all" module (build/jasmine/all.js) but not expose it globally.
8+ args : [ "jasmine:jasmine" , "all:" ] ,
9+ outfile : "./build/jasmine.js"
10+ } ;
11+
312var test = {
13+ rootDirectory : "build/modules" ,
414 args : [ "test/all:" ] ,
515 requires : [
616 "**/__tests__/*-test.js"
@@ -9,5 +19,6 @@ var test = {
919} ;
1020
1121module . exports = {
22+ jasmine : jasmine ,
1223 test : test
1324} ;
Original file line number Diff line number Diff line change @@ -10,16 +10,16 @@ module.exports = function() {
1010 var args = config . args ;
1111
1212 // Make sure the things that need to be exposed are.
13- var requires = config . requires || { } ;
13+ var requires = config . requires || [ ] ;
1414 grunt . file . expand ( {
1515 nonull : true , // Keep IDs that don't expand to anything.
16- cwd : "src"
16+ cwd : config . rootDirectory
1717 } , requires ) . forEach ( function ( name ) {
1818 args . push ( name . replace ( / \. j s $ / i, "" ) ) ;
1919 } ) ;
2020
2121 require ( "populist" ) . buildP ( {
22- rootDirectory : "build/modules" ,
22+ rootDirectory : config . rootDirectory ,
2323 args : args
2424 } ) . then ( function ( output ) {
2525 grunt . file . write ( config . outfile , output ) ;
Original file line number Diff line number Diff line change 1313 < script src ="jasmine.js "> </ script >
1414 < script >
1515 window . onload = function ( ) {
16- require ( " jasmine" ) . getEnv ( ) . execute ( ) ;
16+ jasmine . getEnv ( ) . execute ( ) ;
1717 } ;
1818 </ script >
1919 </ head >
You can’t perform that action at this time.
0 commit comments