Coder Social home page Coder Social logo

zcemycl / webpack-ts-mpa-example Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 3.04 MB

Looking for best practice in creating github pages with html css and vanilla typescript.

Home Page: https://zcemycl.github.io/webpack-ts-mpa-example/

HTML 28.63% TypeScript 45.95% CSS 24.11% Shell 1.31%
github-pages jest puppeteer typescript webpack bootstrap cypress eslint husky prettier

webpack-ts-mpa-example's Introduction

Multipages Application with Typescript and Webpack

example workflow Coverage Status

Project Structure

├── assets # css
│   ├── components
│   └── pages # @import components
│       ├── index.css
│       └── page1
│           ├── index-lg.css
│           ├── index-sm.css
│           ├── index-md.css
│           └── index.css # all @imports
├── dist # after build
│   ├── index.html # link one 1 js and 1 css
│   ├── index.bundle.js # group mvc
│   ├── index.css # many css to 1 css
│   └── page1
│       ├── index.html
│       ├── index.bundle.js
│       └── index.css
├── public # html
│   ├── components
│   └── pages # require partial/components
│       ├── index.html # require partial
│       ├── partial1.html
│       ├── partial2.html
│       └── page1
│           └── index.html
└── src # ts
    ├── utils # reusable
    └── pages
        ├── index.ts # import mvc
        ├── index.model.ts
        ├── index.view.ts
        ├── index.control.ts
        └── page1
            ├── index.ts
            ├── index.model.ts
            ├── index.view.ts
            └── index.control.ts

Follow-ups: gif,jpg,jpeg,png?

Techniques

  1. Model View Controller (MVC)
  2. Jest for unit and mock testings
  3. Puppeteer for e2e testing
  4. Webpack
  5. MultiPages Application
  6. Github action to deploy github pages
  7. Typescript
  8. ESLint
  9. Prettier
  10. Cypress for e2e testing

Tools

  1. Bash script for creating new page.
    ./setup_newpage.sh  newpagename standard
    

References

  1. Define global variable with webpack
  2. How to use ESLint with TypeScript
  3. Linting in TypeScript using ESLint and Prettier
  4. Create a Pre-commit Git Hook to Check and Fix Your JavaScript/TypeScript Code Automatically

webpack-ts-mpa-example's People

Contributors

leoleungfacultyai avatar zcemycl avatar

Watchers

 avatar  avatar  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.