Create React App does not provide watching build mode oficially (#1070).
This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.
Create a React app.
Put the script into scripts/watch.js.
| # Random file generator | |
| # This tool generates random valid files of various types using real data based on Loreum Ipsum. Files are created in a custom directory structure. | |
| # Generates random files based on Lorem Ipsum text | |
| # Generates random file names from word list | |
| # Generate valid files of type: txt, docx, xlsx, pptx, xml, config | |
| # Requirements | |
| # On windows download and install lxml manually: https://pypi.python.org/pypi/lxml/3.4.4 | |
| ''' |
Create React App does not provide watching build mode oficially (#1070).
This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.
Create a React app.
Put the script into scripts/watch.js.
| /******************************************************************************* | |
| * Copyright (c) 2017 Nicola Del Gobbo | |
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
| * use this file except in compliance with the License. You may obtain a copy of | |
| * the license at http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS | |
| * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY | |
| * IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | |
| * MERCHANTABLITY OR NON-INFRINGEMENT. |
| // List all files in a directory in Node.js recursively in a synchronous fashion | |
| var walkSync = function(dir, filelist) { | |
| var fs = fs || require('fs'), | |
| files = fs.readdirSync(dir); | |
| filelist = filelist || []; | |
| files.forEach(function(file) { | |
| if (fs.statSync(dir + file).isDirectory()) { | |
| filelist = walkSync(dir + file + '/', filelist); | |
| } | |
| else { |
| /** | |
| * Servlet filter that checks all request parameters for potential XSS attacks. | |
| * see http://bazageous.com/2011/04/14/preventing-xss-attacks-with-antisamy/ | |
| * | |
| * @author barry pitman | |
| * @since 2011/04/12 5:13 PM | |
| */ | |
| public class AntiSamyFilter implements Filter { | |
| private static final Logger LOG = Logger.getLogger(AntiSamyFilter.class); |