Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adonisjs/application

Package Overview
Dependencies
Maintainers
2
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adonisjs/application

AdonisJs application class to read app related data

  • 1.3.16
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29K
decreased by-9.01%
Maintainers
2
Weekly downloads
 
Created
Source

Adonis application

circleci-image npm-image license-image

The application class for AdonisJs to know more about the environment and project structure of your AdonisJs applications.

Table of contents

Usage

Ideally you shouldn't be installing this module directly, since it is part of AdonisJs by default. However, installing module directly is helpful when testing AdonisJs specific addons.

npm i @adonisjs/application

# Yarn
yarn add @adonisjs/application

and then use it as follows:

import { Application } from '@adonisjs/application/build/standalone'
import { Ioc } from '@adonisjs/fold'

const app = new Application(
  __dirname,
  new Ioc(),
  require('./adonisrc.json'),
  require('./package.json'),
)

The constructor takes 4 arguments, which you can fake during tests.

Argument positionDescription
1 (appRoot)The application root
2 (ioc)Instance of IoC container
3 (rcContents)Contents of .adonisrc.json file. You can also provide an empty object
4 (pkgFile)Pass the contents of package.json file. Required to pull the app name, version and so on

rcParser

The application instance will parse the contents of .adonisrc.json file. However, if you need the parser, you can access and use it as follows.

import { rcParser } from '@adonisjs/application/build/standalone'
rcParser.parse(require('.adonisrc.json'))

API Docs

Following are the autogenerated files via Typedoc

Keywords

FAQs

Package last updated on 20 Jun 2020

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc