Giter Site home page Giter Site logo

sapper-ts's Introduction

Sapper.TS!

❓ What is this?

This is an extension to the official Sapper Rollup template with TypeScript. This boilerplate aims to be very basic without too many plugins! This boilerplate is a modified version of Sapper-TS-GraphQL by Jacob Babich

If you're looking for something with much, much more bundled in, check out Sapper-TS-GraphQL-Tailwind-Actions by Jacob Babich.

‍🔧 Install

TIP: Use PNPM instead of npm for faster installations. Install pnpm using npm i -g pnpm.

git clone https://github.com/Himujjal/sapper-ts my-app
cd my-app
npm i

For Pro Users: 🙃😎😉

pnpx degit Himujjal/sapper-ts my-app
cd my-app
pnpm i

🛠 Usage

🧪 Development

npm run dev   # or `pnpm dev`

🔨 Building for Production

If you do not need to include heavy Babel transforms and polyfills to support old browsers on your site, then remove the --legacy flag in the sapper:build package script to lighten it up.

npm run prod  # or `pnpm prod`

📦 Exporting a Static Site

Your GraphQL server will not be exported with the rest of the site.

If you do not need to include heavy Babel transforms and polyfills to support old browsers on your site, then remove the --legacy flag in the export package script to lighten it up.

npm run export    # or `pnpm export`

⚙ Configuration

⚡ Web app

Many of the fields in static/manifest.json (short_name, name, description, categories, theme_color, and background_color) are filled with demonstrative values that won't match your site. Similarly, you've got to take new screenshots to replace the included static/screenshot-1.png and static/screenshot-2.png files. If you want, you can add app shortcut definitions for "add to home screen" on Android. Once you change theme_color, update the meta name="theme-color" tag in src/template.html to match.

The Apple touch icon, favicon, and logo- files (also all in the static directory) are created by placing the logo within a "safe area" centered circle that takes up 80% of the canvas's dimension. For instance, the constraining circle in logo-512.png is 512 × 0.80 = 409.6 ≈ 410 pixels wide and tall.

🗺 Source maps

This project base comes with source maps enabled during development and disabled during production for the best compromise between performance and developer experience. You can change this behavior through the sourcemap variable in rollup.config.js.

Help & Support!

Create an issue.

Fix! There is something that needs improvement

Create an issue or pull request and I'll try to fix.

ROADMAP:

  • Compression library for tinyhttp
  • Helmet support (Security headers)

Related Projects:

  1. Official Sapper Template (JS Only)
  2. Sapper-TS-GraphQL by Jacob Babich
  3. tinyhttp

📄 License

MIT


This Repo 100% is completely inspired by Jacob Babich's boilerplate!

sapper-ts's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.