Skip to content

Commit

Permalink
Sunset philosophy / views, write intro, fix web workers, correct temp…
Browse files Browse the repository at this point in the history
…lates (#2254)

* Sunset philopsophy / views, move web workers, correct templates

* Better front page

* Fix command format

* Add web workers docs
  • Loading branch information
cristiano-belloni authored Jan 12, 2023
1 parent 225c153 commit 728b5fd
Show file tree
Hide file tree
Showing 15 changed files with 109 additions and 412 deletions.
7 changes: 0 additions & 7 deletions docs/building-apps/index.md

This file was deleted.

7 changes: 4 additions & 3 deletions docs/commands/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ parent: Commands
title: modular add
---

# `modular add <packageName>`
# `modular add [options] [packageName]`

Adds a new package by creating a new package at the workspace located at
`packages/<packageName>`, omitting the scope if the package is
Expand Down Expand Up @@ -73,8 +73,9 @@ included in a bundle).

## Options:

`--path`: Optionally set the directory in which the workspace is created. If the
provided path is outside (i.e., not a descendant) of the paths specified in
`--path <targetPath>`: Optionally set the directory in which the workspace is
created. If the provided path is outside (i.e., not a descendant) of the paths
specified in
[the `workspaces` field](https://classic.yarnpkg.com/lang/en/docs/workspaces/#toc-how-to-use-it)
of the root `package.json`, the command will fail

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ parent: Commands
title: modular build
---

# `modular build [packages...]`
# `modular build [options] [packages...]`

Search workspaces based on their `name` field in the `package.json` and build
them according to their respective `modular.type`, in order of dependency (e.g.
Expand Down
6 changes: 4 additions & 2 deletions docs/commands/check.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ parent: Commands
title: modular check
---

# `modular check`
# `modular check [options]`

Checks the modular root repo has yarn workspaces and modular packages are set up
properly and checks your package tree for issues with your dependencies.

## Options:

`--fix`: Run autofix over applications.
`--fix`: Run autofix over applications

`--verbose`: Run yarn commands with the --verbose flag set
2 changes: 1 addition & 1 deletion docs/commands/lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ parent: Commands
title: modular lint
---

# `modular lint`
# `modular lint [options] [regexes...]`

`modular lint` will check the diff between the current branch and your remote
origin default branch (i.e. `master` or `main`) and only lint the `.ts`, `.tsx`,
Expand Down
17 changes: 17 additions & 0 deletions docs/commands/serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
parent: Commands
title: modular serve
---

# `modular serve [options] <target>`

Start a local HTTP server to serve an already-[built](./build.md)
[application](../package-types/app.md) or
[ESM View](../package-types/esm-view.md). This is different from
[start](./start.md) in that it statically serves an already-built `app` or
`esm-view` directly from `dist/<target>` without injecting any run-time script.
Use it to preview the result of a build with optimized bundles and minification.

## Options

`--port`: Select the port to serve on (default: '3000')
6 changes: 5 additions & 1 deletion docs/commands/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ parent: Commands
title: modular start
---

# `modular start <packageName>`
# `modular start [options] <packageName>`

Runs
[`react-scripts start`](https://create-react-app.dev/docs/getting-started#npm-start-or-yarn-start)
Expand All @@ -15,3 +15,7 @@ what modular views are initialized as). Modular will import this view as a
module within a template app, which we stage in a `node_modules/.modular`
folder. You can develop your view as you normally would an app and it will
automatically re-compile as you make changes in the view package.

## Options:

`--verbose`: Run yarn commands with the --verbose flag set
2 changes: 1 addition & 1 deletion docs/commands/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ parent: Commands
title: modular test
---

# `modular test`
# `modular test [options] [regexes...]`

`test` is an opinionated wrapper around [`jest`](https://jestjs.io/) which runs
tests against the entire `modular` project. It comes with out-of-the-box
Expand Down
6 changes: 5 additions & 1 deletion docs/commands/typecheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ parent: Commands
title: modular typecheck
---

# `modular typecheck`
# `modular typecheck [options]`

`modular typecheck` will programmatically report the semantic, syntactic, and
declaration type errors found in your code, based on your tsconfig.json.
Expand All @@ -12,3 +12,7 @@ In a CI environment, it will print condensed errors if they are present.

In non-CI environments, it will print the full details of the error, line, and
small snapshot of the offending line in question.

## Options:

`--verbose`: Enables verbose logging within modular
44 changes: 0 additions & 44 deletions docs/concepts/philosophy.md

This file was deleted.

Loading

0 comments on commit 728b5fd

Please sign in to comment.