npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nhl97-ngx-atoms-lib

v1.3.2

Published

AtomsLib, published as the npm package `nhl97-ngx-atoms-lib`, is a library of Angular components, services, SCSS mixins, font assets and such, which I, [Nikolaus-Mathias Herl](https://nikiherl.com), built/collected and reuse throughout my web development

Downloads

24

Readme

AtomsLib Public Readme

About This Project / Package

AtomsLib, published as the npm package nhl97-ngx-atoms-lib, is a library of Angular components, services, SCSS mixins, font assets and such, which I, Nikolaus-Mathias Herl, built/collected and reuse throughout my web development projects. AtomsLib is named after the "Atomic Design" pattern/system, i.e. it aims to provide a set of basic, reusable, well-typed components, such as buttons or inputs, that can then be instantiated and recombined to build more complex UIs.

The library is a work-in-progress and partially a playground for me, not currently suitable as a quality dependency for external developers. It does provide some components and styles to my BSc thesis project AdMaTilE.

The following notes and instructions are meant for myself, are often specific to my development environment (/my mono repo), and are in good part about the no-longer pursued compilation to WebComponent.

Roadmap / (Want) TODOs

  • button/clickable Directive
  • bundle ('import') all essential AtomsLib styles into a single file 'atoms-lib.scss' (or similar)
  • dropdown (from small enum/selection)
  • ShortString editor (single row text input) @Input placeholder @Output txt$
  • time editor @Input start-with: Time | DateTime | "now" @Output selected$: O
  • date editor @Input year-format = Human Era (12021) @Output selected$: O
  • composite: formfield {describing label, input-type, missing/data-error messages/handler}

Build

Building For Other Angular Projects

To this end, AtomsLib gets compiled using the Ivy engine's "partial compilation" feature. This means it should be compatible with Angular v12+.

ng build AtomsLib will build the artifacts into the 'AngularMono/dist/atoms-lib' directory.

Building To Web Components

... is broken as of now. Back when it worked / was set up for that purpose, the relevant command was:

ng build --configuration=prod --output-hashing none

(I don't know how the '--output-hashing' option affects things, but an article back then prescribed it)

Publish

Go to the full dist folder 'AngularMono/dist/atoms-lib' and run npm publish.

Consume

In Another Angular Project

Add 'nhl97-ngx-atoms-lib' to the consuming project's package.json under 'dependencies'. Run npm install.

In the consuming Angular module, add AtomsLibModule to the 'imports' array:

imports: [...,
          AtomsLibModule,
          ...]

In the consuming 'angular.json' file:

  • Add to the 'styles' array all stylesheets that should apply styles on their own. (full key: projects/<project-name>/architect/build/options/styles)
  • Also register the AtomsLib styles folder as a source for SCSS partial files, so these files can be @use'd, and their mixins @included in the consuming project's SCSS files. (full key: projects/<project-name>/architect/build/options/stylePreprocessorOptions/includePaths):
"styles": [
  ...
  "node_modules/nhl97-ngx-atoms-lib/styles/base_consts.scss",
  "node_modules/nhl97-ngx-atoms-lib/styles/colors.scss",
  "node_modules/nhl97-ngx-atoms-lib/styles/material_icons.scss",
  ...
  ],
  "stylePreprocessorOptions": {
    "includePaths": [
      "node_modules/nhl97-ngx-atoms-lib/styles"
    ]
  },

After rebuilding / restarting ng serve, AtomsLib's components, services styling, etc. should be available.

As WebComps

<head>
<script type="text/javascript" src="runtime.js"></script>
<script type="text/javascript" src="es2015-polyfills.js" nomodule></script>
<script type="text/javascript" src="polyfills.js"></script>
<script type="text/javascript" src="scripts.js"></script>
<script type="text/javascript" src="main.js"></script>
</head>
<!-- mby more accurate? -->
    <script type="text/javascript" src="./atoms/runtime-es2020.js"></script>
    <script type="text/javascript" src="./atoms/polyfills-es5.js" nomodule></script>
    <script type="text/javascript" src="./atoms/polyfills-es2020.js"></script>
    <!-- TODO: get scripts.js to be produced + included here? -->
    <script type="text/javascript" src="./atoms/main-es2020.js"></script>
    <script type="text/javascript" src="./atoms/styles.css"></script>

Input properties' naming pattern are forced into kebab-case: (from camelCase. and snake_case??)

Goals: