Skip to content

Commit 905b76f

Browse files
committed
first commit
0 parents  commit 905b76f

12 files changed

Lines changed: 183 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea
2+
node_modules
3+
.project
4+
out

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
(The MIT License)
2+
3+
Copyright (c) 2014-2016 Kalle Saas <kalle@easypep.de>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
'Software'), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# [gulp](https://github.com/wearefractal/gulp)-ect
2+
3+
> Gulp plugin to compile ect.js template engine
4+
5+
## Install
6+
7+
Install with [npm](https://www.npmjs.org/package/npm)
8+
9+
```
10+
npm install --save-dev gulp-ect-compile
11+
```
12+
13+
14+
## Example
15+
16+
js
17+
```js
18+
var gulp = require('gulp');
19+
var gutil = require('gulp-util');
20+
var ectCompiler = require('gulp-ect-compile');
21+
22+
gulp.task('ect-compile', function () {
23+
gulp.src(['./src/**/*'])
24+
.pipe(ectCompiler({}, {}))
25+
.pipe(gulp.dest('./out'));
26+
});
27+
28+
gulp.task('default', ['ect-compile']);
29+
```
30+
31+
32+
## API
33+
34+
### ectCompiler(options, ectOptions)
35+
36+
See ect-repository for available [options](https://github.com/baryshev/ect#options)
37+
38+
## License
39+
40+
[MIT](https://github.com/easyPEP/gulp-ect-compile/blob/master/LICENSE) © Kalle Saas <kalle@easypep.de>

example/gulpfile.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var gulp = require('gulp');
2+
var gutil = require('gulp-util');
3+
var ectCompiler = require('../');
4+
5+
gulp.task('ect-compile', function () {
6+
gulp.src(['./src/**/*'])
7+
.pipe(ectCompiler())
8+
.pipe(gulp.dest('./out'));
9+
});
10+
11+
gulp.task('default', ['ect-compile']);

example/src/blog.ect

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<% extend 'layout/index' %>
2+
<% include 'include/menu' %>
3+
4+
<h2>File blog.ect</h2>
5+
6+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>

example/src/contact.ect

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<% extend 'layout/index' %>
2+
<% include 'include/menu' %>
3+
4+
<h2>File contact.ect</h2>
5+
6+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>

example/src/include/menu.ect

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<br>
2+
<nav class="navbar navbar-inverse">
3+
<div class="navbar-header">
4+
<a class="navbar-brand" href="https://github.com/easyPEP/gulp-ect-compiler">gulp-ect</a>
5+
</div>
6+
7+
<div class="collapse navbar-collapse">
8+
<ul class="nav navbar-nav">
9+
<li><a href="index.html">Index</a></li>
10+
<li><a href="blog.html">Blog</a></li>
11+
<li><a href="contact.html">Contact</a></li>
12+
</ul>
13+
</div>
14+
</nav>

example/src/index.ect

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<% extend 'layout/index' %>
2+
<% include 'include/menu' %>
3+
4+
<h2>File index.ect <%- @foo %></h2>
5+
6+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>

example/src/layout/index.ect

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title</title>
6+
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
7+
</head>
8+
<body>
9+
<div class="container">
10+
<% content %>
11+
</div>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)