Skip to content

Commit

Permalink
Convert to TypeScript, see #1465
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Oct 15, 2024
1 parent 4011d3d commit 4fb3dbe
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
9 changes: 2 additions & 7 deletions js/grunt/fixEOL.js → js/grunt/fixEOL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
export default ( string: string ): string => string.split( '\r' ).join( '' ).split( '\n' ).join( os.EOL );
2 changes: 1 addition & 1 deletion js/grunt/generateDevelopmentHTML.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/generateREADME.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/getA11yViewHTMLFromTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion js/phet-io/formatPhetioAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down

0 comments on commit 4fb3dbe

Please sign in to comment.