All Projects → garronej → Denoify

garronej / Denoify

Licence: mit
🦕For NPM module authors that would like to support Deno but do not want to write and maintain a port for it.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Denoify

Fury
A new build tool for JVM languages
Stars: ✭ 384 (-29.41%)
Mutual labels:  build-tool
Sbt
sbt, the interactive build tool
Stars: ✭ 4,437 (+715.63%)
Mutual labels:  build-tool
Intellij
IntelliJ plugin for Bazel projects
Stars: ✭ 500 (-8.09%)
Mutual labels:  build-tool
Pingy Cli
The Simple Frontend Build Tool. No Configuration, No Plugins.
Stars: ✭ 390 (-28.31%)
Mutual labels:  build-tool
Bake
A build system that lets you clone, build and run C/C++ projects with a single command
Stars: ✭ 434 (-20.22%)
Mutual labels:  build-tool
Gradle In Action Source
Source code for the Manning book "Gradle in Action"
Stars: ✭ 483 (-11.21%)
Mutual labels:  build-tool
Ykit
基于 Webpack 的灵活快速的打包工具,帮助稳定高效构建现代 JavaScript 应用。
Stars: ✭ 375 (-31.07%)
Mutual labels:  build-tool
Buildtools
A bazel BUILD file formatter and editor
Stars: ✭ 538 (-1.1%)
Mutual labels:  build-tool
Happypack
Happiness in the form of faster webpack build times.
Stars: ✭ 4,232 (+677.94%)
Mutual labels:  build-tool
Ultra Runner
🏃⛰ Ultra fast monorepo script runner and build tool
Stars: ✭ 496 (-8.82%)
Mutual labels:  build-tool
Sku
Front-end development toolkit
Stars: ✭ 403 (-25.92%)
Mutual labels:  build-tool
Javafx Gradle Plugin
Gradle plugin for JavaFX
Stars: ✭ 425 (-21.87%)
Mutual labels:  build-tool
Cbt
CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Stars: ✭ 489 (-10.11%)
Mutual labels:  build-tool
Neutrino
Create and build modern JavaScript projects with zero initial configuration.
Stars: ✭ 3,844 (+606.62%)
Mutual labels:  build-tool
Buildout
Buildout is a deployment automation tool written in and extended with Python
Stars: ✭ 510 (-6.25%)
Mutual labels:  build-tool
Trunk
Build, bundle & ship your Rust WASM application to the web.
Stars: ✭ 378 (-30.51%)
Mutual labels:  build-tool
Elf
灵活可扩展的 HTML5 构建工具
Stars: ✭ 479 (-11.95%)
Mutual labels:  build-tool
Gowatch
🚀 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file.
Stars: ✭ 539 (-0.92%)
Mutual labels:  build-tool
Erlang.mk
A build tool for Erlang that just works.
Stars: ✭ 538 (-1.1%)
Mutual labels:  build-tool
Mask
🎭 A CLI task runner defined by a simple markdown file
Stars: ✭ 495 (-9.01%)
Mutual labels:  build-tool

🦕 Support Deno and release on NPM with a single codebase.🦕

Home - Documentation


NEW IN v0.6

NEW IN v0.5 Breaking changes

  • All Denoify parameters are now gathered under a uniq "denoify" field.
  • Possibility to specify which files should be copied to the deno_dist directory (Previously only README.md was copied).
    Valid config example

What it is

A build tool that takes as input a TypeScript codebase that was meant to target node and/or the web and spits out a modified version of the source files ready to be deployed as a Deno module.

what_denoify_does

NOTE: Denoify won't run on Deno, it is a Node module.

If you are just looking for a quick way to load NPM modules in your Deno project you can check out CommonJS module Loading, unlike Denoify, it won't give you types definitions, it will involve node_modules/ and require --allow-read but it will also be easier to get working. Some NPM modules can also be imported into Deno using CDN like Skypack (ex Pika) or jspm checkout Soremwar/deno_types for some examples.

This tool is mainly for NPM module maintainer, to enable them to bring first-class citizen Deno support to their modules and do so without introducing breaking changes.

Motivations

  • Although it is quite easy to port a module to Deno no one wants to maintain two codebase.
  • Wouldn't it be great to have a tool able to bring Deno support to NPM modules?

Example of modules using Denoify

Modules that have been made cross-runtime using Denoify:

Introduction video

NOTE: New features have been introduced since this meeting was hold

Watch the video

Limitations

Coming up next is a detailed guide on how to set up denoify with your project and how to publish on deno.land/x but before anything here are the current limitations you need to be aware of.

  • If your module is vanilla JS it needs to be ported to TypeScript first. (1)
  • Not all Node's builtin modules are supported yet. (2) But thanks to the new mechanism, à la React Native, that let you have specific deno implementation for some of your files, the lack of support for "https" or "net", while being annoying, is no longer a dead end.
  • If your module has dependencies you will have to enable those dependencies to run on Deno. While well documented, be aware that it is a time consuming process.
  • require() is not yet supported.
  • You can't (yet) fs.readFile() files that are part of the module ( files inside a res/ directory for example ). (4)

(1) Don't be afraid, renaming your source with .ts and dropping some any here and there will do the trick. You will be able to pull it off even if you aren't familiar with typescript. Ref

(2) You can consult here the current state of the Node's builtin support.

(4) In Deno the files that forms your module won’t be pre-fetched and placed in node_module like in node so you won’t be able to access files that are not on the disk.

GUIDES

Setting up an existing project

Check out this repo to see in practice how to set up Denoify in your project.

Starting a project from scratch

denoify_ci

denoify_ci is a template repo that automates the boring and tedious tasks of:

  • Filling up the package.json
  • Setting up TypeScript and Denoify.
  • Writing a README.md with decent presentation and instructions on how to install/import your module in different environments.
  • Testing with multiple Node and Deno versions before publishing.
  • Publishing on NPM and deno.land/x ( via GitHub releases ).

Get started

NEW v0.4.0: Now that deno.land/x allows to publish modules under a subdirectory of a GitHub repo denoify no longer generate a mod.ts at the root of the project but under deno_dist. deno_dist should be stipulated as subdirectory when registering your module on deno.land/x.

TODO LIST / Things that need to change

  • [ ] Improve documentation. (New website incoming)
  • [ ] Gather all imports in a /deps.ts oscarotero/nodedeno does.
  • [ ] Support baseUrl tsConfig option. (Import non relative path relative to baseUrl)
  • [x] Support myModule.deno.ts alongside myModule.ts for deno specific implementation of part of the code. (Like in React Native)
  • [x] Support custom import/export statements replacer.
  • [x] 🔥 Leverage CDNs like Skypack (ex Pika) or jspm to support more NPM modules out of the box, feature side loading of type definitions.
  • [x] Support .tsx
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].