-
Notifications
You must be signed in to change notification settings - Fork 1
/
pantofile.js
48 lines (44 loc) · 1.08 KB
/
pantofile.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* Copyright (C) 2016 yanni4night.com
* pantofile.js
*
* changelog
* 2016-09-07[20:52:18]:revised
*
* @author [email protected]
* @version 0.1.0
* @since 0.1.0
*/
'use strict';
module.exports = panto => {
require('load-panto-transformers')(panto);
require('time-panto')(panto);
panto.setOptions({
cwd: __dirname,
src: '.',
output: 'dist'
});
panto.$('src/**/*.{js,jsx}').tag('JSX').read().babel({
extend: '.babelrc',
isSlient: false
}).browserify({
entry: 'src/index.jsx',
bundle: 'bundle.js',
process: {
env: {
NODE_ENV: 'production'
}
},
aliases: {
"react": "preact-compat",
"react-dom": "preact-compat"
}
}).write();
panto.$('src/*.html').tag('HTML').copy({flatten: true});
panto.$('node_modules/normalize.css/normalize.css', true).tag('NORMALIZE').copy({
flatten: true
});
panto.$('src/index.sass').tag('SASS').read().sass().write({
destname: 'index.css'
});
};