You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
986 B
JavaScript

3 years ago
#!/usr/bin/env node
4 years ago
"use strict";
const Promise = require("bluebird");
const budoExpress = require("budo-express");
const path = require("path");
return Promise.try(() => {
return require("../src/app");
}).then((app) => {
budoExpress({
// port: 3000,
// port: 3100,
port: 3500,
allowUnsafeHost: true,
expressApp: app,
basePath: path.join(__dirname, ".."),
entryFiles: "src/frontend/index.jsx",
staticPath: "public",
bundlePath: "js/bundle.js",
livereloadPattern: "**/*.{css,html,js}",
browserify: {
extensions: [".jsx"],
plugin: [
[ "icssify", {
before: [
// require('postcss-import')(),
require('postcss-mixins')(),
require("postcss-nested")(),
require('postcss-simple-vars')(),
require('postcss-color-function')(),
require('autoprefixer')()
]
}] // FIXME: css-extract
],
transform: [
["babelify", {
presets: ["@babel/preset-env", "@babel/preset-react"],
}],
]
}
});
});