8
.gitignore
vendored
8
.gitignore
vendored
@@ -5,7 +5,6 @@ lib
|
||||
node_modules
|
||||
reports
|
||||
*.log
|
||||
**/.env*
|
||||
.nyc_output
|
||||
**/coverage
|
||||
.yarn
|
||||
@@ -15,3 +14,10 @@ tsconfig.tsbuildinfo
|
||||
.next
|
||||
dist
|
||||
.now
|
||||
# local env files
|
||||
**/.envrc
|
||||
**/.env
|
||||
**/.env.local
|
||||
**/.env.development.local
|
||||
**/.env.test.local
|
||||
**/.env.production.local
|
||||
|
||||
1
examples/store/.env.example
Normal file
1
examples/store/.env.example
Normal file
@@ -0,0 +1 @@
|
||||
DATABASE_URL=postgresql://USERNAME@localhost:5432/blitz-example-store
|
||||
2
examples/store/.gitignore
vendored
2
examples/store/.gitignore
vendored
@@ -27,6 +27,8 @@ yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.envrc
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
|
||||
@@ -21,14 +21,16 @@ Run `yarn` from the monorepo root
|
||||
`yarn build`
|
||||
|
||||
<!-- toc -->
|
||||
* [blitz-cli](#blitz-cli)
|
||||
* [Usage](#usage)
|
||||
* [Commands](#commands)
|
||||
|
||||
- [blitz-cli](#blitz-cli)
|
||||
- [Usage](#usage)
|
||||
- [Commands](#commands)
|
||||
<!-- tocstop -->
|
||||
|
||||
# Usage
|
||||
|
||||
<!-- usage -->
|
||||
|
||||
```sh-session
|
||||
$ npm install -g @blitzjs/cli
|
||||
$ blitz COMMAND
|
||||
@@ -40,18 +42,20 @@ USAGE
|
||||
$ blitz COMMAND
|
||||
...
|
||||
```
|
||||
|
||||
<!-- usagestop -->
|
||||
|
||||
# Commands
|
||||
|
||||
<!-- commands -->
|
||||
* [`blitz build`](#blitz-build)
|
||||
* [`blitz console`](#blitz-console)
|
||||
* [`blitz db COMMAND`](#blitz-db-command)
|
||||
* [`blitz help [COMMAND]`](#blitz-help-command)
|
||||
* [`blitz new [PATH]`](#blitz-new-path)
|
||||
* [`blitz start`](#blitz-start)
|
||||
* [`blitz test [WATCH]`](#blitz-test-watch)
|
||||
|
||||
- [`blitz build`](#blitz-build)
|
||||
- [`blitz console`](#blitz-console)
|
||||
- [`blitz db COMMAND`](#blitz-db-command)
|
||||
- [`blitz help [COMMAND]`](#blitz-help-command)
|
||||
- [`blitz new [PATH]`](#blitz-new-path)
|
||||
- [`blitz start`](#blitz-start)
|
||||
- [`blitz test [WATCH]`](#blitz-test-watch)
|
||||
|
||||
## `blitz build`
|
||||
|
||||
@@ -157,4 +161,5 @@ ALIASES
|
||||
```
|
||||
|
||||
_See code: [lib/commands/test.js](https://github.com/blitz-js/blitz/blob/v0.0.1-canary.1/lib/commands/test.js)_
|
||||
|
||||
<!-- commandsstop -->
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
require('@oclif/command').run().then(require('@oclif/command/flush')).catch(require('@oclif/errors/handle'))
|
||||
require('dotenv').config()
|
||||
|
||||
require('@oclif/command')
|
||||
.run()
|
||||
.then(require('@oclif/command/flush'))
|
||||
.catch(require('@oclif/errors/handle'))
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"chokidar": "^3.3.1",
|
||||
"cross-spawn": "^7.0.2",
|
||||
"diff": "^4.0.2",
|
||||
"dotenv": "8.2.0",
|
||||
"enquirer": "^2.3.4",
|
||||
"fs-extra": "^9.0.0",
|
||||
"fs-readdir-recursive": "1.1.0",
|
||||
|
||||
@@ -57,20 +57,20 @@ abstract class Generator<T extends GeneratorOptions = GeneratorOptions> extends
|
||||
const conflictChecker = new ConflictChecker({
|
||||
dryRun: this.options.dryRun,
|
||||
})
|
||||
conflictChecker.on('error', err => {
|
||||
conflictChecker.on('error', (err) => {
|
||||
reject(err)
|
||||
})
|
||||
conflictChecker.on('fileStatus', (data: string) => {
|
||||
this.performedActions.push(data)
|
||||
})
|
||||
|
||||
this.fs.commit([conflictChecker], err => {
|
||||
this.fs.commit([conflictChecker], (err) => {
|
||||
if (err) reject(err)
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
|
||||
this.performedActions.forEach(action => {
|
||||
this.performedActions.forEach((action) => {
|
||||
console.log(action)
|
||||
})
|
||||
|
||||
|
||||
7
packages/cli/templates/app/.gitignore
vendored
7
packages/cli/templates/app/.gitignore
vendored
@@ -26,4 +26,9 @@
|
||||
*.log
|
||||
|
||||
# local env files
|
||||
.env*
|
||||
.env
|
||||
.envrc
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
@@ -5088,6 +5088,11 @@ dot-prop@^4.2.0:
|
||||
dependencies:
|
||||
is-obj "^1.0.0"
|
||||
|
||||
dotenv@8.2.0:
|
||||
version "8.2.0"
|
||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
|
||||
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==
|
||||
|
||||
duplexer@^0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
|
||||
|
||||
Reference in New Issue
Block a user