Skip to content

Commit

Permalink
Build: Add package build shebang and sync comments (#58264)
Browse files Browse the repository at this point in the history
- Add shebang to bin/packages/build.js. This allows it to be called directly. It was already executable but was missing this.
- Add comments to BUNDLED_PACKAGES stating that they should remain in sync and referencing the other location.
  • Loading branch information
sirreal authored Jan 25, 2024
1 parent 94a35df commit 92bd375
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bin/packages/build.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env node

/**
* External dependencies
*/
Expand Down
4 changes: 4 additions & 0 deletions packages/dependency-extraction-webpack-plugin/lib/util.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
const WORDPRESS_NAMESPACE = '@wordpress/';

// !!
// This list must be kept in sync with the same list in tools/webpack/packages.js
// !!
const BUNDLED_PACKAGES = [
'@wordpress/dataviews',
'@wordpress/icons',
Expand Down
8 changes: 6 additions & 2 deletions tools/webpack/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ const WORDPRESS_NAMESPACE = '@wordpress/';
// Experimental or other packages that should be private are bundled when used.
// That way, we can iterate on these package without making them part of the public API.
// See: https://github.com/WordPress/gutenberg/pull/19809
//
// !!
// This list must be kept in sync with the matching list in packages/dependency-extraction-webpack-plugin/lib/util.js
// !!
const BUNDLED_PACKAGES = [
'@wordpress/dataviews',
'@wordpress/icons',
'@wordpress/interface',
'@wordpress/undo-manager',
'@wordpress/sync',
'@wordpress/dataviews',
'@wordpress/undo-manager',
];

// PHP files in packages that have to be copied during build.
Expand Down

0 comments on commit 92bd375

Please sign in to comment.