File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,46 @@ Watcher Process started.
145145deno serve: Listening on http://0.0.0.0:8000/
146146```
147147
148+ ## Initialize an empty project
149+
150+ Running ` deno init --empty ` bootstraps an empty project with a basic console
151+ log.
152+
153+ ``` sh
154+ $ deno init --empty
155+ ✅ Project initialized
156+
157+ Run these commands to get started
158+
159+ # Run the program
160+ deno run main.ts
161+
162+ # Run the program and watch for file changes
163+ deno task dev
164+ ```
165+
166+ Your [ ` deno.json ` ] ( /runtime/fundamentals/configuration/ ) file will look like
167+ this:
168+
169+ ``` json
170+ {
171+ "tasks" : {
172+ "dev" : " deno run --watch main.ts"
173+ }
174+ }
175+ ```
176+
177+ Now, you can run the project, which
178+ [ watches for changes] ( /runtime/getting_started/command_line_interface/#watch-mode ) ,
179+ by running ` deno task dev ` .
180+
181+ ``` sh
182+ $ deno task dev
183+ Task dev deno run --watch main.ts
184+ Watcher Process started.
185+ Hello world!
186+ ```
187+
148188## Generate a library project
149189
150190You can append a ` --lib ` flag to add extra parameters to your ` deno.json ` , such
You can’t perform that action at this time.
0 commit comments