forked from SiTLar/pyt-vanilla-html
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
74 lines (71 loc) · 1.93 KB
/
config.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
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
var process = require("process");
var webpack = require("webpack");
var request = require("then-request");
var fs = require("fs");
var Promise = require("promise");
var write = Promise.denodeify(fs.writeFile);
var MiniCssExtractPlugin = require("mini-css-extract-plugin");
var WebpackBeforeBuildPlugin = require('before-build-webpack');
var build = process.env["___BUILD___"] || "unstable";
build = "\"" + build + "\"";
// "https://cdn.rawgit.com/FortAwesome/Font-Awesome/blob/master/src/icons.yml";
module.exports = {
"target":"web"
,"mode": "none"
,performance: { hints: false }
,"entry":{
"vanilla":"./browser.js"
,"expanded":"./expandedcss.js"
,"compact":"./compactcss.js"
}
,"output":{
"publicPath": "./"
,"path": __dirname
,"filename":"[name].js"
}
,"plugins":[
new webpack.DefinePlugin({
"___BUILD___":build
})
,new MiniCssExtractPlugin({"filename":"[name].css"})
,new WebpackBeforeBuildPlugin(function(compiler, callback) {
var icons = request("GET", "https://cdn.rawgit.com/FortAwesome/Font-Awesome/4722e3ea/src/icons.yml").then(function(res){
return write("icons.yml", res.getBody(), "utf8");
}).then(()=>{console.log("icos")});
var tlds = require("./loadtlds").then(()=>{console.log("tlds")});
Promise.all([tlds, icons]).then(()=>{console.log("success"); callback();});
}
/* , ['run', 'watch-run', 'done']*/
)
]
,"module": {
"rules": [
/* {
"test": /\.json$/
,"use":[ {"loader": "compact-json-loader"}]
},*/{
"test": /\.css$/
,"use":[ { "loader": MiniCssExtractPlugin.loader}
,{ "loader": "css-loader"}
/*,{ "loader": "postcss-loader"
, "options": { parser: 'sugarss',
plugins: {
'postcss-import': {},
'postcss-preset-env': {},
'cssnano': {}
}
}
}*/
]
},{
test: /\.yml$/
,use: 'yml-loader'
}
]
}
/*
,"postcss": function () {
return [require('autoprefixer'), require('precss')];
}
*/
};