Skip to content

Instantly share code, notes, and snippets.

View ernestofreyreg's full-sized avatar
🚢
Just ship it

Ernesto Freyre ernestofreyreg

🚢
Just ship it
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World</title>
<meta name="viewport" content="width=device-width"/>
<script src="mortgage-calculator.js"></script>
</head>
<body>
import './styles/index.css'
import * as React from 'react'
import ReactDOM from 'react-dom'
import { CalculatorFrame } from './components/CalculatorFrame'
import { TabSelector } from './components/TabSelector'
import { MonthlyCostCalculator } from './components/MonthlyCostCalculator'
import { MaximumLoanCalculator } from './components/MaximumLoanCalculator'
export const renderMortgageCalculator = (element: Element): void => {
if (element !== null) {
import typescript from 'rollup-plugin-typescript2'
import filesize from 'rollup-plugin-filesize'
import nodeResolve from 'rollup-plugin-node-resolve'
import progress from 'rollup-plugin-progress'
import visualizer from 'rollup-plugin-visualizer'
import commonjs from 'rollup-plugin-commonjs'
import json from '@rollup/plugin-json'
import replace from 'rollup-plugin-replace'
import postcss from 'rollup-plugin-postcss'
import { terser } from 'rollup-plugin-terser'
import * as React from 'react'
interface MyComponentProps {
name: string
}
export const MyComponent: React.FC<MyComponentProps> = ({ name }) => (
<div className='bg-red-300 p-3 rounded text-white' role='heading' aria-level={1}>
My First Component: {name}
</div>
@tailwind base;
@tailwind components;
@tailwind utilities;
import '../src/styles/index.css'
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' }
}
const path = require('path')
module.exports = {
stories: ['../src/**/*.stories.@(jsx|mdx|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
webpackFinal: async config => {
config.module.rules.push({
test: /\.css$/,
use: [
{
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World</title>
<script src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<!-- Don't use this in production: -->
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
import pm2 from 'pm2'
import devKong from 'dev-kong'
const pm2Connect = () =>
new Promise((resolve, reject) => {
pm2.connect(err => {
if (err) {
return reject(err)
}
import pm2 from 'pm2'
import fs from 'fs'
import internalIp from 'internal-ip'
import devKong from 'dev-kong'
import arg from 'arg'
const pm2Connect = () =>
new Promise((resolve, reject) => {
pm2.connect(err => {
if (err) {