Registry / serialization / dpla-lang

dpla-lang

JSON →
library1.0.0jsnpmunverified

DPLA is a custom programming language transpiler that converts DPLA source code into JavaScript. Version 1.0.0 provides core functions for transpilation and execution. It is distributed as a single JavaScript module for use in browsers via CDN. The project is hosted on GitHub with a live demo, but lacks npm distribution, TypeScript definitions, or a dedicated package. Key differentiators: domain-specific language transpiler, minimal API (two functions), and browser-first usage.

npm install dpla-lang
INSTALL
IMPORT
SIG · DPLA-LANG
D
dpla-lang
serializationjavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

run
import { run } from 'https://cdn.jsdelivr.net/gh/DPLA-S/DPLA/src/index.js'
const run = require('dpla-lang')
Package is not on npm; must be imported from GitHub CDN. CommonJS require will fail.
transpile
import { transpile } from 'https://cdn.jsdelivr.net/gh/DPLA-S/DPLA/src/index.js'
import { transpile } from 'dpla-lang'
Package is not on npm; import from npm package name is incorrect.
default export
import * as dpla from 'https://cdn.jsdelivr.net/gh/DPLA-S/DPLA/src/index.js'
The module exports named exports only; no default export exists.

Shows how to use transpile and run functions to convert and execute DPLA code in a browser environment.

import { run, transpile } from 'https://cdn.jsdelivr.net/gh/DPLA-S/DPLA/src/index.js'; // Transpile DPLA code to JavaScript const dplaCode = 'print "Hello, world!"'; const jsCode = transpile(dplaCode); console.log('Generated JavaScript:', jsCode); // Run DPLA code directly run(dplaCode); // Example output depends on DPLA language semantics
Debug
Known issues
gotchaPackage not available on npm. Importing from npm will fail.
fix
Use the GitHub CDN URL for imports. Do not install via npm.
affects: >=1.0
gotchaNo TypeScript definitions provided. TypeScript users will need to declare module types manually.
fix
Create a declaration file (.d.ts) for the module.
affects: >=1.0
deprecatedThe run function may have undefined behavior with certain DPLA constructs; transpile first and review output for production use.
fix
Always transpile code and inspect the resulting JavaScript before relying on run() for critical applications.
affects: >=1.0
Errors
Common errors & fixes
Error: Cannot find module 'dpla-lang'
Attempting to require or import from npm package name when it is not published to npm.
fix
Replace import source with the correct GitHub CDN URL: import { run } from 'https://cdn.jsdelivr.net/gh/DPLA-S/DPLA/src/index.js'
Uncaught SyntaxError: The requested module '.../src/index.js' does not provide an export named 'run'
Using named import with incorrect export name or the module hasn't loaded properly.
fix
Verify that the import URL is correct and that the module is served with correct MIME type. Use dynamic import if necessary.
TypeError: transpile is not a function
Importing transpile incorrectly, e.g., as a default export or from the wrong path.
fix
Ensure you are using named import: import { transpile } from '<correct url>'
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
dpla-lang — npm install dpla-lang · libregistry