ExtJS Dependencies Generator
Generates an array of ExtJS dependencies in the right order. This library also checks if there's a cyclic dependency.
Installation
- Install ExtJS Dependencies Generator through npm:
npm install extjs-dependencies-generator
Usage
-
In your JavaScript program, declare the extjs-dependencies-generator library as a variable to gain access to it's generator function:
var gen = ; -
Call the generateDependencies function to generate ExtJS dependency list.
gen### generateDependencies (sourceDir: string, callback: function)
sourceDir
- The directory that contains all the ExtJS files.callback
- This is called after all the dependencies are determined. Returns a dependencies object that contains all the files sorted in the right order based on the dependency graph. Returns the object with the following properties:1. graph - the dependency graph. 2. dependencies - returns { classname, filename } 3. files - returns the object in the following format { pattern: filename }
Complete Example
This example shows you how to generate a list of dependencies in the right order and saves it to a file.
var beautify = js_beautify;var fs = ;var gen = ;var _ = ;var dir = 'test/src/**/*.js'; gen; { fs;}