oriservice-windows-arm64
Advanced tools
Comparing version 0.0.0-pre-alpha.2-0177e1b to 0.0.0-pre-alpha.2-0441b24
{ | ||
"name": "oriservice-windows-arm64", | ||
"license": "MIT", | ||
"version": "0.0.0-pre-alpha.2-0177e1b", | ||
"version": "0.0.0-pre-alpha.2-0441b24", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "url": "https://github.com/microsoft/ori" |
199
README.md
@@ -8,42 +8,28 @@ # ori | ||
``` | ||
ori -h | ||
ori dev --help | ||
Runs the oribuild development loop. | ||
-blockFollowUp | ||
Wait for an initial build before running non-build tasks (implied by -traceInitialBuild) | ||
-config string | ||
Path to ori.json (default "./ori.json") | ||
-cpuprofile string | ||
Generate a cpu profile at the given path | ||
-entry string | ||
Use a given entry or entry group (from the values specified in ori.json) | ||
-gitRef string | ||
initial set of changed files to use when starting the typescript process (default "HEAD") | ||
-initialOnly | ||
Validate the initial build can complete, and exit with an error if it had issues | ||
-logLevel string | ||
log level (error|warning|info|verbose|debug) | ||
-logTs | ||
log typescript output to stdio | ||
-noTui | ||
Disable the tui and print everything to stdio | ||
-nosplit | ||
Disable codesplitting. Allows for bundling without esm. | ||
-port int | ||
Port to run the http server on (default 3000) | ||
-snoop | ||
log imports to a snoop.json file, which can be analyzed to determine why a module is included in a build. | ||
-sourcemap string | ||
Generate sourcemaps (one of 'none', 'inline', 'external', 'linked', 'inline-and-external') (default "none") | ||
-strategy string | ||
Build Strategy (default "vendor") | ||
-trace string | ||
Generate an event trace at the given path | ||
-traceIncrementalBuilds | ||
Collect a pprof trace of each incremental build | ||
-traceInitialBuild | ||
Collect a pprof trace of the initial build | ||
-version | ||
Print the version and exit | ||
-write | ||
Write to disk | ||
Usage: | ||
ori dev [flags] | ||
Flags: | ||
--blockFollowUp Wait for an initial build before running non-build tasks (implied by --traceInitialBuild) | ||
--config string Path to ori.json (default "./ori.json") | ||
--cpuprofile string Generate a cpu profile at the given path | ||
--entry string Use a given entry or entry group (from the values specified in ori.json) | ||
--gitRef string initial set of changed files to use when starting the typescript process (default "HEAD") | ||
-h, --help help for dev | ||
--initialOnly Validate the initial build can complete, and exit with an error if it had issues | ||
--logLevel string log level (error|warning|info|verbose|debug) | ||
--logTs log typescript output to stdio | ||
--noTui Disable the tui and print everything to stdio | ||
--nosplit Disable codesplitting. Allows for bundling without esm. | ||
--port int Port to run the http server on (default 3000) | ||
--snoop log imports to a snoop.json file, which can be analyzed to determine why a module is included in a build. | ||
--sourcemap string Generate sourcemaps (one of 'none', 'inline', 'external', 'linked', 'inline-and-external') (default "none") | ||
--strategy string Build Strategy | ||
--trace string Generate an event trace at the given path | ||
--traceIncrementalBuilds Collect a pprof trace of each incremental build | ||
--traceInitialBuild Collect a pprof trace of the initial build | ||
--write Write build outputs to disk in addition to serving them from memory | ||
``` | ||
@@ -53,58 +39,57 @@ | ||
### ori.json fields | ||
```json5 | ||
```jsonc | ||
{ | ||
// The path that esbuild should output to | ||
"outPath": "dist/esbuild", | ||
// Where to find resource.json files | ||
// | ||
// TODO: document resource.json files | ||
// | ||
// Should be deprecated by #4 | ||
"resourceRoots": ["packages", "shared"], | ||
// Where to find source files to watch | ||
// | ||
// Should be deprecated by #4 | ||
"watchSourceRoots": ["packages", "shared"], | ||
// Directories the webserver should serve in addition to serving | ||
// resources from resources.json and the built scripts + chunks | ||
"directServeDirectories": ["resources"], | ||
// constants to define, passed to esbuild's define property | ||
// see https://esbuild.github.io/api/#define | ||
"defineConstants": { | ||
"global": "self", | ||
"process.env.IS_WEBPACK": "false" | ||
// The path that esbuild should output to | ||
"outPath": "dist/esbuild", | ||
// Where to find resource.json files | ||
// | ||
"// TODO": "document resource.json files" | ||
// | ||
// Should be deprecated by #4 | ||
"resourceRoots": ["packages", "shared"], | ||
// Where to find source files to watch | ||
// | ||
// Should be deprecated by #4 | ||
"watchSourceRoots": ["packages", "shared"], | ||
// Directories the webserver should serve in addition to serving | ||
// resources from resources.json and the built scripts + chunks | ||
"directServeDirectories": ["resources"], | ||
// constants to define, passed to esbuild"s define property | ||
// see https://esbuild.github.io/api/#define | ||
"defineConstants": { | ||
"global": "self", | ||
"process.env.IS_WEBPACK": "false", | ||
}, | ||
// A map of entry script names to the packages they are built from | ||
// (packages are read from tsconfig.paths.json, should be replaced | ||
// with packageNames in the workspaces we crawl) | ||
"entry": { | ||
"mailindex": "mail-index-package-name", | ||
}, | ||
// Entrypoints to workers | ||
// | ||
// Workers are built separately, see WorkerLoader for details | ||
// | ||
// Worker entrypoints not in this map will be built inline in the main, | ||
// build, at significant performance cost | ||
"workerRawEntries": { | ||
"pdfjsworker": "node_modules/pdfjs-dist/build/pdf.worker.js", | ||
"pdfjsworkermin": "node_modules/pdfjs-dist/build/pdf.worker.min.js", | ||
"owadataworker": "packages/libraries/worker/owa-data-worker-bootstrap/src/index.worker.ts", | ||
}, | ||
// Human readable groups of entries from the above entries map | ||
// as well as custom extensions to defineConstants | ||
// | ||
// For use on the cli for common entry goups. | ||
"entryGroups": { | ||
"OWA Mail": { | ||
"entries": ["mailindex"], | ||
"defineConstants": { | ||
"OWA_BUILD_CONSTANTS.ENTRIES.mail": "true", | ||
"OWA_BUILD_CONSTANTS.BUILD_ALL": "false", | ||
}, | ||
}, | ||
// A map of entry script names to the packages they are built from | ||
// (packages are read from tsconfig.paths.json, should be replaced | ||
// with packageNames in the workspaces we crawl) | ||
"entry": { | ||
"mailindex": "mail-index-package-name", | ||
}, | ||
// Entrypoints to workers | ||
// | ||
// Workers are built separately, see WorkerLoader for details | ||
// | ||
// Worker entrypoints not in this map will be built inline in the main, | ||
// build, at significant performance cost | ||
"workerRawEntries": { | ||
"pdfjsworker": "node_modules/pdfjs-dist/build/pdf.worker.js", | ||
"pdfjsworkermin": "node_modules/pdfjs-dist/build/pdf.worker.min.js", | ||
"owadataworker": "packages/libraries/worker/owa-data-worker-bootstrap/src/index.worker.ts" | ||
}, | ||
// Human readable groups of entries from the above entries map | ||
// as well as custom extensions to defineConstants | ||
// | ||
// For use on the cli for common entry goups. | ||
"entryGroups": { | ||
"OWA Mail": { | ||
"entries": ["mailindex"], | ||
"defineConstants": { | ||
"OWA_BUILD_CONSTANTS.ENTRIES.mail": "true", | ||
"OWA_BUILD_CONSTANTS.BUILD_ALL": "false" | ||
} | ||
} | ||
} | ||
}, | ||
} | ||
@@ -115,3 +100,3 @@ ``` | ||
Rather than alwasy running a single esbuild build, it is sometimes more performant | ||
Rather than always running a single esbuild build, it is sometimes more performant | ||
or practical to run multiple separate builds. The different ways of coordinating and | ||
@@ -128,3 +113,3 @@ connecting these separate builds are called "build strategies". | ||
This build strategy scans your repository for information about external dependencies on startup, | ||
and uses that information to build all of your external dependenices as a separate build. | ||
and uses that information to build all of your external dependencies as a separate build. | ||
@@ -155,15 +140,6 @@ This tends to speed up interactive iterative builds, because it cuts out the dependencies from | ||
There are two ways to do this right now: | ||
- Get a mingw build from [the mingw sourceforge](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/) | ||
- If the live installer fails, you can [download prebuilt binaries directly](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/) and add those to your path. You want the `x86_64-posix-seh` build of version `v8.1.0` | ||
- Prebuilt binaries require [7zip](https://www.7-zip.org/) to extract | ||
1. **Via Chocolatey**: | ||
- Install [Chocolatey](https://chocolatey.org/) | ||
- Install mingw from chocolatey `choco install mingw`. At time of writing this installs `mingw 11.2.0.07112021` | ||
2. **Manually**: do this only if you encounter issues with the version distributed by `chocolatey`: | ||
- Get a build from https://www.mingw-w64.org/downloads/#mingw-builds (the sourceforge link) | ||
- If the live installer fails, you can download the prebuilt binaries directly and add those to your path | ||
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/ | ||
- Prebuilt binaries require 7zip to extract https://www.7-zip.org/ | ||
- I installed x86_64-posix-seh | ||
- Add the path of mingw-gcc's bin to your path (in my case /c/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin) | ||
@@ -206,2 +182,3 @@ - _(Optional, but recommended)_ Install the `go` vscode plugin, and click "Install All" when it prompts you to install missing golang components (godef, gopkgs, gopls) | ||
- in client-web: `yarn gulp gqlgen:generate` needs to be run manually after any graphql change. | ||
- node_modules are not monitored and assumed to be always stable. If you edit node_modules, you | ||
@@ -233,15 +210,15 @@ will need to save another file to refresh. | ||
# Build an entry named "OWA Mail" from the entrypoints map, with codesplitting | ||
# Build an entry named "OWA Mail" from the entry points map, with code-splitting | ||
# Note that this has to be loaded with a script type="module" entrypoint, | ||
# since esbuild codesplitting forces esm modules | ||
# since esbuild code-splitting forces esm modules | ||
go run . -config=../ori.json -entry="OWA Mail" -split | ||
# Generate a cpu profile for initial and incrmental builds (the traces directory must already exist) | ||
# Generate a cpu profile for initial and incremental builds (the traces directory must already exist) | ||
go run . -config=../ori.json -entry="OWA Mail" -traceInitialBuild -traceIncrementalBuilds -cpuprofile=traces/cpu.pprof | ||
# Analyse cpu profiles (constains overview of CPU time) | ||
# Analyze cpu profiles (contains overview of CPU time) | ||
go tool pprof -http=localhost:8080 traces/cpu.pprof.initial* | ||
go tool pprof -http=localhost:8080 traces/cpu.pprof.incremental* | ||
# Analyse traces | ||
# Analyze traces | ||
go tool trace traces/trace.out.* | ||
@@ -271,3 +248,3 @@ | ||
For now, `ori` will remain extremly opinionared on what the monorepo shape must look like. As much as possible, we want to prefer convention over configuration. | ||
For now, `ori` will remain extremely opinionated on what the monorepo shape must look like. As much as possible, we want to prefer convention over configuration. | ||
@@ -274,0 +251,0 @@ In the same vein, rather than implementing plugins or encouraging people to fork and make their own custom builds of `ori`, new functionality will be added to the same `ori` binaries as needed. |
Sorry, the diff of this file is not supported yet
222990
274