https://github.com/bahrus/be-exporting
Export JS constants from inline script attributes.
https://github.com/bahrus/be-exporting
Last synced: 4 months ago
JSON representation
Export JS constants from inline script attributes.
- Host: GitHub
- URL: https://github.com/bahrus/be-exporting
- Owner: bahrus
- License: mit
- Created: 2023-11-02T20:41:30.000Z (over 1 year ago)
- Default Branch: baseline
- Last Pushed: 2024-01-09T02:11:44.000Z (over 1 year ago)
- Last Synced: 2025-02-01T08:11:14.966Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 75.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# be-exporting
Export JS constants from inline script attributes.
[](http://badge.fury.io/js/be-exporting)
[](https://bundlephobia.com/result?p=be-exporting)![]()
[](https://github.com/bahrus/be-exporting/actions/workflows/CI.yml)```html
```To access the export const symbols:
```JavaScript
const enhancement = await oDiv.beEnhanced.whenResolved('be-exporting');
const {onload} = enhancement;
const {test} = onload;
```## Viewing Demos Locally
Any web server that can serve static files will do, but...
1. Install git.
2. Fork/clone this repo.
3. Install node.js.
4. Open command window to folder where you cloned this repo.
5. > npm install
6. > npm run serve
7. Open http://localhost:3030/demo/ in a modern browser.## Running Tests
```
> npm run test
```## Using from ESM Module:
```JavaScript
import 'be-exporting/be-exporting.js';
```## Using from CDN: