This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import template from './index.html'; | |
| import {} from './app.css'; | |
| import YOPFForm from './form/form.index'; | |
| import YOPFFireworks from './fireworks/fireworks.index'; | |
| (function() { | |
| function onPhraseChange(phrase) { | |
| fireworks.doFireworks(phrase); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const path = require('path'); | |
| const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| const webpack = require('webpack'); | |
| const CleanWebpackPlugin = require('clean-webpack-plugin'); | |
| const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); | |
| module.exports = { | |
| devtool: 'inline-source-map', | |
| devServer: { | |
| open: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import template from './index.html'; | |
| import {} from './app.css'; | |
| import YOPFForm from './form/form.index'; | |
| import 'jquery'; | |
| import 'bootstrap/dist/js/bootstrap'; | |
| import 'bootstrap/dist/css/bootstrap.min.css'; | |
| (function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import template from './index.html'; | |
| import {} from './app.css'; | |
| import YOPFForm from './form/form.index'; | |
| import 'jquery'; | |
| import 'bootstrap/dist/js/bootstrap'; | |
| import 'bootstrap/dist/css/bootstrap.min.css'; | |
| (function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const path = require('path'); | |
| const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| const webpack = require('webpack'); | |
| module.exports = { | |
| entry: ['./src/app.js'], // this is our app | |
| output: { | |
| chunkFilename: '[name].bundle.js', | |
| filename: '[name].bundle.js', // the file name would be my entry's name with a ".bundle.js" suffix | |
| path: path.resolve(__dirname, 'dist') // put all of the build in a dist folder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /******/ // start chunk loading | |
| /******/ var head = document.getElementsByTagName('head')[0]; | |
| /******/ var script = document.createElement('script'); | |
| /******/ script.type = 'text/javascript'; | |
| /******/ script.charset = 'utf-8'; | |
| /******/ script.async = true; | |
| /******/ script.timeout = 120000; | |
| /******/ | |
| /******/ if (__webpack_require__.nc) { | |
| /******/ script.setAttribute("nonce", __webpack_require__.nc); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class LazyLoader{ | |
| static LoadTemplate(path, onLoadCallback, onErrorCallback) { | |
| const script = document.createElement('script'); | |
| script.src = path; | |
| script.onload = onLoadCallback; | |
| script.onerror = onErrorCallback; | |
| // you can do more here... | |
| document.head.appendChild(script); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <!-- Use correct character set. --> | |
| <meta charset="utf-8"> | |
| <!-- Tell IE to use the latest, best version. --> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <!-- Make the application on mobile take up the full browser screen and disable user scaling. --> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | |
| <title>Hello World!</title> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function BitwiseAND(operand1, operand2) { | |
| // convert to binary | |
| let binary1 = (operand1 >>> 0).toString(2); | |
| let binary2 = (operand2 >>> 0).toString(2); | |
| // pad with zeros to the left to get 32bit binary | |
| binary1 = binary1.padStart(32, '0'); | |
| binary2 = binary2.padStart(32, '0'); | |
| // if bigger than 32 bits, cut the most significant bits |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function BitwiseAND(operand1, operand2) { | |
| // convert to binary | |
| let binary1 = (operand1 >>> 0).toString(2); | |
| let binary2 = (operand2 >>> 0).toString(2); | |
| // pad with zeros to the left to get 32bit binary | |
| binary1 = binary1.padStart(32, '0'); | |
| binary2 = binary2.padStart(32, '0'); | |
| // if bigger than 32 bits, cut the most significant bits |