Skip to content

use to include absolute path or relative path file

License

Notifications You must be signed in to change notification settings

Izzyz27/include-node

This branch is up to date with Lautitia/include-node:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

138b03c · Feb 25, 2024

History

8 Commits
Aug 17, 2015
Aug 17, 2015
Aug 17, 2015
Aug 17, 2015
Aug 17, 2015
Feb 25, 2024

Repository files navigation

include-node

use to include absolute path or relative path file

Installation

npm install include-node --save

Usage

var a = Include('./libs/a');
var b = Include('/module/driver');

If we have such directory structure as follow:

--include
	+---libs
	|	+---A.js
	|
	|---module
	|	+---driver.js
	|
	+---run.js
	+---util.js

in run.js include files can use these ways

var a = Include('./libs/a') or Include('/libs/a');
var util = Include('./util') or Include('/util');

in a.js include files can use these ways

var util = Include('/util') or Include('../util');
var driver = Include('../module/driver') or Include('/module/driver');

About

use to include absolute path or relative path file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%