Giter VIP home page Giter VIP logo

tinkoff / angular-open-source-starter Goto Github PK

View Code? Open in Web Editor NEW
251.0 251.0 25.0 6.02 MB

This is a starter project for creating open-source libraries for Angular. It is a full fledged Angular workspace with demo application and easy library addition. It is designed to be used for open-sourcing libraries on Github and has everything you'd need ready for CI, code coverage, SSR testing, StackBlitz demo deployment and more.

Home Page: https://tinkoff.github.io/angular-open-source-starter/

License: Apache License 2.0

JavaScript 17.90% TypeScript 74.32% HTML 5.89% CSS 0.83% Shell 1.05%
angular angular-library angular-library-quickstart hacktoberfest library open-source opensource starter starter-project starter-template

angular-open-source-starter's People

Contributors

dependabot[bot] avatar marsibarsi avatar nsbarsukov avatar splincode avatar waterplea 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-open-source-starter's Issues

[FEATURE] Upgrade for everything

The package doesn't work out of the box with yarn and seems like it's failing on build.

Would be appreciated:

  1. Adding jest as testing env
  2. Storybook
  3. Cypress or Playwright ( ability to choose would be a better choice)
  4. Build an ability to build libraries within the libraries such as using CDK inside UI and publish it to NPM
  5. Extend schematics so everything would be as a part of CLI instead of npm commands.

[BUG] `npm run add [your-library-name]` throws `TypeError`

๐Ÿž Bug report

Description

See root README:
readme

It does not work.

Reproduction

Run this npm-script:

"add": "schematics ./schematics/collection.json:library-starter --debug=false",

(for example, npm run add core)

it throws:

โžœ  npm run add core

> @tinkoff/[email protected] preadd
> npm run build:schematics


> @tinkoff/[email protected] build:schematics
> tsc -p tsconfig.schematics.json


> @tinkoff/[email protected] add
> schematics ./schematics/collection.json:library-starter --debug=false "core"

TypeError: Cannot destructure property 'dependencies' of 'packageObject' as it is null.
    at updateDemoPackage (/Users/n.barsukov/WebstormProjects/angular-open-source-starter/schematics/library-starter/index.js:30:13)
    at /Users/n.barsukov/WebstormProjects/angular-open-source-starter/schematics/library-starter/index.js:19:9
    at MergeMapSubscriber.project (/Users/n.barsukov/WebstormProjects/angular-open-source-starter/node_modules/@angular-devkit/schematics-cli/node_modules/@angular-devkit/schematics/src/rules/call.js:74:24)
    at MergeMapSubscriber._tryNext (/Users/n.barsukov/WebstormProjects/angular-open-source-starter/node_modules/@angular-devkit/schematics-cli/node_modules/rxjs/internal/operators/mergeMap.js:69:27)
    at MergeMapSubscriber._next (/Users/n.barsukov/WebstormProjects/angular-open-source-starter/node_modules/@angular-devkit/schematics-cli/node_modules/rxjs/internal/operators/mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (/Users/n.barsukov/WebstormProjects/angular-open-source-starter/node_modules/@angular-devkit/schematics-cli/node_modules/rxjs/internal/Subscriber.js:66:18)
    at Observable._subscribe (/Users/n.barsukov/WebstormProjects/angular-open-source-starter/node_modules/@angular-devkit/schematics-cli/node_modules/rxjs/internal/util/subscribeToArray.js:5:20)
    at Observable._trySubscribe (/Users/n.barsukov/WebstormProjects/angular-open-source-starter/node_modules/@angular-devkit/schematics-cli/node_modules/rxjs/internal/Observable.js:44:25)
    at Observable.subscribe (/Users/n.barsukov/WebstormProjects/angular-open-source-starter/node_modules/@angular-devkit/schematics-cli/node_modules/rxjs/internal/Observable.js:30:22)
    at MergeMapOperator.call (/Users/n.barsukov/WebstormProjects/angular-open-source-starter/node_modules/@angular-devkit/schematics-cli/node_modules/rxjs/internal/operators/mergeMap.js:39:23)

Expected behavior

Versions

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Angular [e.g. 8]

Additional context

[BUG] Broken import-aliases in `demo` unit tests

๐Ÿž Bug report

Description

Reproduction

  1. Run nx g @nrwl/js:library meow
  2. Open this file https://github.com/Tinkoff/angular-open-source-starter/blob/main/projects/demo/src/app/app.component.ts and add:
import {meow} from '@angular-open-source-starter/meow';

console.log(meow());
  1. Run nx test demo

It fails with error

โžœ  nx test demo

> nx run demo:test 

ngcc-jest-processor: running ngcc
 FAIL  projects/demo/src/app/app.component.spec.ts
  โ— Test suite failed to run

    Cannot find module '@angular-open-source-starter/meow' from 'src/app/app.component.ts'

    Require stack:
      src/app/app.component.ts
      src/app/app.browser.module.ts
      src/app/app.component.spec.ts

      1 | import {Component} from '@angular/core';
    > 2 | import {meow} from '@angular-open-source-starter/meow';
        | ^
      3 |
      4 | console.log(meow());
      5 |

      at Resolver.resolveModule (../../node_modules/jest-runtime/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.<anonymous> (src/app/app.component.ts:2:1)

Expected behavior

No error

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.