SPARK-1176 fable build output should go in ~/build/bla.
This commit is contained in:
1 parent
a9c3c41d6e
commit
65341ee35d
7 files changed
+86
-29
No files matched your search
+22
-6
@@ -1,6 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
OUT=../../../build/web/
|
||||
export OUT=${BUILD_DIR:-../../../build}/web
|
||||
MODE=manual
|
||||
case "$OUT" in
|
||||
*ninja_release*)
|
||||
MODE=release;;
|
||||
*ninja_debug*)
|
||||
MODE=debug;;
|
||||
esac
|
||||
echo MODE=$MODE
|
||||
echo OUT=$OUT
|
||||
|
||||
# clean
|
||||
rm -rf $OUT/api
|
||||
mkdir -p $OUT/api
|
||||
@@ -38,7 +48,7 @@ $PROTOC --plugin=protoc-gen-service=../../lib/api/service_compiler/plugin.py \
|
||||
|
||||
# run typescript compiler to convert typescript to javascript
|
||||
echo -e \* ${ORANGE} tsc ${NOCOLOR}
|
||||
npx --no-install tsc -p tsconfig.release.json
|
||||
npx --no-install tsc -p tsconfig.$MODE.json
|
||||
|
||||
# cleanup
|
||||
|
||||
@@ -57,11 +67,17 @@ ts2fable $OUT/api
|
||||
# ts2fable $OUT/api/gen
|
||||
|
||||
if [ "$FULL" == "1" ]; then
|
||||
echo \* fable
|
||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
echo -e \* ${ORANGE} fable ${NOCOLOR}
|
||||
cd ../ui/
|
||||
npm install
|
||||
cd src
|
||||
cp -r ../public/* ../$OUT/ui/
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 dotnet restore
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 dotnet fable webpack -- -p
|
||||
mkdir -p $OUT/ui/
|
||||
cp -r ../public/* $OUT/ui/
|
||||
dotnet restore
|
||||
if [ "$MODE" == "release" ]; then
|
||||
dotnet fable webpack -- --env.BUILD_PATH=$OUT -p
|
||||
else
|
||||
dotnet fable webpack -- --env.BUILD_PATH=$OUT
|
||||
fi
|
||||
fi
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "../../../build/ninja_debug/web/api",
|
||||
"removeComments": true,
|
||||
"paths": {
|
||||
"proto": ["../../../../build/ninja_debug/web/api/proto"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*.ts"
|
||||
]
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"allowJs": false,
|
||||
"alwaysStrict": true,
|
||||
"sourceMap": true,
|
||||
"sourceMap": false,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitReturns": true,
|
||||
"noUnusedLocals": false,
|
||||
@@ -18,10 +18,7 @@
|
||||
"noImplicitThis": false,
|
||||
"strictNullChecks": true,
|
||||
"declaration": true,
|
||||
"baseUrl": "src",
|
||||
"paths": {
|
||||
"proto": ["../../../../build/web/api/proto"]
|
||||
}
|
||||
"baseUrl": "src"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "../../../build/web/api",
|
||||
"sourceMap": true,
|
||||
"removeComments": false,
|
||||
"paths": {
|
||||
"proto": ["../../../../build/web/api/proto"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*.ts"
|
||||
]
|
||||
}
|
||||
@@ -2,8 +2,11 @@
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "../../../build/web/api",
|
||||
"removeComments": true
|
||||
"outDir": "../../../build/ninja_release/web/api",
|
||||
"removeComments": true,
|
||||
"paths": {
|
||||
"proto": ["../../../../build/ninja_release/web/api/proto"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*.ts"
|
||||
|
||||
+22
-10
@@ -2,20 +2,32 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(OUT)'==''">
|
||||
<PropertyGroup>
|
||||
<API>../../../../build/web/api</API>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<API>$(OUT)/api</API>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<ItemGroup>
|
||||
<Compile Include="../../../../build/web/api/ServiceContext.fs" />
|
||||
<Compile Include="../../../../build/web/api/DynamicService.fs" />
|
||||
<Compile Include="$(API)/ServiceContext.fs" />
|
||||
<Compile Include="$(API)/DynamicService.fs" />
|
||||
<Compile Include="Imports.fs" />
|
||||
<Compile Include="Util/JSMap.fs" />
|
||||
<Compile Include="Util/EnumUtils.fs" />
|
||||
<Compile Include="../../../../build/web/api/fable/timestamp.fable.fs" />
|
||||
<Compile Include="../../../../build/web/api/fable/apicore.fable.fs" />
|
||||
<Compile Include="../../../../build/web/api/fable/apioptions.fable.fs" />
|
||||
<Compile Include="../../../../build/web/api/fable/Security.fable.fs" />
|
||||
<Compile Include="../../../../build/web/api/fable/SparkProtos.fable.fs" />
|
||||
<Compile Include="../../../../build/web/api/fable/HelloService.fable.fs" />
|
||||
<Compile Include="../../../../build/web/api/fable/OrderService.fable.fs" />
|
||||
<Compile Include="../../../../build/web/api/fable/AdminService.fable.fs" />
|
||||
<Compile Include="$(API)/fable/timestamp.fable.fs" />
|
||||
<Compile Include="$(API)/fable/apicore.fable.fs" />
|
||||
<Compile Include="$(API)/fable/apioptions.fable.fs" />
|
||||
<Compile Include="$(API)/fable/Security.fable.fs" />
|
||||
<Compile Include="$(API)/fable/SparkProtos.fable.fs" />
|
||||
<Compile Include="$(API)/fable/HelloService.fable.fs" />
|
||||
<Compile Include="$(API)/fable/OrderService.fable.fs" />
|
||||
<Compile Include="$(API)/fable/AdminService.fable.fs" />
|
||||
<!-- Global to the app -->
|
||||
<Compile Include="Lens.fs" />
|
||||
<Compile Include="Global.fs" />
|
||||
|
||||
@@ -21,11 +21,11 @@ var babelOptions = fableUtils.resolveBabelOptions({
|
||||
var isProduction = process.argv.indexOf("-p") >= 0;
|
||||
console.log("Bundling for " + (isProduction ? "production" : "development") + "...");
|
||||
|
||||
const build_path = "../../../build/";
|
||||
const output_path = resolve(build_path + "web/ui/");
|
||||
const api_path = resolve(build_path + "web/api/");
|
||||
|
||||
module.exports = {
|
||||
module.exports = env => {
|
||||
const build_path = env.BUILD_PATH || resolve("../../../build/web")
|
||||
const output_path = build_path + "/ui/";
|
||||
const api_path = build_path + "/api/";
|
||||
return {
|
||||
devtool: isProduction ? undefined : "source-map",
|
||||
entry: resolve('./src/ui.fsproj'),
|
||||
output: {
|
||||
@@ -77,4 +77,4 @@ module.exports = {
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.NamedModulesPlugin()
|
||||
]
|
||||
};
|
||||
}};
|
||||
Reference in new issue
Block a user