File tree Expand file tree Collapse file tree 5 files changed +43
-0
lines changed
Expand file tree Collapse file tree 5 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ exports . install = function ( ) {
2+ F . route ( '/' ) ;
3+
4+ setTimeout ( function ( ) {
5+ // EXAMPLE
6+ console . log ( isomorphic . test . getName ( ) ) ;
7+ } , 1000 ) ;
8+ } ;
Original file line number Diff line number Diff line change 1+ // EXAMPLE FOR MERGING
2+ // F.merge('/merge.js', '/js/your-script.js', '#test'); // #test is name of isomorphic file
Original file line number Diff line number Diff line change 1+ require ( 'total.js' ) . http ( 'debug' ) ;
Original file line number Diff line number Diff line change 1+ exports . url = '/test.js' ;
2+
3+ exports . getName = function ( ) {
4+ // is_server
5+ return 'CODE called from ' + ( is_client ? 'client' : 'server' ) ;
6+ } ;
Original file line number Diff line number Diff line change 1+ @{layout('')}
2+
3+ <!DOCTYPE html>
4+ < html >
5+ < head >
6+ @{meta}
7+ < meta charset ="utf-8 " />
8+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge " />
9+ < meta name ="format-detection " content ="telephone=no " />
10+ < meta name ="viewport " content ="width=device-width, initial-scale=1, user-scalable=no " />
11+ < meta name ="robots " content ="all,follow " />
12+ @{head}
13+ <!-- ISOMORPHIC according to /isomorphic/test/exports.url -->
14+ < script src ="/test.js "> </ script >
15+ </ head >
16+ < body >
17+
18+ < h1 > total.js</ h1 >
19+ < div > ISOMORPHIC: < b > @{isomorphic.test.getName()}</ b > </ div >
20+
21+ < script >
22+ alert ( isomorphic . test . getName ( ) ) ;
23+ </ script >
24+
25+ </ body >
26+ </ html >
You can’t perform that action at this time.
0 commit comments