npm init -y
Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Highlighting elements example</title> | |
| </head> | |
| <body> |
| data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAKCklEQVR4Xu3UMWpDQRBEQev+h/4GR04Mrd2g3aIUj6ShZnmv53meLx8CBAgMCLwEa+BKViRA4EdAsDwEAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJUBAsLwBAgRmBARr5lQWJU |
| import contextlib | |
| import json | |
| from django.db import connection | |
| from django import template | |
| register = template.Library() |
| import * as models from "models"; | |
| import Sequelize from "sequelize"; | |
| import fs from "fs"; | |
| delete models.default; | |
| const sequelize = new Sequelize( | |
| '', | |
| '', | |
| '', { |
| const cleanTypenameLink = new ApolloLink((operation, forward) => { | |
| if (operation.variables) { | |
| operation.variables = this.omitDeep (operation.variables, "__typename") | |
| } | |
| return forward(operation).map((data) => { | |
| return data; | |
| }) | |
| }) | |
| private omitDeep(obj, key) { |
| import React from 'react' | |
| import { withRouter, Link } from 'react-router-dom' | |
| import { graphql, compose } from 'react-apollo' | |
| import { Formik } from 'formik' | |
| import Yup from 'yup' | |
| import FormWideError from '../elements/form/FormWideError' | |
| import TextInput from '../elements/form/TextInput' | |
| import Button from '../elements/form/Button' | |
| import { H2 } from '../elements/text/Headings' |
| /** | |
| * Convert PDFDocument to Base64 | |
| */ | |
| const PDFDocument = require('pdfkit'); | |
| const stream = require('./stream'); | |
| // crate document and write stream | |
| let doc = new PDFDocument(); | |
| let writeStream = new stream.WritableBufferStream(); |
| var Promise = require('bluebird'); | |
| const Sequelize = require('sequelize'); | |
| const fs = Promise.promisifyAll(require('fs')); | |
| const _ = require('lodash'); | |
| const sequelize = new Sequelize(connectionString, { | |
| dialect: 'mysql', | |
| logging: false, | |
| pool: { // application-side connection pool configuration |
| import { h, Component } from 'preact'; | |
| /** Creates a new store, which is a tiny evented state container. | |
| * @example | |
| * let store = createStore(); | |
| * store.subscribe( state => console.log(state) ); | |
| * store.setState({ a: 'b' }); // logs { a: 'b' } | |
| * store.setState({ c: 'd' }); // logs { c: 'd' } | |
| */ |