-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.next.coffee
99 lines (85 loc) · 2 KB
/
app.next.coffee
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
RootsUtil = require 'roots-util'
js_pipeline = require 'js-pipeline'
css_pipeline = require 'css-pipeline'
dynamic_content = require 'dynamic-content'
browserify = require 'roots-browserify'
image_pipeline = require 'roots-image-pipeline'
statica = require 'statica'
autoprefixer = require 'autoprefixer'
jade = require 'jade'
fs = require 'fs'
marked = require 'marked'
moment = require 'moment'
marked.setOptions
gfm: true
tables: true
breaks: true
pedantic: false
sanitize: true
smartLists: true
smartypants: true
module.exports =
ignores: [
'readme.md'
'**/layout.*'
'**/_*/*'
'**/_*/**/*'
'**/_*'
'.gitignore'
'**/drafts/**/*'
'ship.*conf'
'.travis.yml'
'yarn.lock'
'.sass-lint.yml'
'coffeelint.json'
'Gemfile'
'Gemfile.lock'
'vendor/**/*'
'.bundle/**/*'
]
browser:
open: false
before: (roots) ->
helpers = new RootsUtil.Helpers
helpers.project.remove_folders(roots.config.output)
extensions: [
image_pipeline(
files: 'assets/img/**'
compress: true
resize: true
output_webp: true
)
css_pipeline(files: 'assets/css/main.sass', postcss: true)
dynamic_content(
write: 'docs.json'
)
statica()
browserify(
files: 'assets/js/main.coffee'
out: 'js/main.js'
minify: true
sourceMap: true
)
]
scss:
sourcemap: true
minify: true
indentedSyntax: true
postcss:
use: [autoprefixer(browsers: ['last 3 versions'])]
'coffee-script':
sourcemap: true
locals:
render: fs.readFileSync
md: marked
icon: (name) ->
fs.readFileSync "#{__dirname}/views/icons/_#{name}.svg"
date: (date = null) ->
if not date?
return moment()
moment date, 'YYYY-MM-DD hh:mm:ss'
sort: (posts) -> posts.sort (a, b) -> a.seq - b.seq
jade:
baseDomain: 'https://next.zulu.molovo.co'
pretty: true
basedir: "#{__dirname}/views"