Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title></title>
</head>
<body>
<div id="root"></div>
<script src="./index.js"></script>
</body>
</html>
{
"name": "",
"version": "1.0.0",
"engines": {
"node": "10",
"npm": "6"
},
"browserslist": [
"< 0.2%",
"not dead",
const path = require('path');
module.exports = {
module: {
rules: [
{
test: /\.less$/,
use: ['style-loader', 'css-loader', 'less-loader'],
},
{
import React from 'react';
export default class Query extends React.Component {
state = {
loading: true,
data: {},
};
static defaultProps = {
skip: false,
class Polling extends React.Component {
componentDidMount() {
this.intervalId = setInterval(this.props.callback, this.props.interval);
}
componentWillUnmount() {
clearInterval(this.intervalId);
}
render() {
"React component boiler": {
"prefix": "react",
"body": [
"import React from 'react';",
"import PropTypes from 'prop-types';",
"",
"function ${NewComponent}() {",
" return (",
" $1",
" );",
// Backend config example
// http://jlongster.com/Backend-Apps-with-Webpack--Part-I
var path = require('path');
var webpack = require('webpack');
var fs = require('fs');
var nodeModules = {};
fs.readdirSync('node_modules')
.filter(function(x) {
{
"extends": ".eslintrc-meteor",
"rules": {
/**
* ES6 Specific
*/
"no-var": 0, // http://eslint.org/docs/rules/no-var
"prefer-arrow-callback": 1, // http://eslint.org/docs/rules/prefer-arrow-callback
"prefer-const": 1, // http://eslint.org/docs/rules/prefer-const
"prefer-spread": 1, // http://eslint.org/docs/rules/prefer-spread
/* Meteor's ES6 Javascript linting configuration
*
* Documentation on rules can be found at:
* http://eslint.org/docs/rules/ <- Optionally append the rulename
*
*/
{
"parser": "babel-eslint",
"env": {
"browser": true,
{
"color_scheme": "Packages/User/SublimeLinter/PlainText (SL).tmTheme",
"draw_white_space": "all",
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
".meteor"