JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q39298F
  • License MIT

Write SSML inline within javascript files using JSX

Package Exports

  • ssml-jsx

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ssml-jsx) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ssml-jsx

Write SSML inline within JavaScript.

You can use SSML directly by including babel-plugin-transform-react-jsx in your .babelrc and importing ssml from ssml-jsx.

{
  "plugins": [
    ["transform-react-jsx", { "pragma": "ssml" }]
  ]
}
import ssml, { renderToString } from 'ssml-jsx';

const speech = (
  <speak>
    <p>Hello world!</p>
    <break time='2s' />
    <p>What would you like to do today?</p>
  </speak>
);