Skip to content

Commit

Permalink
Build: Remove --production flag to fix grunt prepare
Browse files Browse the repository at this point in the history
I don't know how long this has been broken for, but, `--production`
is incompatible with grunt-check-modules as used in the
download.jqueryui.com package for the `grunt prepare` step.

Test Plan
* `apt-get install -y libxml2-utils xsltproc imagemagick`
* Create `config.json`
* Run `npx grunt build`

```
Running "build-download" task
Initializing download module, might take a while...
>> Running "check-modules" task
>> Warning: Command failed: npm ls
>> npm ERR! code ELSPROBLEMS
>> npm ERR! missing: [email protected], required by [email protected]
```
  • Loading branch information
Krinkle committed Mar 27, 2024
1 parent 1e7153f commit 8dc5f87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ grunt.registerTask( "build-download", function() {

// At this point, the download builder repo is available, so let's initialize it
grunt.log.writeln( "Initializing download module, might take a while..." );
exec( "npm install --production", {
// TODO: Prefer --omit=dev but can't because `grunt prepare` runs grunt-check-modules,
// which fails if a dev dependency is missing.
exec( "npm install", {
cwd: "node_modules/download.jqueryui.com"
}, function( error, stdout, stderr ) {
if ( error ) {
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@
## Building and Deploying

To build and deploy your changes for previewing in a [`jquery-wp-content`](https://github.com/jquery/jquery-wp-content) instance, follow the [workflow instructions](http://contribute.jquery.org/web-sites/#workflow) from our documentation on [contributing to jQuery Foundation web sites](http://contribute.jquery.org/web-sites/).

Prerequisites:
* `apt-get install -y libxml2-utils xsltproc imagemagick`
* Create `config.json`

Build the dist directory locally:
* `npx grunt build`

0 comments on commit 8dc5f87

Please sign in to comment.