Socket
Socket
Sign inDemoInstall

tofisa-package

Package Overview
Dependencies
5
Maintainers
1
Versions
313
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tofisa-package

This is a private package for using in our project. I use [Typescript](https://www.typescriptlang.org/docs/), cause It enables us to add type safety to our project. That you can use it with installing ***npm i tofisa-package*** in your terminal.


Version published
Weekly downloads
394
increased by215.2%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Introduction

This is a private package for using in our project. I use Typescript, cause It enables us to add type safety to our project. That you can use it with installing npm i tofisa-package in your terminal.

Upgrade package version

1.npx tsc
2.npm init
3.npm login(if you are login you can escape this part)
4.npm publish

Structure

dist

Here, we are telling TypeScript to store the output in dist directory. If we does not specify this option, TypeScript by default puts the output JavaScript file alongside the TypeScript files. Keeping a separate output directory makes development easier. You can find every part of project inside of this folder that when you use this package, you can import components from this part and you don't access the src folder.

src

There are some folders and files inside of this part that I describe every part of that.

src/assets:

In this folder I save public things like, fonts-icons-images that we use them in many components.

src/components:

We create this project for this part, defining every part of main project that use a lot in different sections. Every component has interface. Interfaces get used to ensure that the object contains the required data with the correct data type. In index.ts I just export all the things inside every file That it is important for creating our dist folder.

src/styles:

For style, we use bootstrap-sass. We create our custom.scss that help us to added our bootstap classes to avoid of repetition. We have global.css here just for defining global fonts. Sometimes we need CSS for global styles for this reason we have index.css file. Also, we export both of them inside the index.ts file.

src/index.ts:

This file is used for export the important part of project that it is components.

src/react-app-env.d.ts:

This file references TypeScript types declarations that are specific to projects started with Create React App. These type declarations add support for importing resource files such as bmp, gif, jpeg, jpg, png, webp, and svg. That means that the following import will work as expected without errors: import logo from './logo.svg';
It also adds support for importing CSS Modules.

FAQs

Last updated on 14 Aug 2023

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