forked from SimenB/stylint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
29 lines (24 loc) · 823 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
'use strict'
// our stampit modules
var stampit = require( 'stampit' )
// let there be light ( * )
// basically, with stampit we take a bunch of different objects
// and methods and compose them into one mega object, the app
// appropriately namespaced, with methods on the prototype, and this set correctly
// basic app flow below
// init() -> read() -> parse() -> lint() -> done()
// init() -> watch() -> read() -> parse() -> lint() -> done()
var Stylint = function( path, config ) {
var Lint
Lint = stampit().compose(
require( './src/core/' ),
require( './src/checks/' ),
require( './src/state/' ),
stampit().enclose( function() {
this.state.path = path ? path : ''
this.customConfig = config ? config : false
} ).enclose( require( './src/core/init' ) )
)
return Lint
}
module.exports = Stylint