chore: docs
This commit is contained in:
parent
2d89ea3512
commit
07fc7388a7
|
@ -88,9 +88,12 @@ We're going to be creating a fortune teller command that will tell you when you
|
|||
|
||||
### Create a command that takes an option
|
||||
|
||||
Now, edit `packages/fortune/src/index.js` to look like this:
|
||||
Commands are gathered during the [bootstrap phase](#todo) and therefore your hook must be
|
||||
implemented in a boostrap script.
|
||||
|
||||
```javascript
|
||||
Edit your bootstrap script at `packages/fortune/build/flecks.boostrap.js` to look like this:
|
||||
|
||||
```javascript title="packages/fortune/build/flecks.boostrap.js"
|
||||
export const hooks = {
|
||||
'@flecks/core.commands': () => ({
|
||||
fortune: {
|
||||
|
@ -170,11 +173,12 @@ You might also stub your toe.
|
|||
You can also define arguments in addition to options. Let's add an argument that takes the user's
|
||||
name to personalize the output:
|
||||
|
||||
```javascript
|
||||
```javascript title="packages/fortune/build/flecks.boostrap.js"
|
||||
const {Argument} = require('@flecks/core/build/commands');
|
||||
|
||||
export const hooks = {
|
||||
// highlight-start
|
||||
'@flecks/core.commands': (program, flecks) => {
|
||||
const {Argument} = flecks.fleck('@flecks/core/server');
|
||||
return {
|
||||
// highlight-end
|
||||
fortune: {
|
||||
|
|
|
@ -57,7 +57,7 @@ After some output, you'll find your new fleck at `packages/say-hello`. Let's ins
|
|||
id: 'hello_world'
|
||||
'@flecks/server': {}
|
||||
// highlight-next-line
|
||||
'@hello-world/say-hello:./packages/say-hello/src': {}
|
||||
'@hello-world/say-hello:./packages/say-hello': {}
|
||||
```
|
||||
|
||||
### Aliasing for the win
|
||||
|
|
|
@ -507,17 +507,17 @@ Build the application we've built so far:
|
|||
npm run build
|
||||
```
|
||||
|
||||
Then, take a look in the `dist` directory. You'll see a file there called `docker-compose.yml`.
|
||||
`@flecks/docker` automatically emits this file when you build your application for production to
|
||||
make container orchestration easier. Let's take a look:
|
||||
Then, take a look in the `dist/server` directory. You'll see a file there called
|
||||
`docker-compose.yml`. `@flecks/docker` automatically emits this file when you build your
|
||||
application for production to make container orchestration easier. Let's take a look:
|
||||
|
||||
```yml title="dist/docker-compose.yml"
|
||||
```yml title="dist/server/docker-compose.yml"
|
||||
version: '3'
|
||||
services:
|
||||
flecks_app:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: dist/Dockerfile
|
||||
dockerfile: dist/server/Dockerfile
|
||||
environment:
|
||||
FLECKS_ENV__flecks_docker_server__enabled: 'false'
|
||||
// highlight-next-line
|
||||
|
@ -541,7 +541,7 @@ You can run (after you [install Docker Compose](https://docs.docker.com/compose/
|
|||
necessary):
|
||||
|
||||
```
|
||||
docker-compose -f dist/docker-compose.yml up
|
||||
docker-compose -f dist/server/docker-compose.yml up
|
||||
```
|
||||
|
||||
This demonstrates that your application is now being orchestrated by Docker Compose and is
|
||||
|
|
|
@ -18,7 +18,7 @@ so:
|
|||
```
|
||||
|
||||
When running your application in different execution environments (say, production) you may want to
|
||||
override configuration such as this. This is done by like so:
|
||||
override configuration such as this. This is done through environment variables:
|
||||
|
||||
### Syntax
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user