Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
gulp-react-jade-include
Advanced tools
options
: apply any JADE optionsLet us have such welcome.jade
file
.welcome-back
.greating Welcome back {this.props.title}
.avatar
img.img-circle(alt="{this.props.title}" src="{this.props.avatar}")
The following gulp snippet
var react = require('gulp-react'),
reactJadeInclude = require('gulp-react-jade-include'),
gulp.task('renderJSXWithJADE', function(){
return stream = gulp.src("welcome.jsx")
.pipe(reactJadeInclude({
pretty: true
}))
.pipe(react())
.pipe(gulp.dest("dest"));
});
Will turn
var Welcome = React.createClass({
render: function() {
return (
<include src="welcome.jade"/>
);
}
});
React.render(
<Welcome title="Prometeus" avatar="media/avatar.jpg" />,
document.getElementById('welcome')
);
Into welcome.js
file
var Welcome = React.createClass({displayName: "Welcome",
render: function() {
return (
React.createElement("div", {class: "welcome-back"},
React.createElement("div", {class: "greating"}, "Welcome back Prometeus"),
React.createElement("div", {class: "avatar"}, React.createElement("img", {alt: "Prometeus", src: "media/avatar.jpg", class: "img-circle"}))
)
);
}
});
React.render(
React.createElement(Welcome, null),
document.getElementById('welcome')
);
Or you can skip rendering JSX to JS, so such gulp snippet
var react = require('gulp-react'),
reactJadeInclude = require('gulp-react-jade-include'),
gulp.task('renderJSXWithJADE', function(){
return stream = gulp.src("welcome.jsx")
.pipe(reactJadeInclude({
pretty: true
}))
.pipe(gulp.dest("dest"));
});
Will turn
var Welcome = React.createClass({
render: function() {
return (
<include src="welcome.jade"/>
);
}
});
React.render(
<Welcome title="Prometeus" avatar="media/avatar.jpg" />,
document.getElementById('welcome')
);
Into welcome.jsx
file
var Welcome = React.createClass({
render: function() {
return (
<div className="welcome-back">
<div className="greating">Welcome back {this.props.title}</div>
<div className="avatar">
<img alt={this.props.title} src={this.props.avatar} className="img-circle">
</div>
</div>
);
}
});
React.render(
<Welcome title="Prometeus" avatar="media/avatar.jpg" />,
document.getElementById('welcome')
);
FAQs
Compiled jade template to react via include
The npm package gulp-react-jade-include receives a total of 0 weekly downloads. As such, gulp-react-jade-include popularity was classified as not popular.
We found that gulp-react-jade-include 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.