Skip to content

Commit 2c1446e

Browse files
authored
Merge from dyarn/develop
- Updated config file to new 1.18 default: deno.json - Misc: changed global file var definition file - Updating readme reflecting changes
2 parents bd033a0 + 789e7b4 commit 2c1446e

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### **General info**
44
Dyarn: the Deno runner help.
55

6-
After the Disq Code Bot team discovered Deno and some of it's magic with typescript, we decided using it instead of Node. But we only missed two little things: the ```package.json``` with it's scripts property and the ```yarn <script>``` (or ```npm run <script>``` if you prefer). So we created dyarn, to help you with running scripts using config.json file that is supported by Deno and that latter be automatically imported (based on Deno's documentation: https://deno.land/manual@v1.17.1/getting_started/configuration_file).
6+
After the Disq Code Bot team discovered Deno and some of it's magic with typescript, we decided using it instead of Node. But we only missed two little things: the ```package.json``` with it's scripts property and the ```yarn <script>``` (or ```npm run <script>``` if you prefer). So we created dyarn, to help you with running scripts using deno.json file that is supported by Deno and that latter be automatically imported (based on Deno's documentation: https://deno.land/manual/getting_started/configuration_file).
77

88
We plan on maybe adding some more things that we miss from Node's packages managers, to make Deno workflow even more efficient.
99

@@ -26,9 +26,9 @@ deno install --allow-run --allow-read --name dyarn https://deno.land/x/dyarn@v1.
2626
> **Note**: You must give run and read permissions, to script (if not given at install you'll be prompted at runtime, but we highly recomed to grant at install, we are trying to make things easier, not adding additional prompts). Otherwise, script won't be able to access/run required files
2727
2828
* **...Usage**
29-
After installing, in your project's root directory, add a ```config.json``` file where we'l add the scripts config:
29+
After installing, in your project's root directory, add a ```deno.json``` file where we'l add the scripts config:
3030

31-
> [more about the config file](#Uninstalling)
31+
> [more about the config file](#emconfigs-fileem)
3232
3333
```json
3434
{
@@ -62,9 +62,9 @@ deno uninstall dyarn
6262

6363
---
6464
### *Configs file*
65-
As our objective is to make you life a little easier with Deno commands, adding a custom config file or adding more flags, well... wouldn't help a lot. So by default (you may if you wan't, change this with the: ``` --config={path} ``` flag after dyarn invoker) dyarn uses Deno recommended config file name (and later auto identifiable file by Deno): ```config.json```.
65+
As our objective is to make you life a little easier with Deno commands, adding a custom config file or adding more flags, well... wouldn't help a lot. So by default (you may if you wan't, change this with the: ``` --config={path} ``` flag after dyarn invoker) dyarn uses Deno recommended config file name (and later auto identifiable file by Deno): ```deno.json```.
6666

67-
All dyarn options should be passed inside the ```dyarnOptions``` keys inside the config.json file.
67+
All dyarn options should be passed inside the ```dyarnOptions``` keys inside the deno.json file.
6868
```json
6969
{
7070
"dyarnOptions": {

mod.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { PermsCheck } from './src/permCheck.ts'
2-
import { ConfigFileCheck, defaultConfigFile } from './src/configFileCheck.ts'
2+
import { defaultConfigFile } from './src/config-file.ts'
3+
import { ConfigFileCheck } from './src/configFileCheck.ts'
34
import { RunApp } from './src/runner.ts'
45

56
const command = Deno.args[0] as string

src/config-file.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export const dyarnConfigKey = "dyarnOptions"
22
export const defaultFile = "mod.ts"
3+
export const defaultConfigFile = "deno.json"
34

45
type ScriptsType = {
56
invoker: string,

src/configFileCheck.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { dyarnConfigKey } from './config-file.ts'
1+
import { dyarnConfigKey, defaultConfigFile } from './config-file.ts'
22
import type { ConfigOptions } from './config-file.ts'
33

44
const messages = {
@@ -9,7 +9,7 @@ const messages = {
99
"JSONParseError" : "Error parsing config file. Please check if it's valid JSON. JSON returned:",
1010
}
1111

12-
export const defaultConfigFile = "config.json"
12+
1313

1414
//TODO add later custom options for maybe automated dep checks, lint, output file
1515

0 commit comments

Comments
 (0)