forked from QwikDev/qwik
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add comments to build scripts
- Loading branch information
1 parent
9821cc4
commit 0f1e36e
Showing
13 changed files
with
207 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
const { register } = require('esbuild-register/dist/node'); | ||
/** | ||
* This is the root build scripts module (keep in commonjs). It's only a .js file | ||
* but will handling registering typescript files with esbuild-register | ||
* to allow NodeJS to build .ts files on-demand. | ||
*/ | ||
|
||
const { dirname, join } = require('path'); | ||
const { register } = require('esbuild-register/dist/node'); | ||
|
||
// allows NodeJS to compile TypeScript files | ||
register({ target: 'node15' }); | ||
|
||
const { build } = require('./build.ts'); | ||
const { loadConfig } = require('./util.ts'); | ||
|
||
const args = process.argv.slice(2); | ||
|
||
// load our build config, which figures out all the paths | ||
// the rest of the build process uses. | ||
const config = loadConfig(args); | ||
|
||
if (process.env.BAZEL_NODE_MODULES_ROOTS) { | ||
// This is a signal that Bazel has started this script | ||
// If Bazel is running this, then find out where it | ||
// would like to see the build output to be written. | ||
config.pkgDir = dirname(join(process.cwd(), args[0])); | ||
config.dev = true; | ||
} | ||
|
||
// let's do this! | ||
build(config); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.