Skip to content

Commit

Permalink
Upgrade to Nagareyama
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsogarciacaro committed Oct 18, 2020
1 parent 019b772 commit 9c2bae4
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 35 deletions.
6 changes: 6 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
"commands": [
"paket"
]
},
"fable": {
"version": "3.0.0-nagareyama-alpha-014",
"commands": [
"fable"
]
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.fs.js
packages/
paket-files/
paket.local
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Run: `./fake.sh build -t Watch`

# Running Fable without FAKE

- Install NPM dependencies: `yarn`
- Building for development: `yarn run webpack-dev-server`
- Building for production: `yarn run webpack`
- Install tools: `dotnet tool restore && yarn`
- Building for development: `dotnet fable watch src --run webpack-dev-server`
- Building for production: `dotnet fable src --run webpack`

# Debugging in VS Code

Expand Down
4 changes: 2 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ Target.create "YarnInstall" (fun _ ->
)

Target.create "Build" (fun _ ->
Yarn.exec "webpack" id
DotNet.exec id "fable" "src --run webpack" |> ignore
)

Target.create "Watch" (fun _ ->
Yarn.exec "webpack-dev-server" id
DotNet.exec id "fable" "watch src --run webpack-dev-server" |> ignore
)

// Where to push generated documentation
Expand Down
2 changes: 2 additions & 0 deletions fake.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/bin/bash

dotnet tool restore
dotnet fake $@
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"author": "Maxime Mangel",
"license": "MIT",
"private": true,
"scripts": {
"foo": "echo $PATH"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.13.0",
"bulma": "^0.8.1",
Expand All @@ -24,8 +27,6 @@
"copy-webpack-plugin": "^5.1.1",
"core-js": "^3.6.4",
"css-loader": "^3.5.1",
"fable-compiler": "^2.4.22",
"fable-loader": "^2.1.9",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^4.0.4",
"mini-css-extract-plugin": "^0.9.0",
Expand Down
12 changes: 1 addition & 11 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

var CONFIG = {
indexHtmlTemplate: './src/index.html',
fsharpEntry: './src/Demo.fsproj',
fsharpEntry: './src/App.fs.js',
cssEntry: './src/scss/main.scss',
outputDir: './output',
assetsDir: './public',
Expand Down Expand Up @@ -107,21 +107,11 @@ module.exports = {
hot: true,
inline: true
},
// - fable-loader: transforms F# into JS
// - babel-loader: transforms JS to old syntax (compatible with old browsers)
// - sass-loaders: transforms SASS/SCSS into JS
// - file-loader: Moves files referenced in the code (fonts, images) into output folder
module: {
rules: [
{
test: /\.fs(x|proj)?$/,
use: {
loader: "fable-loader",
options: {
babel: CONFIG.babel
}
},
},
{
test: /\.js$/,
exclude: /node_modules/,
Expand Down
17 changes: 0 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2526,23 +2526,6 @@ extsprintf@^1.2.0:
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=

fable-babel-plugins@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/fable-babel-plugins/-/fable-babel-plugins-2.3.0.tgz#cb4f652bbe78bd8e4a34e17c851d940fa6f3fa44"
integrity sha512-alGBNw5HZJzTEznXKfypFEkD5aWsspbCcoVDu9j8Mqdi77dgp4BSjhYSg61mQEg9UluIAZxRM5lhGARYbU97DQ==

fable-compiler@^2.4.22:
version "2.4.22"
resolved "https://registry.yarnpkg.com/fable-compiler/-/fable-compiler-2.4.22.tgz#653325d97d88e3565fb974da58c4ccffa2b13346"
integrity sha512-WFyyt/jXzK6E5coPOMz2i4jplyn4WV9JljT6o5UY+vYVx+hz5z1x7kepYxfO4YY6u/VRak5Q/ZM70JRhhJr1+Q==

fable-loader@^2.1.9:
version "2.1.9"
resolved "https://registry.yarnpkg.com/fable-loader/-/fable-loader-2.1.9.tgz#ca54f57359e5ee416d15c0313ab2beb708560050"
integrity sha512-ffFfAx4+92yGRjV7iZQOCzqsjQF1he6Lei6hDqfaW1Qjbyx9bhVa8jCX53+I1mhWEw2JWIQpFzwHnYwz2eT4Hw==
dependencies:
fable-babel-plugins "^2.3.0"

fast-deep-equal@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4"
Expand Down

0 comments on commit 9c2bae4

Please sign in to comment.