This repository has been archived by the owner on Jun 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docs.html
213 lines (185 loc) · 5.99 KB
/
docs.html
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Pint</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/main.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js"></script>
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div id="sidebar" class="interface">
<a class="toc_title" href="#">
Pint.js <span class="version">(0.1.0)</span>
</a>
<ul class="toc_section">
<li>» <a href="https://github.com/baer/pint">GitHub Repository</a></li>
</ul>
<a class="toc_title" href="#">
Introduction
</a>
<a class="toc_title" href="#buildfile">
Buildfile
</a>
<ul class="toc_section">
<li>- <a href="#buildfile-jobs">jobs</a></li>
</ul>
<a class="toc_title" href="#jobs">
Jobs
</a>
<ul class="toc_section">
<li>- <a href="#name">name</a></li>
<li>- <a href="#dependsOn">dependsOn</a></li>
<li>- <a href="#build">build</a></li>
<li>- <a href="#config">config</a></li>
<li>- <a href="#initialize">initialize</a></li>
<li>- <a href="#finalize">finalize</a></li>
</ul>
</div>
<div class="container">
<div id="introduction">
<hgroup class="well">
<h1>Pint.js</h1>
<h4>
I'd really love a good <span class="beer"></span> right now...
</h4>
</hgroup>
</div>
<div id="documentation">
<h2 id="buildfile">Buildfile</h2>
<p id="buildfile-jobs">
<b class="header">jobs</b><code>buildfile.jobs</code>
<br />
Set the jobs to be run into the buildfile
</p>
<pre>
module.exports = {
jobs: [
require('./build/javascript.js'),
]
};</pre>
<h2 id="jobs">Jobs</h2>
<p id="name">
<b class="header">name</b><code>job.name</code>
<br />
Set the <b>name</b> property on a job. The name can be used to reference a job in dependency lists.
</p>
<pre>
module.exports = {
name: 'JavaScript'
};</pre>
<p id="dependsOn">
<b class="header">dependsOn</b><code>job.dependsOn</code>
<br />
Set an <b>array</b> of dependencies for a job. The job will not run until after the
dependencies are completed. This feature relies on dependencies being a
<a href="http://en.wikipedia.org/wiki/Directed_acyclic_graph">Directed Acyclic Graph</a>.
Circular dependencies are not checked for!
</p>
<pre>
// This job will not execute until both test and handlebars jobs are completed
module.exports = {
name: 'JavaScript',
dependsOn: [
'test',
'handlebars'
]
};</pre>
<p id="build">
<b class="header">build</b><code>job.build</code>
<br />
Set an <b>array</b> of <a href="http://gruntjs.com/">Grunt.js</a> tasks to execute during
the build phase. All tasks for a job are configured in the <a href="#config">job.config</a>
property.
</p>
<pre>
module.exports = {
name: 'Lint',
build: [
'jshint'
],
config: {
jshint: {
options: {
jshintrc : '.jshintrc',
ignores: ['./node_modules/**/*']
},
all: ['./**/*.js']
}
}
};</pre>
<p id="config">
<b class="header">config</b><code>job.config</code>
<br />
Set the configuration of <a href="http://gruntjs.com/">Grunt.js</a> tasks. Grunt.js is a
plugin based tool. The example below is based on <a href="https://github.com/gruntjs/grunt-contrib-jshint">jsHint</a>
Visit the individual plugin websites for more examples.
<p>
<i>
Note: You do not have to load tasks with<code>grunt.loadNpmTasks('task-name');</code>
This is done automatically based on the package.json file
</i>
</p>
</p>
<pre>
module.exports = {
name: 'Lint',
build: [
'jshint'
],
config: {
jshint: {
options: {
jshintrc : '.jshintrc',
ignores: ['./node_modules/**/*']
},
all: ['./**/*.js']
}
}
};</pre>
<p id="initialize">
<b class="header">initialize</b><code>job.initialize()</code>
<br />
Set a function to be executed immediately before the job
</p>
<pre>
module.exports = {
name: 'Lint',
initialize: function () {
console.log('I am an initializer')
}
};</pre>
<p id="finalize">
<b class="header">finalize</b><code>job.finalize()</code>
<br />
Set a function to be executed immediately after the job
</p>
<pre>
module.exports = {
name: 'Lint',
finalize: function () {
console.log('I am a finalizer')
}
};</pre>
</div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46908843-1', 'pintjs.com');
ga('send', 'pageview');
</script>
<script src="js/jquery-1.10.2.js"></script>
<script src="js/main.min.js"></script>
</body>
</html>