![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Ash is a distributed presentation framework for the bohemian web developer. Executed on Node.js or run in the client, Ash provides an intuitive, unrestrictive boudoir in which creators can frolic with and fondly tease the interwebs. The truths and understandings upheld in the body of code known as Ash are;
The project is still in its early stages and is currently showing signs of emergent behavior. Once it chills out I'll add the obligatory "Getting Started" documentation here.
Ash helps you develop HTML5 applications that run 100% in web browsers or in containers like PhoneGap. With a bit of extra thinking you can serve these same applications as traditional web sites to maximize your codes use.
Install Ash;
npm install ash -g
Create a file called helloworld.js in an empty directory;
define({
index: function (api) {
api.done("Hello world.");
}
});
In the same directory start Ash;
ash start
Open http://localhost:3000/?module=helloworld&method=index in a browser.
To run the same code 100% in the browser you need to add a file named init.js with the content;
require(["lib/adapters/dom"]);
Then start Ash in webapp mode;
ash webapp
Open http://localhost:3000/?module=helloworld&method=index in a browser.
request = {
module: "", // a relative path to a module
method: "", // the function to call on the module
inputs: {} // a map of values to be made avaliable to the function
};
response = {
done: function (data, meta){
// Adapter to runtime
},
flush: function (data, meta) {
// Adapter to runtime
}
};
dispatcher = function (request, response) {
// Map request object to function (api)
};
api = {
done: response.done,
flush: response.flush,
dispatch: dispatcher,
use: { /* helpers */ }
};
Defined using the Asynchronous Module Definition API, Function Collections are a grouping mechanism for organizing your code. Each function defined in the collection must take exactly one argument, the value of which is a Runtime Agnostic Api Object.
define({
index: function (api) {
api.done("Hello world.");
}
});
Defined using the Asynchronous Module Definition API, helpers are attached to a Runtime Agnostic Api Object when specified in Function Collections. Helpers can implement the function init(), which if present will be called immediately after the helper is created.
define({
init: function (request, response, api) {
// Store for use later
},
func: function () {
// Add functions
}
});
Helpers are specified in Function Collections by the use of a helpers attribute whose value is an array.
define({
helpers: ["config"],
index: function (api) {
var module = api.use.config.get("module");
api.done("This is module: " + module);
}
});
The modules name it's relative path to the applications root (normally where you start Ash). For example the file ./foo.js would have a module name of foo and the file ./foo/bar/baz.js would be named foo/bar/baz.
define({
bar: function (api) {
api.done("Hello world.");
},
baz: function (api) {
api.done("Goodbye cruel world.");
}
});
http://localhost:3000/?module=foo&method=baz
define({
helpers: ["a", "b", "c"],
bar: function (api) {
var baz = api.use.a.func();
api.done(baz);
}
});
api.done(data, meta);
api.flush(data, meta);
api.dispatch(request, response);
api.use.module_name.module_func();
define({
bar: function (baz) {
return baz + 1;
}
});
define({
init: function (request, response, api) {
// ...
},
bar: function (baz) {
return baz + 1;
}
});
FAQs
Ash is a distributed presentation framework for the bohemian web developer.
The npm package ash receives a total of 15 weekly downloads. As such, ash popularity was classified as not popular.
We found that ash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.