Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maulingmonkey/modularize-namespace
Convert a single file, namespace based JavaScript or TypeScript library into a module.
https://github.com/maulingmonkey/modularize-namespace
build javascript module namespace typescript
Last synced: about 1 month ago
JSON representation
Convert a single file, namespace based JavaScript or TypeScript library into a module.
- Host: GitHub
- URL: https://github.com/maulingmonkey/modularize-namespace
- Owner: MaulingMonkey
- License: apache-2.0
- Created: 2019-04-03T17:57:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-09T18:32:32.000Z (over 5 years ago)
- Last Synced: 2024-11-21T06:11:33.366Z (about 1 month ago)
- Topics: build, javascript, module, namespace, typescript
- Language: TypeScript
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# What? Why?
I really like being able to author single-js file typescript libraries without modules.
The output of typedoc is way cleaner, files merge cleanly, can be used in non-module projects, etc.
Being able to consume libraries as modules is still nice, however, so this tool aims to provide that as an option.* License: [Apache 2.0](LICENSE.txt)
* Github: [MaulingMonkey/modularize-namespace](https://github.com/MaulingMonkey/modularize-namespace)
* NPM: [@maulingmonkey/modularize-namespace](https://www.npmjs.com/package/@maulingmonkey/modularize-namespace)# Quick Start
* Grab [NPM](https://nodejs.org/en/)
* Option 1: Install per-project, and convert once
```cmd
cd my-project
npm init
npm install --save-dev @maulingmonkey/modularize-namespace
node_modules/.bin/modularize-namespace namespaces.js --output module.js --namespace my.namespace
```
* Option 2: Install globally, and convert once
```cmd
npm install --global @maulingmonkey/modularize-namespace
modularize-namespace namespaces.js --output module.js --namespace my.namespace
```# Hacking on this
* Grab [NPM](https://nodejs.org/en/), [VS Code](https://code.visualstudio.com/)
* Fork https://github.com/MaulingMonkey/modularize-namespace
* `git clone [...your fork...]`
* `code your_fork`
* Make changes
* `Ctrl+Shift+B`
* Profit, commit, and push
* I might respond to [Pull requests](https://github.com/MaulingMonkey/modularize-namespace/pulls). No promises!