Skip to content

Commit

Permalink
Update JS dependencies
Browse files Browse the repository at this point in the history
Update dotnet tools
  • Loading branch information
Booksbaum authored and Krzysztof-Cieslak committed Dec 14, 2020
1 parent a0a0f05 commit 553be75
Show file tree
Hide file tree
Showing 4 changed files with 3,405 additions and 2,720 deletions.
8 changes: 3 additions & 5 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ let npmTool =
let vsceTool = lazy (platformTool "vsce" "vsce.cmd")

let runFable additionalArgs =
let cmd = "webpack -- --config webpack.config.js " + additionalArgs
DotNet.exec (fun p -> { p with WorkingDirectory = "src"; } ) "fable" cmd
|> ignore
let cmd = "webpack " + additionalArgs
Yarn.exec cmd id

let copyFSAC releaseBin fsacBin =
Directory.ensure releaseBin
Expand Down Expand Up @@ -211,8 +210,7 @@ Target.create "CopyDocs" (fun _ ->
)

Target.create "RunScript" (fun _ ->
// Ideally we would want a production (minized) build but UglifyJS fail on PerMessageDeflate.js as it contains non-ES6 javascript.
runFable ""
runFable "--mode production"
)

Target.create "CopyFSAC" (fun _ ->
Expand Down
44 changes: 24 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
{
"scripts": {
"build": "webpack"
"build": "webpack",
"watch": "webpack --watch"
},
"dependencies": {
"htmlparser2": "^4.1.0"
},
"devDependencies": {
"axios": "*",
"babel-core": "6.26.0",
"babel-loader": "7.1.2",
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-es2015": "6.24.1",
"fable-compiler": "0.6.x",
"fable-loader": "1.0.7",
"fable-utils": "^1.0.2",
"mocha": "*",
"showdown": "^1.9.0",
"toml": "*",
"vscode": "*",
"@babel/core": "^7.11.6",
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"@types/showdown": "^1.9.3",
"@types/vscode": "^1.48.0",
"@types/ws": "^7.2.6",
"axios": "^0.20.0",
"babel-loader": "^8.1.0",
"fable-compiler": "^2.13.0",
"fable-loader": "^2.1.9",
"mocha": "^8.1.3",
"showdown": "^1.9.1",
"toml": "^3.0.0",
"vscode-debugadapter": "^1.41.1",
"vscode-languageclient": "^6.1.3",
"webpack": "^3.5.5",
"webpack-node-externals": "^1.6.0",
"ws": "^3.1.0",
"xhr2": "*"
},
"dependencies": {
"htmlparser2": "^3.9.2"
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"webpack-node-externals": "^2.5.2",
"ws": "^7.3.1",
"xhr2": "^0.2.0"
}
}
27 changes: 14 additions & 13 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
var path = require("path");
var webpack = require("webpack");
var fableUtils = require("fable-utils");
var nodeExternals = require('webpack-node-externals');

function resolve(filePath) {
return path.join(__dirname, filePath)
}

var babelOptions = {
presets: [
["@babel/preset-env", {
"modules": false
}]
],
plugins: ["@babel/plugin-transform-runtime"]
}

var babelOptions = fableUtils.resolveBabelOptions({
presets: [["es2015", { "modules": false }]],
plugins: ["transform-runtime"]
});

var isProduction = process.argv.indexOf("-p") >= 0;
console.log("Bundling for " + (isProduction ? "production" : "development") + "...");

module.exports = function(env) {
module.exports = function(env, argv) {
var isProduction = argv.mode == "production"
console.log("Bundling for " + (isProduction ? "production" : "development") + "...");

var ionideExperimental = (env && env.ionideExperimental);
var outputPath = ionideExperimental? "release-exp" : "release";
var outputPath = ionideExperimental ? "release-exp" : "release";
console.log("Output path: " + outputPath);

var compilerDefines = isProduction ? [] : ["DEBUG"];
Expand All @@ -29,13 +29,14 @@ module.exports = function(env) {

return {
target: 'node',
mode: isProduction ? "production" : "development",
devtool: "source-map",
entry: resolve('./src/Ionide.FSharp.fsproj'),
output: {
filename: 'fsharp.js',
path: resolve('./' + outputPath),
//library: 'IONIDEFSHARP',
libraryTarget: 'commonjs'
libraryTarget: 'commonjs2'
},
resolve: {
modules: [resolve("./node_modules/")]
Expand Down
Loading

0 comments on commit 553be75

Please sign in to comment.