Giter Club home page Giter Club logo

sent-template's Introduction

SENT-template

https://github.com/Zimtir/SENT-template

Sapper Express Node Template

Logo

GitHub package.json version GitHub issues GitHub forks GitHub stars GitHub license

GitHub issues GitHub forks GitHub stars GitHub license

code style: prettier code formatting: eslint

build and publish linters and tests

Docker Stars

GitHub package.json dependency version (dev dep on branch) GitHub package.json dependency version (dev dep on branch) GitHub package.json dependency version (dev dep on branch) GitHub package.json dependency version (dev dep on branch) GitHub package.json dependency version (dev dep on branch) GitHub package.json dependency version (dev dep on branch) GitHub package.json dependency version (dev dep on branch)

Coverage by tests

Design

Design

Usage

  • Create a repository based on SENT-template

    # for Rollup
    npx degit "Zimtir/SENT-template" my-app
  • Install packages

    • npm run install:dev - Install only required packages for simple development (no test support and other tools)
    • npm run install:dev:full - Install all packages
    • npm run install:prod:full - Install all packages to execute tests, storybook and so on at production environment
    • npm run install:prod - Install only required packages to run production

Testing

  • npm run test:dev or npm run test:prod - Execute all tests
  • Note: setup IS_CODE_COVERAGE_ENABLED='true' in environment variables to print at output a coverage by tests

Swagger

Swagger configuration

Docker

Production

  • Application

    • The running of bundles in container
    • Note: Sure to execute the build before npm run build
    docker-cmpose up sent-template

Development

  • Application

    • The running of application in development mode inside a container
    docker-compose -f docker-compose.dev.yml up web
  • Storybook

    • Demonstrates all components that can be used in development
    docker-compose -f docker-compose.dev.yml up storybook
  • Nginx

    • The hosting of bundles through Nginx
    • Note: Sure to execute the build before npm run build
    docker-compose -f docker-compose.dev.yml up nginx
  • Tests

    • Allows to execute all tests in the container
    docker-compose -f docker-compose.dev.yml up test

Docs

Wiki

List of features

sent-template's People

Contributors

dependabot[bot] avatar the-homeless-god avatar tjark-kuehl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sent-template's Issues

Add CI/CD

Add deployment to Docker Hub by GitHub Actions on each a merged PR

Nginx support

Accept criteria

  • Serve static files through Nginx
  • Proxy to Sapper at 3000 port
  • https with cyphers
  • SSL certificate by like Certbot or certificate from user
  • High cache level to avoid a lot of request to server

Test coverage

Add visibility of code coverage by tests at:

  • npm command
  • readme

Migrate typescript

Now ts added through user preprocessors instead updated feature from Svelte

Parcel support

Need provide a select of bundler to user, because it can be Parcel instead Rollup

Cannot read property 'IS_DEVELOPMENT' of undefined

Hey, thanks for this massive template!

I just stumbled over this template and wanted to try it out right away.
But when I start sapper, I get the following error message:

/Users/ben/Development/SENT-template/__sapper__/build/server/server.js:28462
    const env = undefined[name];
                         ^

TypeError: Cannot read property 'IS_DEVELOPMENT' of undefined
    at getEnvKey (/Users/ben/Development/SENT-template/__sapper__/build/server/server.js:28462:26)
    at Object.<anonymous> (/Users/ben/Development/SENT-template/__sapper__/build/server/server.js:28467:25)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/Users/ben/Development/SENT-template/__sapper__/build/index.js:6:1)
    at Module._compile (internal/modules/cjs/loader.js:955:30)

My steps

npm i
npm run dev

My environment

Node: v12.14.1
NPM: 6.14.8
OS: MacOS 10.15.16

Thank you!

Preload function not called in context="module" scripts

As the title describes. I'm using the template but the preload in a svelte component is never called. Example:

<script context="module">
  console.log('in module') // this gets called
  export function preload(page, session) {
    console.log('session', session) // this never does
    return {
      foo: session.bar
    }
  }
</script>

<script lang="ts">
  export let foo;
</script>

<p>{foo}</p>

Webpack support

Need provide a select of bundler to user, because it can be Webpack instead Rollup

Storybook docker

I think we need a feature to run Storybook in container
It would be better than run on developer environment

Cannot read src/tsconfig.json

Problem

Because src folder have node_modules folder within, Eslint always search for tsconfig.json in the src folder, not in the root folder. Because the Eslint cannot find the tsconfig.json in the src folder, the code editor always gives an error in the import syntax in every .ts file in the src folder. The error is:

Screenshot from 2020-08-13 11-41-38

My Environment

  • Debian 10 buster
  • VScode v1.47.3
  • VScode Eslint Extension v2.1.8

Duplicate css styles

When running in dev mode, rollup seems to be generating duplicate css styles for all the components. See attached screenshot

image

CSS UI framework

Add support of:

  • Svelte Material UI
  • Bootstrap
  • Foundation
  • Bulma
  • TailwindCSS

Add Hugo docs

I want to see a documentation based on Hugo and GitHub Pages

Cypress bundler

Need switch Cypress bundler to Rollup with usage exist config

Optional select for features

Feature request

Need add ability to configure all features by CLI

Acceptance criteria

Need not to provide all-included when user need only some features
It can be configured on pulling

Cypress docker

I think we need a feature to run all tests in container
It would be better than run on developer environment

Add SCSS support

Arrange:

Stylesheet

Actual:

CSS support only

Expected:

SCSS, SASS and CSS support at project

Exclude all external references from container

Now container provides size about 354 mb, but we can remove all references to bundles and libraries to make container better with one requirement from user - install all modules and attach it as volume to container through docker-compose setting

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.