
Product
Introducing Repository Labels and Security Policies
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
Preos is a js library to transpile and interprete other languages than HTML, CSS and JS in runtime.
Preos is a js
library to transpile and interprete other languages than HTML
, CSS
and JS
in runtime.
In your project type the following command to include it in your dependencies:
npm install --save preos
const preos = require('preos');
To use this library just require it in your js
file and start using it:
const preos = require('preos');
// TypeScript to JavaScript transpiler example.
(async function () {
var result;
try {
result = await preos.transpile({
url: "path/to/file.ts",
outputLang: "js"
});
console.log(result.source);
}
catch (why) {
console.log("[ERROR]: ", why.stack);
}
})();
If you want more details take a look at the API.
preos
comes with a set of pre-configured preprocessors to use just only requiring the library:
js
]:
ts
]css
]:
html
]:
json
]:
js
]: executes itself.ts
]: transpiles the code into js
and then executes it.pug
]: returns a function
that accepts an object
with the properties to fill the template and then returns its equivalent code in html
.vue
]: returns a function that lazily will compile the template and returns an object
prepared for be use with the Vue library.json
]: returns an object
that represents its structure.xml
]: returns an object
that represents its structure. More information here.toml
]: returns an object
that represents its structure.Fixes and improvements are always welcome, so if you want to contribute helping out or warning about an error, send me an email or open an issue.
[1.0.2] - 2018-08-23
FAQs
Preos is a js library to transpile and interprete other languages than HTML, CSS and JS in runtime.
The npm package preos receives a total of 2 weekly downloads. As such, preos popularity was classified as not popular.
We found that preos demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
Research
Security News
Socket researchers uncovered malicious npm and PyPI packages that steal crypto wallet credentials using Google Analytics and Telegram for exfiltration.
Product
Socket now supports .NET, bringing supply chain security and SBOM accuracy to NuGet and MSBuild-powered C# projects.