Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Feb 6, 2023
1 parent cf3697a commit f55c662
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
12 changes: 7 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Scan through our [existing issues](https://github.com/hexagon/entsoe-api-client/

#### Setting up the environment

Se recommend using VS Code with eslint extensions, which will automatically check your code against THE defined rules as you write it.
We recommend using VS Code with the deno extensions, which will automatically check your code against the defined rules as you write it.

1. Fork the repository.
- Using GitHub Desktop:
Expand All @@ -34,15 +34,17 @@ Se recommend using VS Code with eslint extensions, which will automatically chec
- Using the command line:
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.

3. Install or update to **Node.js v16**.
2. Install **Deno**

3. Create a working branch ```feature/my-cool-feature``` or ```bugfix/issue-14``` and start with your changes!
3. Install or update to **Node.js v18** (node is used for generating and testing the node-part of the module)

4. Create a working branch ```feature/my-cool-feature``` or ```bugfix/issue-14``` and start with your changes!

### Commit your update

Please run ```npm run build``` before committing, to update the dist-files, and to make sure every test and check passes. If you make changes to any function Interface, or to JSDoc in general, you should also run ```npm run build:docs``` to update the generated documentation.
Please run ```deno task precommit``` before committing, to make sure every test and check passes.

See [package.json](/package.json) scripts section for all available scripts.
See [deno.jsonc](/deno.jsonc) scripts section for all available scripts.

Then, commit the changes once you are happy with them.

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ API_TOKEN="your-api-token" node .\spot-prices-today.ts

## Contributing

All contributions are welcome.
All contributions are welcome.

Module developed for Deno. Node module is *generated* by dnt, using [scripts/build_npm.ts](/scripts/build_npm.ts).

See [Contribution Guide](/CONTRIBUTING.md)

Expand Down
2 changes: 1 addition & 1 deletion examples/generation-forecast.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dateTomorrow.setHours(0,0,0,0);

// Run ENTSO-e transparency playform query
const result = await QueryGL(
process ? // Your entsoe api-token by environment variable
typeof process !== "undefined" ? // Your entsoe api-token by environment variable
process.env.API_TOKEN // ... in Node
: Deno.env.get("API_TOKEN"), // ... in Deno
{
Expand Down
2 changes: 1 addition & 1 deletion examples/generation-per-unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dateTomorrow.setHours(0,0,0,0);

// Run ENTSO-e transparency playform query
const result = await QueryGL(
process ? // Your entsoe api-token by environment variable
typeof process !== "undefined" ? // Your entsoe api-token by environment variable
process.env.API_TOKEN // ... in Node
: Deno.env.get("API_TOKEN"), // ... in Deno
{
Expand Down
2 changes: 1 addition & 1 deletion examples/outages.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dateTomorrow.setHours(0,0,0,0);

// Run ENTSO-e transparency playform query
const result = await QueryUnavailability(
process ? // Your entsoe api-token by environment variable
typeof process !== "undefined" ? // Your entsoe api-token by environment variable
process.env.API_TOKEN // ... in Node
: Deno.env.get("API_TOKEN"), // ... in Deno
{
Expand Down
2 changes: 1 addition & 1 deletion examples/prod-and-gen-units.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const

// Run ENTSO-e transparency playform query
const result = await QueryConfiguration(
process ? // Your entsoe api-token by environment variable
typeof process !== "undefined" ? // Your entsoe api-token by environment variable
process.env.API_TOKEN // ... in Node
: Deno.env.get("API_TOKEN"), // ... in Deno
{
Expand Down
4 changes: 2 additions & 2 deletions examples/spot-prices-today.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
**/

// Deno import:
import { QueryPublication } from "https://deno.land/x/entsoe_api_client@0.6.0/mod.ts";
import { QueryPublication } from "https://deno.land/x/entsoe_api_client/mod.ts";

// Node import:
// import { QueryPublication } from "entsoe-api-client";
Expand All @@ -23,7 +23,7 @@ dateTomorrow.setHours(0,0,0,0);

// Run ENTSO-e transparency playform query
const result = await QueryPublication(
process ? // Your entsoe api-token by environment variable
typeof process !== "undefined" ? // Your entsoe api-token by environment variable
process.env.API_TOKEN // ... in Node
: Deno.env.get("API_TOKEN"), // ... in Deno
{
Expand Down

0 comments on commit f55c662

Please sign in to comment.