Comments (2)
Took me a while to find, but duplicate of #16790
In the node world npm packages quite easily allow for this and I think deno could potentially allow for this with its byonm feature. (As an aside I prefer to reference my own packages from GitHub repositories rather than publishing them to the npm registry).
Node doesn't support TS files and so the Node compatibility layer aligns with Node.
I would like to be able to reference a node module and then to import TypeScript files as-is and to be able to configure nunjucks to read templates from a directory structure from a package, and to be able to process .scss files where some are imported from a package.
I believe you should be able to do this, minus the importing the TypeScript file as is. You should be able to import any js file in the package though.
from deno.
@dsherret I can appreciate your thoughts on the linked issue regarding pollution of npm with TypeScript modules although I believe it is possible to import .ts modules from other packages given the right configuration.
Instead of using node_modules
as a workaround I'd prefer to see some sort of equivalent in deno. Otherwise the irony is that people will end up building deno packages to npm just to be able to have packages when instead it would be cleaner to avoid that altogether by simply having the option to have deno packages.
eg. instead of node_modules being a first class citizen in deno, have deno packages (or even a generalised package mechanism) which deno is able to import typescript scripts from.
Please don't take this the wrong way, this isn't intended to be salty. I am expressing what I would personally like to be able to do with deno.
from deno.
Related Issues (20)
- Astro can't access `process` global HOT 7
- Investigating hung/paused process while dynamically importing async module HOT 11
- `deno serve` doesn't support the second connInfo parameter
- WebSocket `MessageEvent` has `CloseEvent` as its symbol. HOT 2
- feature request: add a `--no-deno-namespace` mode HOT 3
- Error importing modules after updating dependencies
- Add Error.cause to all Deno.errors instances HOT 6
- Add `navigator.platform` HOT 2
- SSH SFTP "Signature verification failed: TypeError: Unknown digest algorithm: sha1"
- `deno lint` panicks after the 1.44.1 upgrade on file saved as UTF-8 w/ BOM HOT 4
- Proposal: add `origin` global HOT 3
- `crypto.createPublicKey({ format: "jwk" })` throws a `TypeError`
- Links in cli documentation for deno run command need to be updated HOT 1
- Analyzable dynamic import created before being imported throws "Module not found"
- Invalid root certificates cause Deno to panic HOT 1
- crypto.subtle.importKey with verify raises "Invalid key usages" HOT 1
- Resolving `npm:express` and `npm:express-openid-connect` results with `Deno has panicked.`
- Node:http localAddress not supported in compat
- parser-ts fails to work in deno HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deno.