Skip to content

Commit

Permalink
Move output-js to tasks/, see #1459
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Sep 12, 2024
1 parent bcdf21c commit 65888c5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
8 changes: 1 addition & 7 deletions js/grunt/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ module.exports = function( grunt ) {
);

grunt.registerTask( 'output-js', 'Outputs JS just for the specified repo',
wrapTask( async () => {
transpiler.transpileRepo( repo );
} )
wrapExecSync( `node ../chipper/js/grunt/tasks/output-js.js --repo ${repo}` )
);
grunt.registerTask( 'output-js-project', 'Outputs JS for the specified repo and its dependencies',
wrapTask( async () => {
Expand All @@ -146,10 +144,6 @@ module.exports = function( grunt ) {
} )
);

grunt.registerTask( 'typescript-test', 'For testing typescript in our build tools', wrapTask( async () => {
require( './typescript-test' )();
} ) );

grunt.registerTask( 'build',
`Builds the repository. Depending on the repository type (runnable/wrapper/standalone), the result may vary.
Runnable build options:
Expand Down
13 changes: 13 additions & 0 deletions js/grunt/tasks/output-js.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright 2024, University of Colorado Boulder

const getRequiredArg = require( './getRequiredArg' );

/**
* @author Sam Reid (PhET Interactive Simulations)
*/
const Transpiler = require( '../../common/Transpiler' );
const transpiler = new Transpiler();

const repo = getRequiredArg( '--repo' );

transpiler.transpileRepo( repo );

0 comments on commit 65888c5

Please sign in to comment.