Giter VIP home page Giter VIP logo

gotanda-js-13-demo-1's Introduction

Welcome to scaffold-aurelia-firebase-pwa ๐Ÿ‘‹

Version Documentation Maintenance License: MIT Twitter: panchan9

Features / Utilities

How to Set Up

0. Prerequisites

For more details about VSCode Remote Development, see the official docs.

1. Fork Scaffold Repository

Fork this Scaffold and git clone it to your local.

$ git clone $YOUR_FORKED_PROJECT

# move project root directory
$ cd $YOUR_PROJECT_DIR

2. Launch Local Development Container

Launch VSCode workspace in your project root directory like this.

# launch VSCode workspace
$ code .

Then you can see the following dialog and press it. <<<< Attach IMAGE >>>>

3. Initialize Aurelia Application using aurelia-cli.

After initializing your local development container, you can use Firebase CLI and Aurelia CLI.

$ firebase -h

$ au help
No Aurelia project found.
Global aurelia-cli v1.2.0
                      _ _          ____ _     ___
  __ _ _   _ _ __ ___| (_) __ _   / ___| |   |_ _|
 / _` | | | | '__/ _ \ | |/ _` | | |   | |    | |
| (_| | |_| | | |  __/ | | (_| | | |___| |___ | |
 \__,_|\__,_|_|  \___|_|_|\__,_|  \____|_____|___|

This project was bootstrapped based on following selected features:

webpack http2 web typescript htmlmin-max sass postcss-typical jest cypress vscode scaffold-minimum

Initialize Aurelia app like this.

# initialize interactively
$ au new --here

# or you can run with config options like this.
$ au new $YOUR_PROJECT --unattended \
  --here \
  --select http2,typescript,htmlmin-max,sass,postcss-typical,jest,cypress,vscode

4. Install Package Dependencies

npm install \
  firebase \
  firebaseui

npm install -D \
  eslint \
  eslint-config-airbnb-base \
  eslint-config-prettier \
  eslint-plugin-import \
  eslint-plugin-prettier \
  prettier \
  @typescript-eslint/eslint-plugin \
  @typescript-eslint/parser 

5. Create src directory

Replace src directory generated by aulirea-cli with one under tmp directory.

$ rm -rf src && mv tmp/src .

6. Integrate ESLint and Prettier with VSCode

Append additional settings to .vscode/settings.json like below to configure ESLint and Prettier extensions.

{
  "typescript.tsdk": "node_modules/typescript/lib",
  "html.suggest.angular1": false,
  "html.suggest.ionic": false,
  
  /// append the following line ///
  "eslint.autoFixOnSave": true,
  "eslint.validate": [
    "javascript",
    {
      "language": "typescript",
      "autoFix": true
    }
  ],
  "prettier.eslintIntegration": true,
}

7. Configure Webpack Dev Server for Docker

Append host: '0.0.0.0' to Webpack's development server config in webpack.config.js like below.

  devServer: {
    contentBase: outDir,
    // serve index.html for all 404 (required for push-state)
    historyApiFallback: true,
    // enable all network interfaces to allow access from out of Docker container
    host: '0.0.0.0',
  },

8. Login Firebase Project

$ firebase login

9. Add npm script

$ 

That's all you need to do for local development!!
Enjoy your awesome development life!!


Usage

Run dev app

Run au run, then open http://localhost:8080

To open browser automatically, do au run --open.

To change dev server port, do au run --port 8888.

To enable Webpack Bundle Analyzer, do au run --analyze.

To enable hot module reload, do au run --hmr.

Build for production

Run au build --env prod.

Unit tests

Run au test (or au jest).

To run in watch mode, au test --watch or au jest --watch.

Integration (e2e) tests

You need the app running for integration test.

First, run au run and keep it running.

Then run au cypress to run cypress in interactive mode.

To perform a test-run and reports the results, do au cypress --run.

Author

๐Ÿ‘ค pannpers

Show your support

Give a โญ๏ธ if this project helped you!

๐Ÿ“ License

Copyright ยฉ 2019 pannpers.
This project is MIT licensed.


This README was generated with โค๏ธ by readme-md-generator

gotanda-js-13-demo-1's People

Contributors

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