Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tpkn/aliasmo
Require NodeJs module using alias
https://github.com/tpkn/aliasmo
Last synced: 6 days ago
JSON representation
Require NodeJs module using alias
- Host: GitHub
- URL: https://github.com/tpkn/aliasmo
- Owner: tpkn
- License: mit
- Created: 2019-04-23T18:37:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-13T17:09:40.000Z (about 5 years ago)
- Last Synced: 2024-09-25T09:28:00.174Z (4 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Aliasmo [![npm Package](https://img.shields.io/npm/v/aliasmo.svg)](https://www.npmjs.org/package/aliasmo)
Require NodeJs modules using alias:warning: Tested only on CommonJS system, and not too far in deep.
## API
```javascript
require('aliasmo')();// or without modifying package.json file
require('aliasmo')({
"@root": ".",
"@config": "./config.js",
"@routes": "routes/",
"@util": "modules/util"
});
```### package.json
```json
{
"name": "app",
"version": "0.0.1",
"main": "app.js",
"aliases": {
"@root": ".",
"@config": "./config.js",
"@routes": "routes/",
"@util": "modules/util"
},
"dependencies": {
}
}
```