What is the preferred build tool to use with Deno?

It has come to my attention that deno no longer necessitates the use of package.json (compatible with npm/yarn) to detail its dependencies.

However, when it comes to build/run scripts, is package.json still the recommended descriptor or are there alternative build tool/descriptor formats that may be more suitable?

Answer №1

Deno does not have native support for the package.json file.

Although there is no official build tool recommended by Deno, you are free to use any build tool you prefer such as Make, npm scripts, and more.


Some alternative packages to npm scripts for Deno include:

Answer №2

Check out Drake, a task runner I developed for Deno that draws inspiration from Make, Rake, and Jake. You can find it at .

Answer №3

Deno now includes a Task Runner starting from version 1.20 (released on Mar 17, 2022).

To set up commands, you can specify them in the project's Deno configuration file under the "tasks" key. For instance:

{
  "tasks": {
    "data": "deno task collect && deno task analyze",
    "collect": "deno run --allow-read=. --allow-write=. scripts/collect.js",
    "analyze": "deno run --allow-read=. scripts/analyze.js"
  }
}

The tasks can be viewed with deno task and executed using

deno task task-name [additional-args]...
. For example, to run the data task, you would use deno task data.

For further details on the Task Runner, refer to the official documentation. This link directs to the most recent version's docs.

However, according to the v1.26.1 documentation (the latest version as of October 16, 2022), the Task Runner is still classified as unstable:

⚠️ The deno task feature was introduced in Deno v1.20 and remains unstable. It may undergo significant changes in future updates.

While I am uncertain about the recommended build tool for Deno, my assumption is that the Task Runner will likely be favored once it stabilizes, given its integration within Deno.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Using Typescript in React to render font colors with specific styling

Attempting to utilize a variable to set the font color within a react component, encountering an error with my <span>: Type '{ style: "color:yellow"; }' is not assignable to type 'HTMLProps<HTMLSpanElement>' The use of yel ...

What role does npm play in the installation process for socket.io?

I am diving into the world of node.js, socket.io, and html5 as a beginner. Recently, I managed to launch a simple "hello world" application by using my command prompt on Windows with the command "node example.js." However, I'm still trying to understa ...

Issue occurred in module.js:341 while attempting to include android platform to ionic using command line

For my hybrid app development using the Ionic framework, I made sure to install all required dependencies like node.js and cordova. Following their Getting started guide, I reached step 3 which instructs running this command within the app directory: > ...

The Artifactory remote npm repository is only caching the package.json files and not the TGZ files

After configuring my default registry to use a remote Artifactory repository with the command npm config set registry {registry-url}, I noticed that when running npm install, only package.json files with URLs to the dependency's repository are being c ...

Obtaining JSON Data from API using Angular 2 Http and the finance_charts_json_callback() Callback

Having trouble retrieving JSON data from this API: I'm unsure how to access the returned finance_charts_json_callback(). Currently, I am utilizing Angular 2's http.get(): loadData() { return this.http .get(this.url) .map((res) => ...

Is it necessary for the version of the @types packages in TypeScript to match their non-types packages?

Are @types and untyped packages versioned the same way? npm i bluebird @types/bluebird -S returns "@types/bluebird": "^3.5.0", "bluebird": "^3.5.0", This seems logical. npm i request @types/request -S yields "@types/request": "0.0.41", "request": "^2. ...

Developing an npm package for storing a communal instance

I am interested in developing an npm library that can be initialized with a specific set of keys and then utilized throughout an entire project. Here is an illustration of how I envision its usage: In the main component or page import customLib from &quo ...

React form submissions are not saving the state

I currently have dynamic components rendered from the server side, including a submit button component. The issue I am facing is that when I submit the form, the state reverts to its initial values instead of retaining the updated values set by child compo ...

There has been an error of type TypeError, as the property 'replace' cannot be read from a null value

I encountered a TypeError message, even though my application seems to be functioning properly. "ERROR TypeError: Cannot read property 'replace' of null" I'm struggling to understand how to fix this issue. Can someone provide me ...

Access an Angular 2 component through an email hyperlink including querystring parameters

I need to create a deep link with query string parameters for a component, so that when the link is clicked, it opens up the component in the browser. For example: exmaple.com/MyComponent?Id=10 I want to include a link in an email that will open the com ...

Is it more efficient to define a variable or call a method from an object?

Which approach is more effective and why? Option 1: Declaring a variable exampleFunction(requestData: Object) { const username = requestData.username; doSomething(username); } Option 2: Accessing the object property directly exampleFunction(reques ...

Issue encountered when trying to execute npm or rake commands using Ansible

While configuring my VM, I am aiming to execute DB migration using the playbook along with some npm commands. Here is the snippet of code: - name: Run DB Migration shell: rake db:migrate args: chdir: /opt/site sudo: no - name: Install bower ...

Accessing the property of an object with TypeScript

I am working with an array of objects, where each object contains two properties: {key:count} When configuring my chart, I need to set the data source in this format: {meta: "unknown", value: [the count of unknown]}, {meta: "male", value: [the count of ...

What is the best way to preserve an enumeration value in TypeScript?

Is there a way to save enumeration values in TypeScript? For instance: createArticle(name: string, clr: ??enumeration??) { return axios.post(`${environment.apiUrl}/cards`, { card: `${name}`, color: ??clr?? }, ... } PS: Conte ...

Warnings are appearing after compiling assets

When I run the command npm run prod to compile assets, I encounter the following message: WARNING Compiled with 2 warnings warning in ./resources/sass/app.scss Module Warning (from ./node_modules/postcss-loader/src/index.js): Warning (1973:3) Error in ...

Building Silent Authentication in React Native with the help of Auth0: A Step-by-Step Guide

I am currently working on my first React Native app, and I have integrated Auth0 for authentication purposes. My goal is to implement silent authentication using refresh tokens. So far, I have attempted to use the checkSession() method but encountered an ...

Error message in my Angular project: Invalid Target Error

Out of nowhere, I encountered an invalid target error while running my Angular project with the command: npm start An unhandled exception occurred: Invalid target: {"project":"agmbs","target":"build","configur ...

React Native - Script for Clearing AsyncStorage

As I work on developing a react native app that relies on async storage, I have implemented conditionals within the components to determine whether API requests should be made or if data stored in memory should be used. To test these conditionals, I find m ...

Is it possible to utilize the $ symbol within the ngOnInit or constructor functions?

I recently encountered an issue while trying to use the dollar sign ($) in my constructor function, specifically within ngOnInit() and translate.instant. Here is a snippet of the code that caused the problem: declare var $: any; { var SelectedDevice = ...

Ways to retrieve the name of the chosen option from a dropdown menu

Is there a way to retrieve the text name of a selected dropdown value using a PrimeNG dropdown? Incorporating a PrimeNG dropdown: HTML <p-dropdown [options]="regionSelectList" [(ngModel)]="reg" [filter]="true" [ngModelOptions]="{standalone: true}"> ...