GithubHelp home page GithubHelp logo

safe-stack / safe-template Goto Github PK

View Code? Open in Web Editor NEW
283.0 18.0 88.0 3.78 MB

dotnet CLI template for SAFE project

License: MIT License

F# 89.82% HTML 3.79% JavaScript 1.03% CSS 0.20% TypeScript 5.15%

safe-template's Introduction

safe-template's People

Contributors

0x53a avatar akoslukacs avatar callumvass avatar dbrattli avatar dedale avatar dependabot[bot] avatar forki avatar hede avatar isaacabraham avatar jwthomson avatar kerams avatar krzysztof-cieslak avatar larocceau avatar linitachi avatar martinbryant avatar mattgallagher92 avatar matthid avatar mvsmal avatar nojaf avatar olivercoad avatar psfinaki avatar ricosaupe avatar rmunn avatar scullman avatar theimowski avatar theprash avatar tom-sloboda avatar vasily-kirichenko avatar walternative avatar zaid-ajaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

safe-template's Issues

Add Elmish.Browser to basic set of deps

Should we add Fable.Elmish.Browser to paket.dependencies for the client? Even if it's not necessarily used in the basic template code, at least it's there for when people inevitably want to start using it.

I know that this is a bit of a slippery slope - we need to be careful of not adding the whole world to the template etc., but perhaps this one is worthwhile?

Build Error for App.js

Hi,

I just tried the template (on Windows).
Steps to reproduce:

mkdir safeTest1
cd safeTest1
dotnet new -i SAFE.Template
dotnet new SAFE
build.cmd

Then I get the following error while compiling the App.js file:

C:\Users\brase\AppData\Local\dotnetcore\dotnet.exe fable webpack -- -p
Fable (1.2.4) daemon started on port 61225
CWD: C:\Users\brase\code\fs\safeTest\src\Client
cmd /C node "C:\Users\brase\code\fs\safeTest\node_modules\webpack\bin\webpack.js" -p
Bundling for production...
Parsing ./Client.fsproj...
fable: Compiled Client.fsproj
ERROR: Method not found: 'Void Fable.AST.Fable.File..ctor(System.String, Fable.AST.Fable.Entity, Microsoft.FSharp.Collections.FSharpList`1<Fable.AST.Fable.Declaration>, Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Collections.FSharpSet`1<System.String>>)'.
   at Fable.FSharp2Fable.Compiler.transformFile(ICompiler com, ICompilerState state, FSharpCheckProjectResults checkedProject, String fileName)
   at Fable.CLI.StateUtil.compile(Compiler com, Project project, String filePath)
   at [email protected](Unit unitVar)
   at [email protected](AsyncParams`1 args)
Hash: 001ce6c433228fac9f24
Version: webpack 3.7.1
Time: 10901ms
        Asset     Size  Chunks             Chunk Names
    bundle.js  1.15 kB       0  [emitted]  main
bundle.js.map  7.31 kB       0  [emitted]  main
   [0] ./Client.fsproj 25 bytes {0} [built]
   [1] ./App.fs 454 bytes {0} [built] [failed] [1 error]

ERROR in ./App.fs
Module build failed: Error: Method not found: 'Void Fable.AST.Fable.File..ctor(System.String, Fable.AST.Fable.Entity, Microsoft.FSharp.Collections.FSharpList`1<Fable.AST.Fable.Declaration>, Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Collections.FSharpSet`1<System.String>>)'.
    at Loader.fableUtils.client.send.then.r (C:\Users\brase\code\fs\safeTest\node_modules\fable-loader\index.js:67:22)
    at <anonymous>
 @ ./Client.fsproj 1:0-25
Closing Fable daemon...
Running build failed.
Error:
System.Exception: 'C:\Users\brase\AppData\Local\dotnetcore\dotnet.exe fable webpack -- -p' failed
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1379.Invoke(String message)
   at FSI_0005.Build.run(String cmd, String args, String workingDir) in C:\Users\brase\code\fs\safeTest\build.fsx:line 28
   at [email protected](Unit unitVar0) in C:\Users\brase\code\fs\safeTest\build.fsx:line 46
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\FAKE\src\app\FakeLib\TargetHelper.fs:line 626

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target              Duration
------              --------
Clean               00:00:00.0002597
InstallDotNetCore   00:00:42.1954222
InstallClient       00:00:17.3826909
Build               Failure
Total:              00:01:20.4162254
---------------------------------------------------------------------
Status:             Failure
---------------------------------------------------------------------
---------------------------------------------------------------------
  1) System.Exception: 'C:\Users\brase\AppData\Local\dotnetcore\dotnet.exe fable webpack -- -p' failed
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1379.Invoke(String message)
   at FSI_0005.Build.run(String cmd, String args, String workingDir) in C:\Users\brase\code\fs\safeTest\build.fsx:line 28
   at [email protected](Unit unitVar0) in C:\Users\brase\code\fs\safeTest\build.fsx:line 46
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\FAKE\src\app\FakeLib\TargetHelper.fs:line 626
---------------------------------------------------------------------

I am using the following dotnet version:

▶ dotnet --version
2.1.1-preview-007165
~\code\fs\safeTest                
▶ dotnet --info
.NET Command Line Tools (2.1.1-preview-007165)

Product Information:
 Version:            2.1.1-preview-007165
 Commit SHA-1 hash:  a4d1a8e0bb

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.1-preview-007165\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.3
  Build    : a9190d4a75f4a982ae4b4fa8d1a24526566c69df

[NRE] It happens with Giraffe and NPM template

NRE happens here:

 task {
        let! counter = getInitCounter()
        >>> return! Successful.OK counter next ctx
    }

here's some stacktrace:

Exception has occurred: CLR/System.NullReferenceException
Exception thrown: 'System.NullReferenceException' in FSharp.Core.dll: 'Object reference not set to an instance of an object.'
   at Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions.UnboxGeneric[T](Object source)
   at Giraffe.Negotiation.HttpContext.NegotiateAsync(HttpContext this, Object responseObj)

nre-fsharp-safe-template

Create a 1.0 milestone

We should look to target a 1.0 release of the template as soon as possible. What is outstanding in order to do that? Any blockers? Are there any specific features that are missing that we need to add?

Update webpack and add webpack-cli

The CLI moved into a separate package: webpack-cli.
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-cli -D

Error on first time build of project

Steps

dotnet new -i SAFE.Template
dotnet new SAFE -n SafeApp -o SafeApp -lang F#
cd SafeApp
.\build

Gave me:

image

Simple fix was to add module Client to Code.fs, I'll submit a PR for this

Errors on new project

OS: MacOS 10.13
Dotnet Version: 2.1.4
Latest Ionide plugins installed
Command run to scaffold: dotnet new SAFE -lang F\# --Fulma admin --Remoting --Deploy azure

Errors on ./build.sh run:

src/Server/Server.fs(29,30): error FS0039: The type 'IServiceCollection' is not defined. [src/Server/Server.fsproj]
src/Server/Server.fs(31,17): error FS0072: Lookup onobject of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. [src/Server/Server.fsproj]

The build failed. Please fix the build errors and run again.
watch : Exited with error code 1

image

Specifics for each squiggly in that screenshot:

Line 23:

The record label 'getInitCounter' is not defined.
val getInitCounter: 
   : unit 
   -> Task<Counter>
Full name: Server.getInitCounter
Assembly: Server

Line 25:

The value, namespace, type or module 'Route' is not defined. Maybe you want one of the following:
   route
   Router
   routef
   routex
   routeCi

Line 29:

The type 'IServiceCollection' is not defined.

Line 31:

Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved.

Server.fs/Client.fs cannot resolve dependencies after a fresh install

I'm new to F# and .net core so this might not be a real issue. When I installed the template and scaffolded out a project, all I could see is red underlines in any file I open. Although, the project runs just fine with ./build.sh run. I'm on Ubuntu. Have a look at the screenshot -

screenshot from 2018-04-23 20-07-41

Add support for Fable JSON serialization

I think that if using either Giraffe or Saturn, the templates should include the Fable.Json package and have them auto-configured as part of the template.

Happy to help with this if you agree that this is worth doing!

Carriage Return at build.sh

The file build.sh has the character '\r'. It doesn't work on my Ubuntu 16.04.
I needed to use this command:
tr -d '\r' < infile > outfile

Template doesn't work ootb

  1. dotnet new -i SAFE.Template
  2. dotnet new SAFE
  3. build.cmd

no restore because the cache file lies in paket-files

Workaround

nuking paket-files

/cc @sjuberman

Error : Processing post-creation actions... The system cannot find the file specified

When executing in PowerShell on Windows 10, in the post-creation actions I receive the error : The system cannot find the file specified.
In the template.json, there is the following in the postActions section:

"condition": "(OS != \"windows\")",

The only reference I've found to checking OS versions is dotnet/templating which has:

"condition": "(OperatingSystemKind == \"Linux\")"

Not sure if the condition is not firing, and allowing the action to try and run the chmod action

Happy to do a PR with some clarification if I've misunderstood what's going on here

More beautiful styling

I'm sorry, but this is just too simple and ugly to catch attention:

image

Maybe adding Fulma by default can help?

Have an option to be able to generate just the client side of the stack

It would be really nice to have an option in the template to just generate the client side or the server side.

Typically this issue arises when we have an existing or external API and we are building a mashup, of several data sources.

I realize I could just use the fable template and reference the Elmish,Fulma libs etc. If that ends up being the best place to maybe do that then that is fine, but this feels the most natural place to do it. Even if it is a slight departure from SAFE being an end-to-end stack.

What do you think?

include release and deployment options from BookStore

I chose a snapshot of the BookStore sample over the CLI template because of the extended support for tests, release and deployment.

It would be very nice if those options were available with the template and it would be the cleanest way to fire up new projects

Include paket.lock file?

Given that we're now including a yarn.lock file, shouldn't we do the same with paket.lock? Not only will this increase the speed for the first build (important IMHO), but will also allow us to ensure stable releases.

use babel-preset-react

we should use "babel-preset-react": "^6.24.1"` in package.json

and change the webpack.config.js to:

var babelOptions = fableUtils.resolveBabelOptions({
  presets: [
    "stage-0",
    [ "env", {
      "targets": {
        "browsers": ["last 2 versions"]
      },
      "modules": false
    }],
    "react"
  ],
  plugins: [
      "transform-runtime",
      "transform-object-rest-spread",
      "transform-class-properties"]
});

Add ARM template and routine for Azure deployment

We should add the capability to easily deploy to Azure using one of either git-based deployments (perfect for quickly getting results, but not necessarily the best for a production CI system), or Kudu's zip deploy feature.

Also we should include an ARM template to allow users to quickly create the resources required in Azure.

One thing that will need to be done as part of this is consider how and where the app locates the static content - currently it's designed to look in the ..\client folder etc. but this should probably be replaced by the app copying the js bundle and html files into the public folder on the server.

"build.cmd run" server watch issue

Some strange behaviour with "build.cmd run" for server side.
The script's 'run dotnetCli "watch run" serverPath' for some strange reason executes "watch" but not "run" - server doesn't start.
The same time "cd .\src\Server" + "dotnet watch run" = works as expected.
Bookstore doesn't have this issue, so it's template specific (but it does the command slightly differently so)

unable to download dotnet sdk

If i follow the steps here
https://safe-stack.github.io/docs/quickstart/

It seems to give an error on the following step
Downloading 'https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.3/dotnet-dev-win-x64.2.1.3.zip' to ...

The error message i see is
Running build failed.
Error:
ICSharpCode.SharpZipLib.Zip.ZipException: Cannot find central directory
at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries()
at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor(String name)
at Fake.ZipHelper.Unzip(String target, String fileName) in D:\code\fake\src\app\FakeLib\ZipHelper.fs:line 89
at Fake.DotNetCli.InstallDotNetSDK(String sdkVersion) in D:\code\fake\src\app\FakeLib\DotNetCLIHelper.fs:line 561
at [email protected](Unit _arg2)
at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626

This seems to be because the file seems to be gone from azureedge.

I'm unsure how to edit my source/template to point to a valid file

build.cmd fails

Performance:
 - Disk IO: 18 milliseconds
 - Runtime: 1 second
Building project with version: LocalBuild
Shortened DependencyGraph for Target Build:
<== Build
   <== InstallClient
      <== InstallDotNetCore
         <== Clean

The running order is:
  - Clean
  - InstallDotNetCore
  - InstallClient
  - Build
Running build with 1 worker
Starting Target: Clean
Deleting contents of C:\Users\vaskir\git\Safe1\deploy
Finished Target: Clean
Starting Target: InstallDotNetCore (==> Clean)
dotnet --info
C:\Users\vaskir\AppData\Local\dotnetcore\dotnet.exe --info
C:\Users\vaskir\AppData\Local\dotnetcore\dotnet.exe --version
Deleting contents of C:\Users\vaskir\AppData\Local\dotnetcore
Downloading 'https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.105/dotnet-dev-win-x64.2.1.105.zip' to 'C:\Users\vaskir\AppData\Local\Temp\dotnet-dev-win-x64.2.1.105.zip'
Running build failed.
Error:
ICSharpCode.SharpZipLib.Zip.ZipException: Cannot find central directory
   at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries()
   at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor(String name)
   at Fake.ZipHelper.Unzip(String target, String fileName) in D:\code\fake\src\app\FakeLib\ZipHelper.fs:line 89
   at Fake.DotNetCli.InstallDotNetSDK(String sdkVersion) in D:\code\fake\src\app\FakeLib\DotNetCLIHelper.fs:line 567
   at [email protected](Unit _arg2) in C:\Users\vaskir\git\Safe1\build.fsx:line 32
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target              Duration
------              --------
Clean               00:00:00.0023418
InstallDotNetCore   Failure
Total:              00:00:01.2442080
---------------------------------------------------------------------
Status:             Failure
---------------------------------------------------------------------
---------------------------------------------------------------------
  1) ICSharpCode.SharpZipLib.Zip.ZipException: Cannot find central directory
   at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries()
   at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor(String name)
   at Fake.ZipHelper.Unzip(String target, String fileName) in D:\code\fake\src\app\FakeLib\ZipHelper.fs:line 89
   at Fake.DotNetCli.InstallDotNetSDK(String sdkVersion) in D:\code\fake\src\app\FakeLib\DotNetCLIHelper.fs:line 567
   at [email protected](Unit _arg2) in C:\Users\vaskir\git\Safe1\build.fsx:line 32
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626
---------------------------------------------------------------------

"dotnet new SAFE" just shows the help options

Hello, I was just trying to use this template but attempting to create a project just show me the help options:


PS D:\Projects\SAFE> dotnet new SAFE
Usage: new [options]

Options:
  -h, --help          Displays help for this command.
  -l, --list          Lists templates containing the specified name. If no name is specified, lists all templates.
  -n, --name          The name for the output being created. If no name is specified, the name of the current directory is used.
  -o, --output        Location to place the generated output.
  -i, --install       Installs a source or a template pack.
  -u, --uninstall     Uninstalls a source or a template pack.
  --type              Filters templates based on available types. Predefined values are "project", "item" or "other".
  --force             Forces content to be generated even if it would change existing files.
  -lang, --language   Specifies the language of the template to create.


SAFE-Stack Web App v0.5.1 (F#)
Author: Tomasz Heimowski
Options:                                                                                                                
  -S|--Server                                                                                                           
                     suave      - lightweight, non-blocking web server (standalone)                                     
                     giraffe    - a functional micro web framework based on ASP.NET Core                                
                 Default: suave                                                                                         

  -F|--Fulma                                                                                                            
                     none       - don't add Fulma (Fable bindings for Bulma.io) at all                                  
                     basic      - adds Fulma basic template                                                             
                     hero       - adds Fulma with 'Hero' Bulma template from https://dansup.github.io/bulma-templates/  
                     landing    - adds Fulma with 'Landing' Bulma template from https://dansup.github.io/bulma-templates/
                 Default: none                                                                                          

  -R|--Remoting  adds Fable.Remoting to server and client                                                               
                 bool - Optional                                                                                        
                 Default: false                                                                                         


PS D:\Projects\SAFE>

Support for App Insights

We should have automatic support for Application Insights in the Azure version of the template. We can get this working for both Suave and Giraffe.

Build script may not work out of the box because of the Github crypto policy changes

Git has just changed something in their cryptographic standards policy. Because of that Paket may not automatically download. Consequently, the whole build.sh/build.cmd will fail right in the beginning (this was my case).

The simple workaround fixed the whole thing. Nevertheless I believe some of the SAFE investigators can get repelled not seeing stuff automagically running.

I propose some note about this in the docs until the issue there is resolved in some proper way.

Suave's `path` gets overriden by example code

There's this novice-unfriendly annoyance. The path definition in Server/Program.fs

let path = Path.Combine("..","Client") |> Path.GetFullPath

covers Suave's own path function, so trying to do something like choose [ (path "/") >=> OK "Hi" ] won't work because by then path is a string rather than function (causing excessive head scratching and wondering why Suave example code just won't work).

include several CSS frameworks with themability and webpack workflow

another nice feature would be the ability to choose between several CSS Frameworks at startup and in a variant that allows for custom themes with SASS or LESS out of the box by setting up webpack.config.js
accordingly

The ones to go for in my opinion are:

  • Bulma : thats already included with Fulma so 👍
  • Semantic UI : setup with webpack sucks, but when its done it's a breeze to work with, especially as a non-designer + themes feature is really superior with respect to others
  • Bootstrap : the most prominent
  • MaterializeCSS : for going with idiomatic material design
  • UI Kit : another very clean, minimalistic and good-looking alternative

I do not know how to do templates for dotnet t this point, but if this stuff is desired by some of you I might give it a go.

The first step could be the integration of custom themes for Bulma, since it is already present in the template.

Keeps reinstalling dotnet

Although I already have latest dotnet sdk installed, running build Run cleans some stuff and then reinstalls dotnet again -- see Deleting contents of C:\Users\peter_000\AppData\Local\dotnetcore down below.

:\> build Run
Paket version 5.125.3
Performance:
- Runtime: 1 second
Building project with version: LocalBuild
Shortened DependencyGraph for Target Run:
<== Run
<== RestoreServer
    <== InstallClient
        <== InstallDotNetCore
            <== Clean

The running order is:
- Clean
- InstallDotNetCore
- InstallClient
- RestoreServer
- Run
Running build with 1 worker
Starting Target: Clean
Finished Target: Clean
Starting Target: InstallDotNetCore (==> Clean)
dotnet --version
C:\Users\peter_000\AppData\Local\dotnetcore\dotnet.exe --version
Deleting contents of C:\Users\peter_000\AppData\Local\dotnetcore
Installing 'https://dotnetcli.azureedge.net/dotnet/Sdk/2.0.3/dotnet-dev-win-x64.2.0.3.zip' to 'C:\Users\peter_000\AppData\Local\Temp\dotnet-dev-win-x64.2.0.3.zip'
Installing 'https://dotnetcli.blob.core.windows.net/dotnet/Sdk/2.0.3/dotnet-sdk-2.0.3-win-x64.zip' to 'C:\Users\peter_000\AppData\Local\Temp\dotnet-sdk-2.0.3-win-x64.zip'

build.sh fails on MacOS

$ ./build.sh 
Executing Paket...
paket.lock was not found, installing packages...
Resolving packages for group Build:
 - FAKE 4.64.13
Resolving packages for group Client:
 - Fable.Core 1.3.12
 - Fable.Elmish.Debugger 1.0.1
 - Fable.Elmish.React 1.0.3
 - Fable.Elmish.HMR 1.0.0
 - dotnet-fable 1.3.15
 - FSharp.Core 4.3.4
 - Microsoft.NETCore.App 2.0.7
 - Fable.React 3.1.2
 - NETStandard.Library 2.0.2
 - Fable.Compiler 1.3.15
 - Fable.PowerPack 1.4.0
 - Fable.Elmish 1.0.2
 - Dotnet.ProjInfo 0.9.0
 - FSharp.Compiler.Service 22.0.3
 - Newtonsoft.Json 11.0.2
 - System.Net.Http 4.3.3
 - System.Runtime.Loader 4.3.0
 - Microsoft.Win32.Primitives 4.3.0
 - System.AppContext 4.3.0
 - System.Collections 4.3.0
 - System.Collections.Concurrent 4.3.0
 - System.Console 4.3.1
 - System.Diagnostics.Debug 4.3.0
 - System.Diagnostics.Tools 4.3.0
 - System.Diagnostics.Tracing 4.3.0
 - System.Globalization 4.3.0
 - System.Globalization.Calendars 4.3.0
 - System.IO 4.3.0
 - System.IO.Compression 4.3.0
 - System.IO.Compression.ZipFile 4.3.0
 - System.IO.FileSystem 4.3.0
 - System.IO.FileSystem.Primitives 4.3.0
 - System.Linq 4.3.0
 - System.Linq.Expressions 4.3.0
 - System.Net.Primitives 4.3.0
 - System.Net.Sockets 4.3.0
 - System.ObjectModel 4.3.0
Trial1 (NuGet.GetVersions) did not yield any results, trying again.
   https://api.nuget.org/v3-flatcontainer/system.reflection/index.json?semVerLevel=2.0.0
Performance:
 - Resolver: 1 minute (2 runs)
    - Runtime: 1 second
    - Blocked (retrieving package versions): 57 seconds (9 times)
    - Blocked (retrieving package details): 2 seconds (32 times)
    - Not Blocked (retrieving package versions): 30 times
    - Not Blocked (retrieving package details): 6 times
 - Average Request Time: 717 milliseconds
 - Number of Requests: 84
 - Runtime: 1 minute
Paket failed with
-> Unable to retrieve package versions for 'System.Reflection'
   -- CLOSED --
      Fable.Core  (from /Users/vaskir/git/Safe1/paket.dependencies)
      Fable.Elmish.Debugger  (from /Users/vaskir/git/Safe1/paket.dependencies)
      Fable.Elmish.React  (from /Users/vaskir/git/Safe1/paket.dependencies)
      Fable.Elmish.HMR  (from /Users/vaskir/git/Safe1/paket.dependencies)
      dotnet-fable  (from /Users/vaskir/git/Safe1/paket.dependencies)
      FSharp.Core >= 4.2.3 (from dotnet-fable 1.3.15)
      FSharp.Core >= 4.2.3 (from Fable.Core 1.3.12)
      Microsoft.NETCore.App >= 2.0 (from dotnet-fable 1.3.15)
      Fable.React >= 2.0 (from Fable.Elmish.React 1.0.3)
      NETStandard.Library >= 1.6.1 (from Fable.Core 1.3.12)
      Fable.Compiler >= 1.3.15 (from dotnet-fable 1.3.15)
      Fable.Core >= 1.3.12 (from dotnet-fable 1.3.15)
      Fable.PowerPack >= 1.3.2 (from Fable.Elmish.React 1.0.3)
      Fable.Elmish >= 1.0.1 (from Fable.Elmish.React 1.0.3)
      Dotnet.ProjInfo >= 0.9 (from dotnet-fable 1.3.15)
      FSharp.Compiler.Service >= 20.0.1 (from Fable.Compiler 1.3.15)
      Newtonsoft.Json >= 11.0.1 (from Fable.Compiler 1.3.15)
      FSharp.Core >= 4.3.2 (from Fable.Elmish 1.0.2)
      System.Net.Http >= 4.3.2 (from NETStandard.Library 2.0.2)
      System.Runtime.Loader >= 4.3 (from Fable.Compiler 1.3.15)
      Microsoft.Win32.Primitives >= 4.3 (from NETStandard.Library 2.0.2)
      System.AppContext >= 4.3 (from NETStandard.Library 2.0.2)
      System.Collections >= 4.3 (from NETStandard.Library 2.0.2)
      System.Collections.Concurrent >= 4.3 (from NETStandard.Library 2.0.2)
      System.Console >= 4.3 (from NETStandard.Library 2.0.2)
      System.Diagnostics.Debug >= 4.3 (from NETStandard.Library 2.0.2)
      System.Diagnostics.Tools >= 4.3 (from NETStandard.Library 2.0.2)
      System.Diagnostics.Tracing >= 4.3 (from NETStandard.Library 2.0.2)
      System.Globalization >= 4.3 (from NETStandard.Library 2.0.2)
      System.Globalization.Calendars >= 4.3 (from NETStandard.Library 2.0.2)
      System.IO >= 4.3 (from NETStandard.Library 2.0.2)
      System.IO.Compression >= 4.3 (from NETStandard.Library 2.0.2)
      System.IO.Compression.ZipFile >= 4.3 (from NETStandard.Library 2.0.2)
      System.IO.FileSystem >= 4.3 (from NETStandard.Library 2.0.2)
      System.IO.FileSystem.Primitives >= 4.3 (from NETStandard.Library 2.0.2)
      System.Linq >= 4.3 (from NETStandard.Library 2.0.2)
      System.Linq.Expressions >= 4.3 (from NETStandard.Library 2.0.2)
      System.Net.Primitives >= 4.3 (from NETStandard.Library 2.0.2)
      System.Net.Sockets >= 4.3 (from NETStandard.Library 2.0.2)
      System.ObjectModel >= 4.3 (from NETStandard.Library 2.0.2)
   -- OPEN ----
      System.Reflection >= 4.3 (from NETStandard.Library 2.0.2)
      System.Reflection.Extensions >= 4.3 (from NETStandard.Library 2.0.2)
      System.Reflection.Primitives >= 4.3 (from NETStandard.Library 2.0.2)
      System.Resources.ResourceManager >= 4.3 (from NETStandard.Library 2.0.2)
      System.Runtime >= 4.3 (from NETStandard.Library 2.0.2)
      System.Runtime.Extensions >= 4.3 (from NETStandard.Library 2.0.2)
      System.Runtime.Handles >= 4.3 (from NETStandard.Library 2.0.2)
      System.Runtime.InteropServices >= 4.3 (from NETStandard.Library 2.0.2)
      System.Runtime.InteropServices.RuntimeInformation >= 4.3 (from NETStandard.Library 2.0.2)
      System.Runtime.Numerics >= 4.3 (from NETStandard.Library 2.0.2)
      System.Security.Cryptography.Algorithms >= 4.3 (from NETStandard.Library 2.0.2)
      System.Security.Cryptography.Encoding >= 4.3 (from NETStandard.Library 2.0.2)
      System.Security.Cryptography.Primitives >= 4.3 (from NETStandard.Library 2.0.2)
      System.Security.Cryptography.X509Certificates >= 4.3 (from NETStandard.Library 2.0.2)
      System.Text.Encoding >= 4.3 (from NETStandard.Library 2.0.2)
      System.Text.Encoding.Extensions >= 4.3 (from NETStandard.Library 2.0.2)
      System.Text.RegularExpressions >= 4.3 (from NETStandard.Library 2.0.2)
      System.Threading >= 4.3 (from NETStandard.Library 2.0.2)
      System.Threading.Tasks >= 4.3 (from NETStandard.Library 2.0.2)
      System.Threading.Timer >= 4.3 (from NETStandard.Library 2.0.2)
      System.Xml.ReaderWriter >= 4.3 (from NETStandard.Library 2.0.2)
      System.Xml.XDocument >= 4.3 (from NETStandard.Library 2.0.2)
      Microsoft.NETCore.DotNetHostPolicy >= 2.0.7 (from Microsoft.NETCore.App 2.0.7)
      Microsoft.NETCore.Platforms >= 2.0.2 (from Microsoft.NETCore.App 2.0.7)
      NETStandard.Library >= 2.0.1 (from Microsoft.NETCore.App 2.0.7)
      System.Reflection.Metadata >= 1.5 (from Fable.Compiler 1.3.15)
      System.Collections.Immutable >= 1.4 (from Fable.Compiler 1.3.15)
      Fable.Core >= 1.3.12 (from Fable.React 3.1.2)
      Fable.PowerPack >= 1.3.4 (from Fable.Elmish 1.0.2)
      Fable.Import.Browser >= 1.1.1 (from Fable.React 3.1.2)
      Microsoft.NETCore.Platforms >= 1.1 (from NETStandard.Library 2.0.2)
      runtime.native.System.Security.Cryptography.OpenSsl >= 4.3.2 (from System.Net.Http 4.3.3)
      System.Reflection.Emit >= 4.3 (from FSharp.Compiler.Service 22.0.3)
      System.Reflection.TypeExtensions >= 4.3 (from FSharp.Compiler.Service 22.0.3)
      System.Security.Cryptography.Algorithms >= 4.3 (from FSharp.Compiler.Service 22.0.3)
      System.Runtime >= 4.3 (from Microsoft.Win32.Primitives 4.3.0)
      System.Runtime >= 4.3 (from System.AppContext 4.3.0)
      System.Reflection >= 4.3 (from System.Collections.Concurrent 4.3.0)
      System.IO >= 4.3 (from System.Console 4.3.1)
      System.Text.Encoding >= 4.3 (from System.Console 4.3.1)
      System.Globalization >= 4.3 (from System.Globalization.Calendars 4.3.0)
      runtime.native.System.IO.Compression >= 4.3 (from System.IO.Compression 4.3.0)
      System.Buffers >= 4.3 (from System.IO.Compression 4.3.0)
      System.Buffers >= 4.3 (from System.IO.Compression.ZipFile 4.3.0)
      System.IO.Compression >= 4.3 (from System.IO.Compression.ZipFile 4.3.0)
      System.IO.FileSystem >= 4.3 (from System.IO.Compression.ZipFile 4.3.0)
      System.IO.FileSystem.Primitives >= 4.3 (from System.IO.Compression.ZipFile 4.3.0)
      System.Resources.ResourceManager >= 4.3 (from System.IO.Compression.ZipFile 4.3.0)
      System.Runtime.Extensions >= 4.3 (from System.IO.Compression.ZipFile 4.3.0)
      System.Runtime.Handles >= 4.3 (from System.IO.FileSystem 4.3.0)
      System.Threading.Tasks >= 4.3 (from System.IO.FileSystem 4.3.0)
      System.Collections >= 4.3 (from System.Linq 4.3.0)
      System.Diagnostics.Debug >= 4.3 (from System.Linq 4.3.0)
      System.Resources.ResourceManager >= 4.3 (from System.Linq 4.3.0)
      System.Runtime >= 4.3 (from System.Linq 4.3.0)
      System.Runtime.Extensions >= 4.3 (from System.Linq 4.3.0)
      System.Collections >= 4.3 (from System.Linq.Expressions 4.3.0)
      System.Diagnostics.Debug >= 4.3 (from System.Linq.Expressions 4.3.0)
      System.Linq >= 4.3 (from System.Linq.Expressions 4.3.0)
      System.ObjectModel >= 4.3 (from System.Linq.Expressions 4.3.0)
      System.Reflection >= 4.3 (from System.Linq.Expressions 4.3.0)
      System.Reflection.Emit >= 4.3 (from System.Linq.Expressions 4.3.0)
      System.Reflection.Emit.ILGeneration >= 4.3 (from System.Linq.Expressions 4.3.0)
      System.Reflection.Emit.Lightweight >= 4.3 (from System.Linq.Expressions 4.3.0)
      System.Reflection.Extensions >= 4.3 (from System.Linq.Expressions 4.3.0)
      System.Reflection.Primitives >= 4.3 (from System.Linq.Expressions 4.3.0)
      System.Reflection.TypeExtensions >= 4.3 (from System.Linq.Expressions 4.3.0)
      System.Threading >= 4.3 (from System.Linq.Expressions 4.3.0)
      runtime.native.System >= 4.3 (from System.Net.Http 4.3.3)
      runtime.native.System.Net.Http >= 4.3 (from System.Net.Http 4.3.3)
      System.Collections >= 4.3 (from System.Net.Http 4.3.3)
      System.Diagnostics.Debug >= 4.3 (from System.Net.Http 4.3.3)
      System.Diagnostics.DiagnosticSource >= 4.3 (from System.Net.Http 4.3.3)
      System.Diagnostics.Tracing >= 4.3 (from System.Net.Http 4.3.3)
      System.Globalization >= 4.3 (from System.Net.Http 4.3.3)
      System.Globalization.Extensions >= 4.3 (from System.Net.Http 4.3.3)
      System.IO >= 4.3 (from System.Net.Http 4.3.3)
      System.IO.FileSystem >= 4.3 (from System.Net.Http 4.3.3)
      System.Net.Primitives >= 4.3 (from System.Net.Http 4.3.3)
      System.Resources.ResourceManager >= 4.3 (from System.Net.Http 4.3.3)
      System.Runtime >= 4.3 (from System.Net.Http 4.3.3)
      System.Runtime.Extensions >= 4.3 (from System.Net.Http 4.3.3)
      System.Runtime.Handles >= 4.3 (from System.Net.Http 4.3.3)
      System.Runtime.InteropServices >= 4.3 (from System.Net.Http 4.3.3)
      System.Security.Cryptography.Algorithms >= 4.3 (from System.Net.Http 4.3.3)
      System.Security.Cryptography.Encoding >= 4.3 (from System.Net.Http 4.3.3)
      System.Security.Cryptography.OpenSsl >= 4.3 (from System.Net.Http 4.3.3)
      System.Security.Cryptography.Primitives >= 4.3 (from System.Net.Http 4.3.3)
      System.Security.Cryptography.X509Certificates >= 4.3 (from System.Net.Http 4.3.3)
      System.Text.Encoding >= 4.3 (from System.Net.Http 4.3.3)
      System.Threading >= 4.3 (from System.Net.Http 4.3.3)
      System.Threading.Tasks >= 4.3 (from System.Net.Http 4.3.3)
      System.Net.Primitives >= 4.3 (from System.Net.Sockets 4.3.0)
      System.IO >= 4.3 (from System.Runtime.Loader 4.3.0)
      System.Reflection >= 4.3 (from System.Runtime.Loader 4.3.0)
      System.Runtime >= 4.3 (from System.Runtime.Loader 4.3.0)
      System.Diagnostics.Process >= 4.1 (from FSharp.Compiler.Service 22.0.3)
      System.Diagnostics.TraceSource >= 4.0 (from FSharp.Compiler.Service 22.0.3)
      Microsoft.DiaSymReader.PortablePdb >= 1.2 (from FSharp.Compiler.Service 22.0.3)
      Microsoft.NETCore.Targets >= 1.1.2 (from System.Console 4.3.1)
      Microsoft.DiaSymReader >= 1.1 (from FSharp.Compiler.Service 22.0.3)
      Microsoft.NETCore.Platforms >= 1.1 (from Microsoft.Win32.Primitives 4.3.0)
      Microsoft.NETCore.Targets >= 1.1 (from System.Collections 4.3.0)
      Microsoft.NETCore.Platforms >= 1.1 (from System.Net.Http 4.3.3)
-> Request 'https://api.nuget.org/v3-flatcontainer/system.reflection/index.json?semVerLevel=2.0.0' finished with error
-> RequestFailedException: Request to 'https://api.nuget.org/v3-flatcontainer/system.reflection/index.json?semVerLevel=2.0.0' failed with: 504 GatewayTimeout — <?xml version="1.0" encoding="iso-8859-1"?>
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   	<head>
   		<title>504 - Gateway Timeout</title>
   	</head>
   	<body>
   		<h1>504 - Gateway Timeout</h1>
   	</body>
   </html>

Suggestion: Fallback to npm if yarn isn't installed

It be nice if yarn wasn't a strict dependency of the template.
Changing the build.fsx to fallback to npm if yarn isn't present.

let npmTool = platformTool "npm" "npm.cmd"  

// ...

Target "InstallClient" (fun _ ->
  printfn "Node version:"
  run nodeTool "--version" __SOURCE_DIRECTORY__
  printfn "Npm version:"
  run npmTool "--version"  __SOURCE_DIRECTORY__
  run npmTool "install" __SOURCE_DIRECTORY__
  run dotnetCli "restore" clientPath
)

Fake target `InstallDotNetCore`

Do we really need the InstallDotNetCore target ?

If the user want to use the template they need to have dotnet already installed. I am asking because, when contributing to a new project this is really painful to have this target.

I always comment it so it doesn't download dotnet each time I switch from one project to another.

But perhaps there is good reason for it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.