New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cm-web-modules

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cm-web-modules

Collection of clean and small ES6 modules for the web

  • 1.2.6
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

cm-web-modules – Library of ES6 Web Modules

cm-web-modules is a library of JavaScript ES6 (ECMAScript 6) modules, used for coding chessmail.

The main purpose of cm-web-modules is, to prevent the usage of large libraries, and to provide needed functionality with the smallest and cleanest amount of code possible.

The cm-web-modules modules have no external dependencies, they don't use jQuery or other frameworks. They are written with modern vanilla JavaScript in ECMAScript 6 syntax.

The cm-web-modules modules are:

LibraryManager

The LibraryManager is the glue between the web-modules.

It in configured in postinstall.js. Add postinstall.js to the automtically excuted install-scripts from npm by adding it to package.json like this

package.json

"scripts": {
    "test": "mocha --require babel-core/register ./test/*.js",
    "postinstall": "node postinstall.js"
  }

In postinstall.js, add the used modules via manager.addProject("module-name")

The source of the module is than copied to PROJECT_ROOT/lib/modules/name. It provides the same include-folder (/lib) for the local and for the via npm installed modules.

Example postinstall.js

const LibraryManager = require("cm-web-modules/src/LibraryManager.js")
const manager = new LibraryManager(__dirname)

manager.addProject("cm-web-modules")
manager.addProject("chess.js", "", "chess.js")

Keywords

FAQs

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