Browse Source

Merge branch 'removeCDN' of LInE/ivprog into master

Lucas de Souza 4 years ago
parent
commit
c6bf7b89af

File diff suppressed because it is too large
+ 372 - 0
css/semantic.min.css


BIN
css/themes/default/assets/fonts/brand-icons.eot


File diff suppressed because it is too large
+ 1008 - 0
css/themes/default/assets/fonts/brand-icons.svg


BIN
css/themes/default/assets/fonts/brand-icons.ttf


BIN
css/themes/default/assets/fonts/brand-icons.woff


BIN
css/themes/default/assets/fonts/brand-icons.woff2


BIN
css/themes/default/assets/fonts/icons.eot


BIN
css/themes/default/assets/fonts/icons.otf


File diff suppressed because it is too large
+ 1518 - 0
css/themes/default/assets/fonts/icons.svg


BIN
css/themes/default/assets/fonts/icons.ttf


BIN
css/themes/default/assets/fonts/icons.woff


BIN
css/themes/default/assets/fonts/icons.woff2


BIN
css/themes/default/assets/fonts/outline-icons.eot


File diff suppressed because it is too large
+ 366 - 0
css/themes/default/assets/fonts/outline-icons.svg


BIN
css/themes/default/assets/fonts/outline-icons.ttf


BIN
css/themes/default/assets/fonts/outline-icons.woff


BIN
css/themes/default/assets/fonts/outline-icons.woff2


BIN
css/themes/default/assets/images/flags.png


File diff suppressed because it is too large
+ 13 - 0
js/jquery-ui.min.js


File diff suppressed because it is too large
+ 2 - 0
js/jquery.min.js


File diff suppressed because it is too large
+ 11 - 0
js/semantic.min.js


+ 9 - 10
templates/index.html

@@ -4,16 +4,16 @@
     <meta http-equiv="content-type" content="text/html; charset=UTF-8">
     <title></title>
     <link href="css/roboto.css" type="text/css" rel="stylesheet">
-    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.0/semantic.min.css"/>
+    <link rel="stylesheet" href="css/semantic.min.css"/>
     <link rel="stylesheet" type="text/css" href="css/codemirror.css">
     <link rel="stylesheet" type="text/css" href="css/show-hint.css">
     <link rel="stylesheet" type="text/css" href="css/ttcn.css">
     <link rel="stylesheet" type="text/css" href="css/ivprog-visual-1.0.css">
     <link rel="stylesheet" type="text/css" href="css/ivprog-term.css">
     <link rel="stylesheet" type="text/css" href="css/ivprog-editor.css">
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.0/semantic.min.js"></script>
+    <script src="js/jquery.min.js"></script>
+    <script src="js/jquery-ui.min.js"></script>
+    <script src="js/semantic.min.js"></script>
     <script src="js/Sortable.js"></script>
     <script src="js/iassign-integration-functions.js"></script>
   </head>
@@ -26,7 +26,7 @@
       </div>
 
     <div class="content height_100">
-   
+
       <div class="ui raised container segment div_to_body">
 
         <div class="ui container main_title only_in_frame">
@@ -80,7 +80,7 @@
                 <i class="icon superscript" style="margin-top: -2px;margin-bottom: 2px;margin-left: 1px;margin-right: 1px; font-size: 18px;"></i>
                 <i class="corner add icon inverted" style="font-size: 10px;padding-top: 5px;padding-left: 7px;"></i>
               </i>
-              
+
             </div>
 
             <div class="list_globals" id="listGlobalsHandle"></div>
@@ -105,7 +105,7 @@
           <textarea id="ivprog-text-editor" class=".ivprog_textual_code"></textarea>
         </div>
         <div id='ivprog-term-div' class="six column wide">
-          
+
         </div>
       </div>
     </div>
@@ -120,7 +120,7 @@
     var mouseX;
     var mouseY;
     $(document).ready(() => {
-      var $buttons = $('.ivprog_format .button'), 
+      var $buttons = $('.ivprog_format .button'),
         handler = {
           activate: function () {
             $(this)
@@ -131,7 +131,6 @@
         };
 
       $buttons.on('click', handler.activate);
-
       $('.ivprog_format_info').popup(
         {
           popup: $('.custom.popup'),
@@ -159,4 +158,4 @@
       }
     });
   </script>
-</html>
+</html>

+ 8 - 12
templates/runner.html

@@ -2,20 +2,16 @@
 <html>
 <head>
   <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-  <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
-  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.0/semantic.min.css" integrity="sha256-9mbkOfVho3ZPXfM7W8sV2SndrGDuh7wuyLjtsWeTI1Q=" crossorigin="anonymous" />
+  <link href="css/roboto.css" type="text/css" rel="stylesheet">
+  <link rel="stylesheet" href="css/semantic.min.css"/>
   <link rel="stylesheet" type="text/css" href="css/ivprog-visual-1.0.css">
   <link rel="stylesheet" type="text/css" href="css/ivprog-term.css">
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"
-    integrity="sha256-KM512VNnjElC30ehFwehXjx1YCHPiQkOPmqnrWtpccM="
-    crossorigin="anonymous"></script>
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.0/semantic.min.js" integrity="sha256-x1fC6BXl6BwnUhfQqqqC0Fd/n12wH+u8u9va6+E7xaA=" crossorigin="anonymous"></script>
+  <link rel="stylesheet" type="text/css" href="css/ivprog-term.css">
+  <link rel="stylesheet" type="text/css" href="css/ivprog-editor.css">
+  <script src="js/jquery.min.js"></script>
+  <script src="js/jquery-ui.min.js"></script>
+  <script src="js/semantic.min.js"></script>
   <script type="text/javascript" src="js/jquery.json-editor.min.js"></script>
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"
-      integrity="sha256-KM512VNnjElC30ehFwehXjx1YCHPiQkOPmqnrWtpccM="
-      crossorigin="anonymous"></script>
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.0/semantic.min.js" integrity="sha256-x1fC6BXl6BwnUhfQqqqC0Fd/n12wH+u8u9va6+E7xaA=" crossorigin="anonymous"></script>
 </head>
 <body>
     <div style="padding-top: 50px;content: ''"></div>
@@ -62,4 +58,4 @@
     ivprogCore.runner();
   })();
 </script>
-</html>
+</html>

+ 131 - 100
webpack.config.js

@@ -1,105 +1,136 @@
-const path = require('path');
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const UpdateVersionPlugin = require('./updateVersionPlugin');
+const path = require("path");
+const HtmlWebpackPlugin = require("html-webpack-plugin");
+const UpdateVersionPlugin = require("./updateVersionPlugin");
 //const ChangeScriptSourcePlugin = require('./changeScriptSourcePlugin');
-const CopyPlugin = require('copy-webpack-plugin');
-const CleanWebpackPlugin = require('clean-webpack-plugin');
+const CopyPlugin = require("copy-webpack-plugin");
+const CleanWebpackPlugin = require("clean-webpack-plugin");
 
 module.exports = {
-    entry: path.resolve(__dirname, 'js/main.js'),
-    output: {
-        path: path.resolve(__dirname, 'build',"js"),
-        filename: '[name].[contenthash].js',
-        library: 'ivprogCore',
-        libraryTarget: 'umd'
-    },
-    node: {
-        fs: 'empty',
-    },
-    module: {
-        rules: [
-            {
-              test: /\.js$/,
-              exclude: /(node_modules)/,
-              use: {
-                loader: "babel-loader",
-                options: {
-                  presets: ["@babel/preset-env"]
-                }
-              }
-            },
-            {
-              test: /\.g4$/,
-              exclude: /(node_modules)/,
-              use: {
-                loader:'antlr4-webpack-loader'
-              }
-            },
-            {
-              test: /\.tsx?$/,
-              use: 'ts-loader',
-              exclude: /node_modules/
-            },
-            {
-              test: /\.csv$/,
-              use: [
-                {
-                  loader: path.resolve(__dirname, 'i18n_csv_loader')
-                }
-              ],
-              exclude: /node_modules/
-            }
-        ]
-    },
-    resolve: {
-      extensions: [ '.tsx', '.ts', '.js', '.csv' ]
-    },
-    stats: {
-        colors: true
-    },
-    plugins: [
-      new CleanWebpackPlugin({
-        cleanOnceBeforeBuildPatterns:[path.resolve(__dirname, 'build/**/*')],
-        watch: true
-      }),
-      new UpdateVersionPlugin(),
-      new HtmlWebpackPlugin({
-        template: 'templates/index.html',
-        filename: path.resolve(__dirname, 'build', 'index.html')
-      }),
-      new HtmlWebpackPlugin({
-        template: 'templates/runner.html',
-        filename: path.resolve(__dirname, 'build', 'runner.html')
-      }),
-      /*new ChangeScriptSourcePlugin(),*/
-      new CopyPlugin([
-        {from:'js/iassign-integration-functions.js', to:path.resolve(__dirname, 'build/js')},
-        {from:"css/ivprog-visual-1.0.css", to:path.resolve(__dirname, 'build/css')},
-        {from:"css/ivprog-term.css", to:path.resolve(__dirname, 'build/css')},
-        {from:"css/ivprog-assessment.css", to:path.resolve(__dirname, 'build/css')},
-        {from:"css/ivprog-editor.css", to:path.resolve(__dirname, 'build/css')},
-        {from:"css/roboto.css", to:path.resolve(__dirname, 'build/css')},
-        {from:"css/fonts/", to:path.resolve(__dirname, 'build/css/fonts')},
-        {from:'js/Sortable.js', to:path.resolve(__dirname, 'build/js')},
-        {from: 'img/trash-icon.png', to:path.resolve(__dirname, 'build/img')},
-        {from: 'img/empty.svg', to:path.resolve(__dirname, 'build/img')},
-        {from:'js/jquery.json-editor.min.js', to:path.resolve(__dirname, 'build/js')},
-        {from:'node_modules/codemirror/lib/codemirror.css', to:path.resolve(__dirname, 'build/css')},
-        {from:'node_modules/codemirror/addon/hint/show-hint.css', to:path.resolve(__dirname, 'build/css')},
-        {from:'node_modules/codemirror/theme/ttcn.css', to:path.resolve(__dirname, 'build/css')},
-        /*{from:'index.html', to:path.resolve(__dirname, 'build')},
-        {from:'runner.html', to:path.resolve(__dirname, 'build')},*/
-      ])
-    ],
-    optimization: {
-        splitChunks: {
-            chunks: 'all'
+  entry: path.resolve(__dirname, "js/main.js"),
+  output: {
+    path: path.resolve(__dirname, "build", "js"),
+    filename: "[name].[contenthash].js",
+    library: "ivprogCore",
+    libraryTarget: "umd"
+  },
+  node: {
+    fs: "empty"
+  },
+  module: {
+    rules: [
+      {
+        test: /\.js$/,
+        exclude: /(node_modules)/,
+        use: {
+          loader: "babel-loader",
+          options: {
+            presets: ["@babel/preset-env"]
+          }
+        }
+      },
+      {
+        test: /\.g4$/,
+        exclude: /(node_modules)/,
+        use: {
+          loader: "antlr4-webpack-loader"
         }
-    },
-    devtool: 'source-map',
-    watchOptions: {
-        ignored: [
-          path.resolve(__dirname, '.ima_version.json'),
-        ]
+      },
+      {
+        test: /\.tsx?$/,
+        use: "ts-loader",
+        exclude: /node_modules/
+      },
+      {
+        test: /\.csv$/,
+        use: [
+          {
+            loader: path.resolve(__dirname, "i18n_csv_loader")
+          }
+        ],
+        exclude: /node_modules/
+      }
+    ]
+  },
+  resolve: {
+    extensions: [".tsx", ".ts", ".js", ".csv"]
+  },
+  stats: {
+    colors: true
+  },
+  plugins: [
+    new CleanWebpackPlugin({
+      cleanOnceBeforeBuildPatterns: [path.resolve(__dirname, "build/**/*")],
+      watch: true
+    }),
+    new UpdateVersionPlugin(),
+    new HtmlWebpackPlugin({
+      template: "templates/index.html",
+      filename: path.resolve(__dirname, "build", "index.html")
+    }),
+    new HtmlWebpackPlugin({
+      template: "templates/runner.html",
+      filename: path.resolve(__dirname, "build", "runner.html")
+    }),
+    /*new ChangeScriptSourcePlugin(),*/
+    new CopyPlugin([
+      {
+        from: "js/iassign-integration-functions.js",
+        to: path.resolve(__dirname, "build/js")
+      },
+      {
+        from: "css/ivprog-visual-1.0.css",
+        to: path.resolve(__dirname, "build/css")
+      },
+      { from: "css/ivprog-term.css", to: path.resolve(__dirname, "build/css") },
+      {
+        from: "css/ivprog-assessment.css",
+        to: path.resolve(__dirname, "build/css")
+      },
+      {
+        from: "css/ivprog-editor.css",
+        to: path.resolve(__dirname, "build/css")
+      },
+      { from: "css/roboto.css", to: path.resolve(__dirname, "build/css") },
+      { from: "css/fonts/", to: path.resolve(__dirname, "build/css/fonts") },
+      { from: "js/Sortable.js", to: path.resolve(__dirname, "build/js") },
+      { from: "js/jquery.min.js", to: path.resolve(__dirname, "build/js") },
+      { from: "js/jquery-ui.min.js", to: path.resolve(__dirname, "build/js") },
+      { from: "js/semantic.min.js", to: path.resolve(__dirname, "build/js") },
+      {
+        from: "css/semantic.min.css",
+        to: path.resolve(__dirname, "build/css")
+      },
+      { from: "css/themes/", to: path.resolve(__dirname, "build/css/themes") },
+      { from: "img/trash-icon.png", to: path.resolve(__dirname, "build/img") },
+      { from: "img/empty.svg", to: path.resolve(__dirname, "build/img") },
+      {
+        from: "js/jquery.json-editor.min.js",
+        to: path.resolve(__dirname, "build/js")
+      },
+      {
+        from: "node_modules/codemirror/lib/codemirror.css",
+        to: path.resolve(__dirname, "build/css")
+      },
+      {
+        from: "node_modules/codemirror/addon/hint/show-hint.css",
+        to: path.resolve(__dirname, "build/css")
+      },
+      {
+        from: "node_modules/codemirror/theme/ttcn.css",
+        to: path.resolve(__dirname, "build/css")
+      }
+      /*{from:'index.html', to:path.resolve(__dirname, 'build')},
+        {from:'runner.html', to:path.resolve(__dirname, 'build')},*/
+    ])
+  ],
+  optimization: {
+    splitChunks: {
+      chunks: "all"
     }
-};
+  },
+  devtool: "source-map",
+  watchOptions: {
+    ignored: [path.resolve(__dirname, ".ima_version.json")]
+  }
+};
+