0.1.7 • Published 10 years ago

require2web v0.1.7

Weekly downloads
4
License
MIT
Repository
bitbucket
Last release
10 years ago

#Require 2 Web By Christopher Eaton, Oregon USA


##Description Require2web (r2w) is a node.js command line utility that combines multiple JavaScript files into a single .js file for use in the browser. It allows you to structure your Javascript library like a node.js application, and make require() calls to other modules. When your project is compiled with require2web, and included on your website, you can continue to make require() calls to dynamically load modules.

##Installation It's generally recommended to install r2w as a global library. Once this is done you can start it like any other command-line utility using the command "r2w", as shown in the usage section below.

npm install -g require2web

##Usage

Usage: r2w {-c "<config file>"} {-p "<path>"} {-i "<path to ignore>"} -o <output.js>

*The path options (-p and -i) can be specified multiple times.

Options:
  -c, --config       Specify a project configuration file.                                                                               
  -g                 Output the default project configuration json. This can be copied to a configuration file for use with your project.
  -p, --paths        The files or directories (to scan recursively) to merge.                                                            
  -i, --ignorepaths  The files or directories that will be ignored.                                                                      
  -o, --output       The name of the output file containing the merged code.                                                             
  --package          Specifies the package.json file to find the main *.js file to begin the merge process.                              
  -h, --help         Show this help message.  

####Considerations

  • The output template defines a the require() function - if you are using another library that may conflict with this, you can modify the "output.template" file in the "templates" folder and simply rename the require method.
  • To generate a default r2w config file use "r2w -g > r2w.config" on any unix/linux machine.

##About this project & contributors Repository is on BitBucket
Report any problems here
Visit my blog at awesometacular.com

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago