GithubHelp home page GithubHelp logo

celestius0 / nw-angular-cli-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nwutils/nw-angular-example

0.0 1.0 0.0 1.16 MB

An example of an Angular CLI app running in NW.js

License: MIT License

JavaScript 16.29% TypeScript 63.85% CSS 2.40% HTML 17.46%

nw-angular-cli-example's Introduction

NW.js and Angular CLI example

This project was generated with Angular CLI version 8.3.8.

A Screenshot of the default app running on Windows

Running Locally for development

  1. npm install
  2. npm start
  3. Webpack will spin up (takes a moment) then a window will pop up

You can also run this repo in a regular browser with npm run start:web, but will need to add conditionals into your code to skip desktop-specific code (if (window.nw) {}).

Building for distribution

  1. npm run build:clean will delete your ./dist and /dist-ng folders
  2. npm run build:ng will build just your Angular app for distribution (./dist-ng)
  3. npm run build:nw will build just your NW.js app (./dist)
  4. npm run build is your all-in-one command. It will clean out the old dist folders and build your Angular and NW.js app

IMPORTANT NOTE ABOUT BUILDS!!!

They take a long time. If you do npm run build expect it to take 10-15 minutes. This can be adjusted by changing the build params in the package.json. The more platforms and build types, the longer it takes. You can also remove the --concurrent from the build:nw script to see a status of what has been completed. This will allow individual pieces to finish faster, but the entire build will take longer.

Automated quality enforcment

  1. Linting: npm run lint - tslint.json
  2. Unit tests: npm test - Karma.
  3. End-to-end: npm run e2e - Accepting PR to fix these tests. - Protractor.

Code scaffolding

ng generate Docs

  1. npm run generate -- component component-name to generate a new component.
  2. npm run generate -- directive directive-name to generate a new directive.
  3. npm run generate -- pipe pipe-name to generate a new pipe.
  4. npm run generate -- service service-name to generate a new service.
  5. npm run generate -- class class-name to generate a new class.
  6. npm run generate -- guard guard-name to generate a new guard.
  7. npm run generate -- interface interface-name to generate a new interface.
  8. npm run generate -- enum enum-name to generate a new enum.
  9. npm run generate -- module module-name to generate a new module.

Further help

To get more help on the Angular CLI use npm run ng -- help or go check out the Angular CLI README.

nw-angular-cli-example's People

Contributors

thejaredwilcurt avatar diesermerlin avatar

Watchers

James Cloos 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.