{"id":26912,"library":"dpla-lang","title":"DPLA transpiler","description":"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.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/DPLA-S/DPLA","tags":["javascript","language","programming language","dpla"],"install":[{"cmd":"npm install dpla-lang","lang":"bash","label":"npm"},{"cmd":"yarn add dpla-lang","lang":"bash","label":"yarn"},{"cmd":"pnpm add dpla-lang","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is not on npm; must be imported from GitHub CDN. CommonJS require will fail.","wrong":"const run = require('dpla-lang')","symbol":"run","correct":"import { run } from 'https://cdn.jsdelivr.net/gh/DPLA-S/DPLA/src/index.js'"},{"note":"Package is not on npm; import from npm package name is incorrect.","wrong":"import { transpile } from 'dpla-lang'","symbol":"transpile","correct":"import { transpile } from 'https://cdn.jsdelivr.net/gh/DPLA-S/DPLA/src/index.js'"},{"note":"The module exports named exports only; no default export exists.","wrong":null,"symbol":"default export","correct":"import * as dpla from 'https://cdn.jsdelivr.net/gh/DPLA-S/DPLA/src/index.js'"}],"quickstart":{"code":"import { run, transpile } from 'https://cdn.jsdelivr.net/gh/DPLA-S/DPLA/src/index.js';\n\n// Transpile DPLA code to JavaScript\nconst dplaCode = 'print \"Hello, world!\"';\nconst jsCode = transpile(dplaCode);\nconsole.log('Generated JavaScript:', jsCode);\n\n// Run DPLA code directly\nrun(dplaCode);\n\n// Example output depends on DPLA language semantics","lang":"javascript","description":"Shows how to use transpile and run functions to convert and execute DPLA code in a browser environment."},"warnings":[{"fix":"Use the GitHub CDN URL for imports. Do not install via npm.","message":"Package not available on npm. Importing from npm will fail.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Create a declaration file (.d.ts) for the module.","message":"No TypeScript definitions provided. TypeScript users will need to declare module types manually.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Always transpile code and inspect the resulting JavaScript before relying on run() for critical applications.","message":"The run function may have undefined behavior with certain DPLA constructs; transpile first and review output for production use.","severity":"deprecated","affected_versions":">=1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Replace import source with the correct GitHub CDN URL: import { run } from 'https://cdn.jsdelivr.net/gh/DPLA-S/DPLA/src/index.js'","cause":"Attempting to require or import from npm package name when it is not published to npm.","error":"Error: Cannot find module 'dpla-lang'"},{"fix":"Verify that the import URL is correct and that the module is served with correct MIME type. Use dynamic import if necessary.","cause":"Using named import with incorrect export name or the module hasn't loaded properly.","error":"Uncaught SyntaxError: The requested module '.../src/index.js' does not provide an export named 'run'"},{"fix":"Ensure you are using named import: import { transpile } from '<correct url>'","cause":"Importing transpile incorrectly, e.g., as a default export or from the wrong path.","error":"TypeError: transpile is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}