Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Mohammad/NPM & packages/Document3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
A package is a directory containing a package. js file,
which contains roughly three major sections: a basic description, a package definition,
and a test definition.
npm is the world's largest Software Registry.
The registry contains over 800,000 code packages.
The name npm (Node Package Manager) stems from when npm first was created as a package manager for Node.js.
All npm packages are defined in files called package.json.
The content of package.json must be written in JSON.
At least two fields must be present in the definition file: name and version.
Node Package Manager (NPM) is a command-line tool integral to the Node.js environment,
acting as a package manager to install, update, and manage libraries, packages,
and modules for Node.js applications.
==========================
Important commands of NPM:
npm init => Initializes a new NPM project and creates a new package.json file in the directory.
npm install => Installs all dependencies listed in the package.json file.
npm update => Updates all packages to their latest versions, as specified by the version range in the package.json file.
npm start => This runs a predefined command specified in the "start" property of a package's "scripts" object.
npm run [script] => Runs a script defined in the scripts section of the package.json file.
14 changes: 14 additions & 0 deletions Mohammad/Pakcage.json/Document2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Manual project dependency management is a weary task. For Node.js projects, the package.json file provides a simplified way to manage a project's metadata and dependencies.
Every npm package and Node.js project has a package.json file with metadata for a project. The file resides in the root directory of every Node.js package and appears after running the npm init command.
The package.json file contains descriptive and functional metadata about a project, such as a name, version, and dependencies. The file provides the npm package manager with various information to help identify the project and handle dependencies.
The package.json file is fully customizable and looks different for every project.
The package.json metadata fields help describe various properties of a Node.js project. The properties divide into two subtypes:
Descriptive properties help identify a project and distinguish a package if published.
Functional properties install and manage the project and its dependencies correctly.
**main Property**
The main property points to the project's entry point.
When a Node.js application imports the package through a require statement,
the package.json file uses the exports from the file in the main property and returns it to the application.
**dependencies Property**
The dependencies property is an essential field in a package.json file.
The section maps production-level dependent packages and their versions used in the project.
19 changes: 19 additions & 0 deletions Mohammad/Platforms-vs-ECMAScript (aka spec)/Document.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
JavaScript is a widely popular scripting language primarily used for web development.
JavaScript is primarily used for client-side programming, while Node.
js allows developers to build server-side applications using JavaScript.
Node.js is an open-source, cross-platform JavaScript runtime environment that allows developers to execute JavaScript on the server-side.
Node.js Built on Chrome's V8 JavaScript engine, Node.js enables developers to build scalable and high-performance web applications using JavaScript.
**Differences between Node.js and JavaScript**
*Execution Environment:
JavaScript runs in a web browser, while Node.js runs on a server.
This means that JavaScript is primarily used for client-side operations,
while Node.js is used for server-side tasks.
*Libraries and Modules:
Node.js includes a vast collection of built-in libraries and modules,
which allows it to perform complex server-side operations.
In contrast, JavaScript relies on external libraries and APIs for additional functionality.
*Concurrency Model:
Node.js uses an event-driven, non-blocking I/O model,
which makes it ideal for handling multiple concurrent requests and building scalable applications.
JavaScript, on the other hand, operates in a single-threaded environment and mainly focuses on user interactions and DOM manipulation.
------------------------------------------------------------------