1.2.2 • Published 4 years ago

vorlefan.path_route v1.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Path Route

This is my first npm package module. The main function is to give the power of easily accessing the folders and files of your project.

With npm do:

npm install vorlefan.path_route

With yarn do:

yarn add vorlefan.path_route

You can access on the folder 'docs' of this repository A better documentation will be made at the near future.

Highlight

  • Create several custom routes to access different folders & files
  • Without any dependency
  • Manage your files with the power to read and store
  • Easy to use

Example

Please, take a look at the 'example' folder of this repository

 'use strict';

/**
 * @description Basic usage of this module. 
 * This will take at account this folder (module folder),
 * as example.
 */


const {
    Routes,
    Route
} = require('../index')


// Create a new route instance and give it a name

Routes.instance((instance) => {

    instance.set('src', instance.resolve(__dirname, '..'))
    instance.join('test', 'src')
    instance.join('examples', 'src')

}).namespace("Basic")


// Access

console.log(Route.Basic.get('test'));
console.log(Route.Basic.get('examples').path);
1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.21

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

0.3.4

4 years ago