web-build-tools
This repo hosts a collection of tools and libraries used to build web projects at Microsoft.
- CURRENT NEWS: See what's happening with the web-build-tools projects!
Highlighted projects:
-
API Extractor helps you build better TypeScript libraries. It standardizes your exported API surface, generates your online API reference, and makes it easy to detect and review changes that will impact your API contract.
-
Gulp Core Build: If you maintain lots of projects, gulp-core-build gets you out of the business of maintaining lots of Gulpfiles. It defines reusable "rigs" that you customize using simple config files with well-defined JSON schemas.
-
Rush: Want to consolidate all your web projects in one big repo? Rush is a fast and reliable solution for installing, linking, building, publishing, checking, change log authoring, and anything else that involves a "package.json" file.
Contributing
This repo welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This repo has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Project Inventory
Apps
@microsoft/api-extractor
Validate, document, and review the exported API for a TypeScript library.
@microsoft/api-documenter
Read JSON files from api-extractor, generate documentation pages.
@microsoft/rush
The professional solution for consolidating all your JavaScript projects in one Git repo.
@microsoft/rush-lib
A library for scripts that interact with the Rush tool.
Core Build: Tasks
@microsoft/gulp-core-build
Defines the build task model, config file parser, and rig framework for the Gulp Core Build system, along with some essential build tasks.
@microsoft/gulp-core-build-mocha
A build task for running unit tests using mocha
+ chai
. This setup is useful for unit testing build tools, as it runs in the NodeJS process rather than in a browser.
@microsoft/gulp-core-build-sass
A build task which processes scss files using SASS, runs them through postcss
, and produces CommonJS/AMD modules which are injected using the @microsoft/load-themed-styles
package.
@microsoft/gulp-core-build-serve
A build task for testing/serving web content on the localhost, and live reloading it when things change. This drives the gulp serve
experience.
@microsoft/gulp-core-build-typescript
Build tasks for invoking the TypeScript compiler, tslint
, and api-extractor.
@microsoft/gulp-core-build-webpack
A build task which introduces the ability to bundle various source files into a set of bundles using webpack
.
Core Build: Rigs
@microsoft/node-library-build
A Gulp Core Build rig which provides basic functionality for building and unit testing TypeScript projects intended to run under NodeJS.
@microsoft/web-library-build
A Gulp Core Build rig for building web libraries. It includes build tasks for processing css, typescript, serving, and running browser tests using jest.
Libraries
@microsoft/load-themed-styles
Loads a string of style rules, but supports detokenizing theme constants built within it.
@microsoft/node-core-library
Essential libraries that every NodeJS toolchain project should use.
@microsoft/package-deps-hash
package-deps-hash
is mainly used by Rush. It generates a JSON file containing the Git hashes of all input files used to build a given package.
@microsoft/stream-collator
Oftentimes, when working with multiple parallel asynchronous processes, it is helpful to ensure that their outputs are not mixed together, as this can cause readability issues in the console or log. The stream-collator manages the output of these streams carefully, such that no two streams are writing at the same time.
@microsoft/ts-command-line
An object-oriented command-line parser for TypeScript projects, based on the argparse engine.
Webpack Loaders and Plugins
@microsoft/set-webpack-public-path-plugin
set-webpack-public-path-plugin
is a plugin used to set the webpack public path variable.
@microsoft/resolve-chunk-plugin
resolve-chunk-plugin
is a plugin that looks for calls to resolveChunk
with a chunk
name, and returns the chunk ID.
@microsoft/loader-set-webpack-public-path
loader-set-webpack-public-path
is a loader used to set the webpack public path variable. It's similar to set-webpack-public-path-plugin
.
@microsoft/loader-load-themed-styles
loader-load-themed-styles
is a loader used for loading themed CSS styles.
@microsoft/loader-raw-script
loader-raw-script
is a loader used for loading scripts with an eval
statement.