Tests: include github ref in concurrency group
[jquery.git] / build / command.js
blobe976fac907daa453de244b361567512101807913
1 "use strict";
3 const { build } = require( "./tasks/build" );
4 const yargs = require( "yargs/yargs" );
5 const slimExclude = require( "./tasks/lib/slim-exclude" );
7 const argv = yargs( process.argv.slice( 2 ) )
8         .version( false )
9         .command( {
10                 command: "[options]",
11                 describe: "Build a jQuery bundle"
12         } )
13         .option( "filename", {
14                 alias: "f",
15                 type: "string",
16                 description:
17                         "Set the filename of the built file. Defaults to jquery.js."
18         } )
19         .option( "dir", {
20                 alias: "d",
21                 type: "string",
22                 description:
23                         "Set the dir to which to output the built file. Defaults to /dist."
24         } )
25         .option( "version", {
26                 alias: "v",
27                 type: "string",
28                 description:
29                         "Set the version to include in the built file. " +
30                         "Defaults to the version in package.json plus the " +
31                         "short commit SHA and any excluded modules."
32         } )
33         .option( "watch", {
34                 alias: "w",
35                 type: "boolean",
36                 description:
37                         "Watch the source files and rebuild when they change."
38         } )
39         .option( "exclude", {
40                 alias: "e",
41                 type: "array",
42                 description:
43                         "Modules to exclude from the build. " +
44                         "Specifying this option will cause the " +
45                         "specified modules to be excluded from the build."
46         } )
47         .option( "include", {
48                 alias: "i",
49                 type: "array",
50                 description:
51                         "Modules to include in the build. " +
52                         "Specifying this option will override the " +
53                         "default included modules and only include these modules."
54         } )
55         .option( "esm", {
56                 type: "boolean",
57                 description:
58                         "Build an ES module (ESM) bundle. " +
59                         "By default, a UMD bundle is built."
60         } )
61         .option( "factory", {
62                 type: "boolean",
63                 description:
64                         "Build the factory bundle. " +
65                         "By default, a UMD bundle is built."
66         } )
67         .option( "slim", {
68                 alias: "s",
69                 type: "boolean",
70                 description: "Build a slim bundle, which excludes " +
71                         slimExclude.join( ", " )
72         } )
73         .option( "amd", {
74                 type: "string",
75                 description:
76                         "Set the name of the AMD module. Leave blank to make an anonymous module."
77         } )
78         .help()
79         .argv;
81 build( argv );