Socket
Socket
Sign inDemoInstall

@squidit/ngx-css

Package Overview
Dependencies
13
Maintainers
2
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @squidit/ngx-css

Squid CSS Styleguide for Angular


Version published
Weekly downloads
191
decreased by-17.32%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

NGX CSS - Library

About

NGX CSS Framework An angular abstraction for Squid CSS

Table of contents

Exemple

See an exemple of all components here

Usage

Install

  1. Install
npm install @squidit/css @squidit/ngx-css --save
  1. Add css and toast js files to your angular.json
{
  // ...,
  "assets": [
    // This object inside assets Array
    {
      "glob": "**/*",
      "input": "./node_modules/@squidit/css/dist/fonts",
      "output": "./assets/fonts" // Output fonts
    },
    "src/assets" // Default assets
  ],
  "styles": [
    "src/styles.scss"
  ],
  "scripts": [
    "node_modules/@squidit/css/src/js/components/toast.js" // JS includes
  ]
  // ...
}
  1. Add to your style.scss main file
$fontsFolderPath: '/assets/fonts'; // Overwrite default font path
@import '@squidit/css/src/scss/squid.scss'; // Import all Framework Styles
  1. Import SquidCSSModule in your *.module.ts
import { SquidCSSModule } from '@squidit/ngx-css'

@NgModule({
  // ...
  imports: [
    // ...
    NgxSquidModule
  ]
  // ...
})
Use form erros variables

To use the errors handled in form components, you need to follow the steps below

  1. Install ngx-translate and follow the initial Setup

  2. On you .json files from each language follow the same structure (need one for each supported language of your application):

{
  // ...
  "forms": {
    "search": "Search",
    "searchSelectEmpty": "There are no options to select",
    "fileSize": "File too large",
    "required": "Required field",
    "minimumRequired": "The minimum number of selected tags must be greater than or equal to {{ minTags }}",
    "email": "Invalid email",
    "url": "Invalid URL. Attention: URL must start with https://",
    "date": "Invalid Date",
    "phone": "Invalid phone number",
    "minValueAllowed": "Min value allowed is: {{ min }}",
    "maxValueAllowed": "Max value allowed is: {{ max }}",
    "rangeDate:": "Date outside valid range"
  }
  // ...
}

Development

  1. Install npm dependences npm install

  2. Run npm start to watch angular library (src directory)

  3. In another window run start:application

This launches an angular pattern that is contained in the application folder. Just use the components inside it, and every change in the files in the src folder will be automatically reflected in the application.

Write Documentation

We use compodoc to write docs with jsDocs

Run start:docs and the compodoc will serve the docs. For each change it is necessary to run the command again

Deploy to NPM

Just draft a new release here on Github and an actions will starts

**Important to use the same tag as package.json

Documentation

See Docs here

Keywords

FAQs

Last updated on 26 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc