Socket
Book a DemoInstallSign in
Socket

@equinor/opt-dev

Package Overview
Dependencies
Maintainers
0
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/opt-dev

OPT dev tools and cli scripts

latest
Source
npmnpm
Version
6.16.1
Version published
Maintainers
0
Created
Source

@equinor/opt-dev

License Downloads

Release Vulnerabilities

OPT dev tools and cli scripts.

CLI scripts

// package.json
"scripts": {
    "dev": "opt-dev dev",
    "build": "opt-dev build",
    "test": "opt-dev test"
}
opt-dev serve

Runs the application in the development mode.
Open http://localhost:3000 to view it in the browser.

Using the default port but it can be changed it in the .env file

The page will reload if you make edits.
You will also see any lint errors in the console.

opt-dev build

Builds the app for production to the dist folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to production!

opt-dev test

Launches the test runner.

Overriding configurations

Override webpack configuration

To override or extend a webpack configuration simply add a webpack.config.js file into the root of the application folder.

Override eslint configuration

To override or extend the eslint configuration simply add the rules you want to add/modify into the eslint configuration file.

Override prettier configuration

To override or extend the prettier configuration simply add the rules you want to add/modify into the .prettierrc.js file. See more on prettier share configuration.

Keep in mind, that all the new configurations will be merged and replace the base ones.

Required folder structure

You can use this dependency into your own project but, the folder structure must have the next required files:

my-app/
├─ public/              --> [Required folder] static assets that need to be load before the webpack.
├─ server/
│  ├─ index.js          --> [Required file] express server routing point.
├─ src/
│  ├─ index.html        --> [Required file] html template
│  ├─ index.tsx         --> [Required file] Application entry point

The Application entry point or express server routing point doesn't need to be typescript or javascript files, it just need to be a valid file (js, jsx, tsx, etc)

FAQs

Package last updated on 24 Jul 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