File tree 4 files changed +21
-16
lines changed
4 files changed +21
-16
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "presets" : [
3
+ " latest"
4
+ ]
5
+ }
Original file line number Diff line number Diff line change 1
- var express = require ( 'express' ) ;
2
- var path = require ( 'path' ) ;
3
- var open = require ( 'open' ) ;
1
+ import express from 'express' ;
2
+ import path from 'path' ;
3
+ import open from 'open' ;
4
4
5
- var port = 4000 ;
6
- var app = express ( ) ;
5
+ const port = 4000 ;
6
+ const app = express ( ) ;
7
7
8
- app . get ( '/' , function ( req , res ) {
9
- res . sendFile ( path . join ( __dirname , '../src/index.html' ) ) ;
10
- } ) ;
8
+ app . get ( '/' , ( req , res ) =>
9
+ res . sendFile ( path . join ( __dirname , '../src/index.html' ) )
10
+ ) ;
11
11
12
- app . listen ( port , function ( err ) {
12
+ app . listen ( port , ( err ) => {
13
13
if ( err ) {
14
14
console . log ( err ) ;
15
15
} else {
Original file line number Diff line number Diff line change 1
- var chalk = require ( 'chalk' ) ;
1
+ import chalk from 'chalk' ;
2
2
3
3
console . log ( chalk . green ( 'Starting app in dev mode..' ) ) ;
Original file line number Diff line number Diff line change 3
3
"version" : " 1.0.0" ,
4
4
"description" : " Work out how to do mordern javascript development" ,
5
5
"scripts" : {
6
- "prestart" : " node buildScripts/startMessage.js" ,
6
+ "prestart" : " babel- node buildScripts/startMessage.js" ,
7
7
"start" : " npm-run-all --parallel security-check open:src" ,
8
- "open:src" : " node buildScripts/srcServer.js" ,
8
+ "open:src" : " babel- node buildScripts/srcServer.js" ,
9
9
"security-check" : " nsp check" ,
10
10
"localtunnel" : " lt --port 4000" ,
11
11
"share" : " npm-run-all --parallel open:src localtunnel"
16
16
"whatwg-fetch" : " 1.0.0"
17
17
},
18
18
"devDependencies" : {
19
- "babel-cli" : " 6.16 .0" ,
20
- "babel-core" : " 6.17 .0" ,
21
- "babel-loader" : " 6.2.5 " ,
19
+ "babel-cli" : " 6.18 .0" ,
20
+ "babel-core" : " 6.21 .0" ,
21
+ "babel-loader" : " 6.2.10 " ,
22
22
"babel-preset-latest" : " 6.16.0" ,
23
- "babel-register" : " 6.16.3 " ,
23
+ "babel-register" : " 6.18.0 " ,
24
24
"chai" : " 3.5.0" ,
25
25
"chalk" : " 1.1.3" ,
26
26
"cheerio" : " 0.22.0" ,
You can’t perform that action at this time.
0 commit comments