Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@riotjs/compiler
Advanced tools
npm i @riotjs/compiler -D
The riot compiler can compile only strings:
import { compile } from '@riotjs/compiler'
const { code, map } = compile('<p>{hello}</p>')
You can compile your tags also using the new registerPreprocessor
and registerPostprocessor
APIs for example:
import { compiler, registerPreprocessor, registerPostprocessor } from '@riotjs/compiler'
import pug from 'pug'
import buble from 'buble'
// process your tag template before it will be compiled
registerPreprocessor('template', 'pug', function(code, { options }) {
const { file } = options
console.log('your file path is:', file)
return pug.compile(code)
})
// your compiler output will pass from here
registerPostprocessor(function(code, { options }) {
const { file } = options
console.log('your file path is:', file)
return buble.transform(code)
})
const { code, map } = compile('<p>{hello}</p>', {
// specify the template preprocessor
template: 'pug'
})
<Promise>{ code, map }
output that can be used by Riot.jsfile
key identifying the source of the string to compile and
the template
preprocessor to use as stringNote: specific preprocessors like the css
or the javascript
ones can be enabled simply specifying the type
attribute
in the tag source code for example
<my-tag>
<style type='scss'>
// ...
</style>
</my-tag>
Object
containing all the preprocessors registeredtemplate
css
or javascript
Set
containing all the postprocessors registeredv4.0.0-alpha.18
name
key to the tag exportsFAQs
Compiler for Riot.js .riot files
The npm package @riotjs/compiler receives a total of 988 weekly downloads. As such, @riotjs/compiler popularity was classified as not popular.
We found that @riotjs/compiler demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.