Skip to content

A collection of shared JavaScript and HTML projects that are used within our Browsers.

License

Notifications You must be signed in to change notification settings

duckduckgo/content-scope-scripts

Repository files navigation

Project Overview

A collection of shared JavaScript and HTML projects that are used within our Browsers.

Child Projects

A library of features/protections that are executed within our browsers.

Features have a deep integration with privacy-configuration, to allow dynamic enabling or disabling of features at runtime.

This project contains a set of isolated JavaScript applications that end up being embedded directly into our browsers. A 'special page' can be as simple as a single-screen, or as complex as a New Tab Page.

This project serves as an abstraction layer for seamless web-to-native and native-to-web communications, inspired by the JSON-RPC format.

The module provides three core methods: notify for fire-and-forget messages, request for asynchronous request-response interactions, and subscribe for handling push-based data updates.

Utilities to automatically generate TypeScript types from JSON Schema files.


NPM commands

From the top-level root folder of this npm workspace, you can run the following npm commands:

Build all workspaces:

Use this to produce the same output as a release. The build directory will be populated with various artifacts.

npm run build

Tip

You can run the build command from within any sub-project too, the artifacts will always be lifted out to the root-level build folder.

Run unit tests for all workspaces:

npm run test-unit

Run integration tests for all workspaces:

npm run test-int

Run extended integration tests for all workspaces:

npm run test-int-x

Clean tree and check for changes:

npm run test-clean-tree

Generate documentation using TypeDoc:

npm run docs

Generate and watch documentation using TypeDoc:

npm run docs-watch

Compile TypeScript files:

npm run tsc

Watch and compile TypeScript files:

npm run tsc-watch

Lint the codebase using ESLint:

npm run lint

Lint and automatically fix issues:

npm run lint-fix

Serve integration test pages on port 3220:

npm run serve

Serve special pages on port 3221:

npm run serve-special-pages