diff --git a/js/grunt/fixEOL.js b/js/grunt/fixEOL.ts similarity index 70% rename from js/grunt/fixEOL.js rename to js/grunt/fixEOL.ts index dbe71793c..861ffa72a 100644 --- a/js/grunt/fixEOL.js +++ b/js/grunt/fixEOL.ts @@ -3,16 +3,11 @@ /** * Fix end of lines for a string based on the operating system this code is being run on. * See https://github.com/phetsims/chipper/issues/933 + * * @author Michael Kauzmann (PhET Interactive Simulations) */ - // modules const os = require( 'os' ); -/** - * @public - * - * @returns {string} - */ -module.exports = string => string.split( '\r' ).join( '' ).split( '\n' ).join( os.EOL ); \ No newline at end of file +export default ( string: string ): string => string.split( '\r' ).join( '' ).split( '\n' ).join( os.EOL ); \ No newline at end of file diff --git a/js/grunt/generateDevelopmentHTML.ts b/js/grunt/generateDevelopmentHTML.ts index 2a55eb7e0..4ca719154 100644 --- a/js/grunt/generateDevelopmentHTML.ts +++ b/js/grunt/generateDevelopmentHTML.ts @@ -14,7 +14,7 @@ import * as _ from 'lodash'; import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js'; const ChipperStringUtils = require( '../common/ChipperStringUtils' ); -const fixEOL = require( './fixEOL' ); +import fixEOL from './fixEOL'; const getPreloads = require( './getPreloads' ); const getStringRepos = require( './getStringRepos' ); const writeFileAndGitAdd = require( '../../../perennial-alias/js/common/writeFileAndGitAdd' ); diff --git a/js/grunt/generateREADME.ts b/js/grunt/generateREADME.ts index 443031abd..9ce692078 100644 --- a/js/grunt/generateREADME.ts +++ b/js/grunt/generateREADME.ts @@ -9,7 +9,7 @@ const ChipperStringUtils = require( '../common/ChipperStringUtils' ); -const fixEOL = require( './fixEOL' ); +import fixEOL from './fixEOL'; const getPhetLibs = require( './getPhetLibs' ); const getTitleStringKey = require( './getTitleStringKey' ); const writeFileAndGitAdd = require( '../../../perennial-alias/js/common/writeFileAndGitAdd' ); diff --git a/js/grunt/getA11yViewHTMLFromTemplate.ts b/js/grunt/getA11yViewHTMLFromTemplate.ts index 36ae0bc81..7a8745103 100644 --- a/js/grunt/getA11yViewHTMLFromTemplate.ts +++ b/js/grunt/getA11yViewHTMLFromTemplate.ts @@ -8,7 +8,7 @@ const ChipperConstants = require( '../common/ChipperConstants' ); const ChipperStringUtils = require( '../common/ChipperStringUtils' ); -const fixEOL = require( './fixEOL' ); +import fixEOL from './fixEOL'; const getTitleStringKey = require( './getTitleStringKey' ); import * as grunt from 'grunt'; diff --git a/js/phet-io/formatPhetioAPI.ts b/js/phet-io/formatPhetioAPI.ts index b723a2488..080a95689 100644 --- a/js/phet-io/formatPhetioAPI.ts +++ b/js/phet-io/formatPhetioAPI.ts @@ -11,7 +11,7 @@ */ const assert = require( 'assert' ); -const fixEOL = require( '../grunt/fixEOL' ); +import fixEOL from '../grunt/fixEOL'; import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.ts';