-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert grunt entry points to support Typescript #1464
Labels
Comments
6 tasks
samreid
added a commit
that referenced
this issue
Sep 18, 2024
samreid
added a commit
to phetsims/aqua
that referenced
this issue
Sep 18, 2024
samreid
added a commit
to phetsims/aqua
that referenced
this issue
Sep 18, 2024
samreid
added a commit
that referenced
this issue
Sep 18, 2024
samreid
added a commit
to phetsims/perennial
that referenced
this issue
Sep 18, 2024
samreid
added a commit
to phetsims/perennial
that referenced
this issue
Sep 18, 2024
Subject: [PATCH] Remove debug output, see https://github.com/phetsims/chipper/issues/1464
---
Index: js/grunt/tasks/default.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/grunt/tasks/default.ts b/js/grunt/tasks/default.ts
new file mode 100644
--- /dev/null (date 1726665967088)
+++ b/js/grunt/tasks/default.ts (date 1726665967088)
@@ -0,0 +1,29 @@
+// Copyright 2024, University of Colorado Boulder
+
+/**
+ * Erases the build/ directory and all its contents, and recreates the build/ directory
+ *
+ * @author Sam Reid (PhET Interactive Simulations)
+ */
+
+import * as grunt from 'grunt';
+import { lintAll } from './lint-all';
+
+( async () => {
+ if ( grunt.option( 'lint' ) === false ) {
+ // do nothing
+ }
+ else {
+ await lintAll();
+ }
+
+ if ( grunt.option( 'report-media' ) === false ) {
+ // do nothing
+ }
+ else {
+ require( './report-media' );
+ }
+
+ require( './clean' );
+ require( './build' );
+} )();
\ No newline at end of file
Index: js/grunt/tasks/lint-all.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/grunt/tasks/lint-all.ts b/js/grunt/tasks/lint-all.ts
--- a/js/grunt/tasks/lint-all.ts (revision 9450827abc96e869f16ddf0c16df33c71b0ff795)
+++ b/js/grunt/tasks/lint-all.ts (date 1726666208980)
@@ -1,12 +1,11 @@
// Copyright 2024, University of Colorado Boulder
/**
- * lint all js files that are required to build this repository (for the specified brands)
+ * Lints all JS files required to build this repository (for the specified brands)
*
* @author Sam Reid (PhET Interactive Simulations)
*/
-// @ts-expect-error
import assert from 'assert';
import * as grunt from 'grunt';
import buildLocal from './util/buildLocal';
@@ -22,21 +21,35 @@
const cache = !getOption( 'disable-eslint-cache' );
const fix = getOption( 'fix' );
const chipAway = getOption( 'chip-away' );
-assert && assert( !getOption( 'patterns' ), 'patterns not support for lint-all' );
+assert( !getOption( 'patterns' ), 'patterns not support for lint-all' );
const getPhetLibs = require( '../getPhetLibs' );
const brands = getBrands( grunt, repo, buildLocal );
-( async () => {
+/**
+ * Executes the linting process.
+ */
+export async function lintAll(): Promise<void> {
const lintReturnValue = await lint( getPhetLibs( repo, brands ), {
cache: cache,
fix: fix,
chipAway: chipAway
} );
-// Output results on errors.
+ // Output results on errors.
if ( !lintReturnValue.ok ) {
grunt.fail.fatal( 'Lint failed' );
}
-} )();
\ No newline at end of file
+ else {
+ console.log( 'Linting completed successfully.' );
+ }
+}
+
+// Detect if the script is run directly
+if ( import.meta.url === `file://${process.argv[ 1 ]}` ) {
+ lintAll().catch( error => {
+ console.error( 'Linting failed:', error );
+ process.exit( 1 );
+ } );
+}
\ No newline at end of file |
samreid
added a commit
that referenced
this issue
Sep 18, 2024
samreid
added a commit
to phetsims/aqua
that referenced
this issue
Sep 18, 2024
samreid
added a commit
to phetsims/dot
that referenced
this issue
Sep 18, 2024
samreid
added a commit
to phetsims/dot
that referenced
this issue
Sep 18, 2024
samreid
added a commit
that referenced
this issue
Sep 19, 2024
samreid
added a commit
that referenced
this issue
Sep 19, 2024
samreid
added a commit
that referenced
this issue
Sep 19, 2024
I made #1465 for the less interesting commits that are just about TypeScript conversion. |
27 tasks
Working on this now. |
10 tasks
zepumph
added a commit
to phetsims/perennial
that referenced
this issue
Sep 27, 2024
zepumph
added a commit
to phetsims/perennial
that referenced
this issue
Sep 27, 2024
All items have been handled or are now in side issues. Closing |
samreid
added a commit
to phetsims/dot
that referenced
this issue
Oct 15, 2024
samreid
added a commit
to phetsims/kite
that referenced
this issue
Oct 15, 2024
samreid
added a commit
that referenced
this issue
Oct 15, 2024
zepumph
added a commit
to phetsims/kite
that referenced
this issue
Oct 15, 2024
zepumph
added a commit
to phetsims/rosetta
that referenced
this issue
Oct 15, 2024
zepumph
added a commit
to phetsims/rosetta
that referenced
this issue
Oct 15, 2024
zepumph
added a commit
to phetsims/perennial
that referenced
this issue
Oct 15, 2024
zepumph
added a commit
to phetsims/perennial
that referenced
this issue
Oct 15, 2024
zepumph
added a commit
to phetsims/perennial
that referenced
this issue
Oct 15, 2024
samreid
pushed a commit
to phetsims/perennial
that referenced
this issue
Oct 21, 2024
samreid
pushed a commit
to phetsims/perennial
that referenced
this issue
Oct 21, 2024
samreid
pushed a commit
to phetsims/perennial
that referenced
this issue
Oct 21, 2024
samreid
pushed a commit
to phetsims/perennial
that referenced
this issue
Oct 21, 2024
samreid
pushed a commit
to phetsims/perennial
that referenced
this issue
Oct 21, 2024
samreid
pushed a commit
to phetsims/perennial
that referenced
this issue
Oct 22, 2024
zepumph
added a commit
to phetsims/perennial
that referenced
this issue
Oct 22, 2024
zepumph
added a commit
to phetsims/perennial
that referenced
this issue
Oct 22, 2024
zepumph
added a commit
to phetsims/perennial
that referenced
this issue
Oct 22, 2024
zepumph
added a commit
to phetsims/perennial
that referenced
this issue
Oct 22, 2024
zepumph
added a commit
to phetsims/perennial
that referenced
this issue
Oct 22, 2024
zepumph
added a commit
to phetsims/perennial
that referenced
this issue
Oct 22, 2024
zepumph
pushed a commit
to phetsims/perennial
that referenced
this issue
Oct 22, 2024
samreid
pushed a commit
that referenced
this issue
Oct 23, 2024
samreid
pushed a commit
that referenced
this issue
Oct 23, 2024
samreid
pushed a commit
that referenced
this issue
Nov 22, 2024
samreid
pushed a commit
that referenced
this issue
Nov 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In #1459 we established how to use TypeScript in chipper via spawned processes. We would like to expand that usage to perennial/aqua/dot/kite/scenery and within chipper/. Be aware of #1463 which should likely happen before this.
repos with a typescript_chipper_1464 branch
The text was updated successfully, but these errors were encountered: