File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 22All notable changes to this project will be documented in this file.
33This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
44
5- ## [ 0.9.2 ] - 2016-08-01
5+ ## [ 0.9.3 ] - 2016-08-01
66- add "exists" global file path checker
77- upgrade to mocha@3.0.0
88- set "node_modules" to user project directory
9+ - compile JS code to ES5 using the TypeScript compiler
10+ - allows for both ES6 & TypeScript input
911
1012## [ 0.8.0] - 2016-06-28
1113- load with object
Original file line number Diff line number Diff line change @@ -3,9 +3,12 @@ var fs_1 = require('fs');
33var process_console_log_1 = require ( 'process-console-log' ) ;
44var exists_1 = require ( './exists' ) ;
55var constants_1 = require ( './constants' ) ;
6+ var ts = require ( 'typescript' ) ;
67function writeTest ( config , testString ) {
78 return new Promise ( function ( resolve , reject ) {
8- var output = process_console_log_1 . logger + exists_1 . default ( config . dir ) + testString ;
9+ var output = process_console_log_1 . logger + exists_1 . default ( config . dir ) + ts . transpile ( testString , {
10+ module : ts . ModuleKind . CommonJS
11+ } ) ;
912 fs_1 . writeFile ( constants_1 . testPath , output , function ( err ) {
1013 if ( err ) {
1114 reject ( err ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " mocha-coderoad" ,
3- "version" : " 0.9.2 " ,
3+ "version" : " 0.9.3 " ,
44 "description" : " mocha test runner & reporter for atom-coderoad" ,
55 "main" : " lib/index.js" ,
66 "scripts" : {
2828 "dependencies" : {
2929 "mocha" : " ^3.0.0" ,
3030 "node-file-exists" : " ^1.1.0" ,
31- "process-console-log" : " ^0.2.2"
31+ "process-console-log" : " ^0.2.2" ,
32+ "typescript" : " ^1.8.10"
3233 },
3334 "devDependencies" : {
3435 "chai" : " ^3.5.0" ,
Original file line number Diff line number Diff line change @@ -2,11 +2,14 @@ import {writeFile} from 'fs';
22import { logger } from 'process-console-log' ;
33import exists from './exists' ;
44import { testPath } from './constants' ;
5+ import * as ts from 'typescript' ;
56
67export default function writeTest ( config , testString : string ) {
78 return new Promise ( ( resolve , reject ) => {
8- // append logger
9- const output = logger + exists ( config . dir ) + testString ;
9+ // append logger, compile using ts compiler
10+ const output = logger + exists ( config . dir ) + ts . transpile ( testString , {
11+ module : ts . ModuleKind . CommonJS
12+ } ) ;
1013 // write test file
1114 writeFile ( testPath , output , ( err ) => {
1215 if ( err ) { reject ( err ) ; }
You can’t perform that action at this time.
0 commit comments