![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
super-react
Advanced tools
Opinionated Command Line Tool for Scaffolding out Nested React Components Into Files
#Super React
Opinionated Command Line Tool for Scaffolding out Nested React Components Into Files
##Install
npm install -g super-react
##Usage
super-react "[emmet_string]" [--hybrid|--es5] [--ext=js]
##Scaffold Components From Emmet Syntax
This tool uses Emmet style syntax for scaffolding out components in a nested fashion. In this early version of this module, all components are dumped into a single folder but, the React component calls the nested children we specify.
###Basic Example
super-react "App>components/Description+ListContainer>List"
The >
denotes a parent component, +
denotes a sibling component, and /
denotes a folder.
The command results in the following:
created: ./components/
created: components/Description.js
created: App.js
created: components/List.js
created: components/ListContainer.js
App.js
has the following contents:
import React, {propTypes, Component} from 'react';
import Description from './components/Description'
import ListContainer from './components/ListContainer'
class App extends Component {
constructor(props) {
super(props)
this.state = {};
}
render() {
let styles = {};
return (
<div>
<Description />
<ListContainer />
</div>
);
}
}
App.propTypes = {
}
export default App;
###Hybrid Mode
super-react "App>components/Description+ListContainer>List" --hybrid
Outputs the following ES6 createClass template.
created: ./components/
created: components/Description.js
created: App.js
created: components/List.js
created: components/ListContainer.js
import React from 'react';
import Description from './Description.jsx'
import ListContainer from './ListContainer.jsx'
let App = React.createClass({
mixins : [],
propTypes: {
},
render() {
var styles = {};
return (
<div>
<Description />
<ListContainer />
</div>
);
}
});
export default App;
###ES5 Mode
super-react "App>components/Description+ListContainer>List" --es5
Outputs the following ES5 createClass template.
created: ./components/
created: components/Description.js
created: App.js
created: components/List.js
created: components/ListContainer.js
var React = require('react');
var Description = require('./components/Description');
var ListContainer = require('./components/ListContainer');
var App = React.createClass({
mixins : [],
propTypes: {
},
render: function() {
var styles = {};
return (
<div>
<Description />
<ListContainer />
</div>
);
}
});
module.exports = App;
###Custom Extension
super-react "App>components/Description+ListContainer>List" --ext=jsx --es5
Outputs the following ES5 createClass template with jsx extensions.
created: ./components/
created: App.jsx
created: components/ListContainer.jsx
created: components/Description.jsx
created: components/List.jsx
var React = require('react');
var Description = require('./components/Description.jsx');
var ListContainer = require('./components/ListContainer.jsx');
var App = React.createClass({
mixins : [],
propTypes: {
},
render: function() {
var styles = {};
return (
<div>
<Description />
<ListContainer />
</div>
);
}
});
module.exports = App;
##Changelog
##Roadmap
##Contribute?
I <3 Pull Requests, suggestions, and Issue reports.
FAQs
Opinionated Command Line Tool for Scaffolding out Nested React Components Into Files
The npm package super-react receives a total of 4 weekly downloads. As such, super-react popularity was classified as not popular.
We found that super-react 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.