Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@equinor/amplify-component-lib

Package Overview
Dependencies
Maintainers
4
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/amplify-component-lib

Frontend Typescript components for the Amplify team

Source
npmnpm
Version
8.4.6
Version published
Weekly downloads
825
-41.65%
Maintainers
4
Weekly downloads
 
Created
Source
intro-logo

This package contains components, utils, providers and hooks developed and used by the amplify team.

  • Storybook

Building amplify-component-lib

Build and publish is done automatically when code is merged into main branch, if the package.json version number is higher. To increase the version number use npm run version <type> and specify what type of versioning.

Using config files from amplify-component-lib

  • Navigate to your projects root folder, ~/Projects/recap for instance

  • Copy and run the following command

wget -q -O - https://raw.githubusercontent.com/equinor/amplify-component-lib/main/config/install.sh | bash

This should have downloaded the .eslintrc.cjs, .prettierignore, .prettierrc.jr, tsconfig.json, env.sh, Dockerfile, proxy/nginx.conf, proxy/securityheaders.conf and github actions workflow files

  • Navigate to your projects root folder, ~/Projects/recap for instance

  • Copy and run the following command

wget -q -O - https://raw.githubusercontent.com/equinor/amplify-component-lib/main/config/install-deployment-files.sh | bash

This should have downloaded the build_deploy_radix.yaml, promote.yaml, notify.yaml, push.yaml

NOTE: These files should eventually be served from the same install script we use for getting other config files. We serve it from a different script so that applications which are not ready for the change in deployment process don't have to rush.

Notes

This script assumes the following structure in the project

project
│   README.md
│
└───client
│   |   ...
│
└───server
    │   ...

Installing pre-commit hook in an application

  • Navigate to your projects root folder, ~/Projects/recap for instance

  • Copy and run the following command

wget -q -O - https://raw.githubusercontent.com/equinor/amplify-component-lib/main/config/precommit/install.sh | bash

This should have downloaded a package.json file in the root of the project, created (if it didn't exist) the tooling folder. You should also see a .husky folder in the root of the project with a file called pre-commit inside

Dockerfile linting

We use hadolint to check that our docker file is using best practice.

Install

In order to commit changes related to a dockerfile you need to have hadolint installed

CLI

On OSX you can use brew to install:

brew install hadolint

On Windows you can use scoop to install:

scoop install hadolint

In any of these do not work then you can refer to the installation section in hadolint's repository

VS Code

If you want to shorten the feedback loop when changing your dockerfile you can optionally add the hadolint extension (Extension id: exiasr.hadolint)

WebStorm

Looks like it is not available for WebStorm at the moment

Latest version

main

FAQs

Package last updated on 09 Aug 2024

Did you know?

Socket

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