-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77a6228
commit e1a6a00
Showing
10 changed files
with
650 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<form data-testid="testForm"> | ||
<select id="select" data-testid="select" name="select[]" multiple> | ||
<option value="a" selected>a</option> | ||
<option value="b" selected>b</option> | ||
</select> | ||
</form> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<form action="/submit" method="post" data-testid="testForm" id="testForm"> | ||
<!-- <label for="text">Text:</label>--> | ||
<!-- <input type="text" id="text" name="text" value="text value"><br><br>--> | ||
|
||
<!-- <label for="password">Password:</label>--> | ||
<!-- <input type="password" id="password" name="password" value="password value"><br><br>--> | ||
|
||
<!-- <label for="email">Email:</label>--> | ||
<!-- <input type="email" id="email" name="email" value="[email protected]"><br><br>--> | ||
|
||
<!-- <label for="number">Number:</label>--> | ||
<!-- <input type="number" id="number" name="number" value="12345"><br><br>--> | ||
|
||
<!-- <label for="date">Date:</label>--> | ||
<!-- <input type="date" id="date" name="date" value="2023-12-16"><br><br>--> | ||
|
||
<!-- <label for="time">Time:</label>--> | ||
<!-- <input type="time" id="time" name="time" value="10:30"><br><br>--> | ||
|
||
<!-- <label for="range">Range:</label>--> | ||
<!-- <input type="range" id="range" name="range" value="60"><br><br>--> | ||
|
||
<!-- <label for="color">Color:</label>--> | ||
<!-- <input type="color" id="color" name="color" value="#000000"><br><br>--> | ||
|
||
<!-- <label for="checkbox">Checkbox:</label>--> | ||
<!-- <input type="checkbox" id="checkbox" name="checkbox" checked><br><br>--> | ||
|
||
<!-- <label for="radio">Radio:</label>--> | ||
<!-- <input type="radio" id="radio1" name="radio" value="option1">--> | ||
<!-- <label for="radio1">Option 1</label>--> | ||
<!-- <input type="radio" id="radio2" name="radio" value="option2" checked>--> | ||
<!-- <label for="radio2">Option 2</label><br><br>--> | ||
<!-- <input type="radio" id="radio3" name="radio" value="option3">--> | ||
<!-- <label for="radio2">Option 3</label><br><br>--> | ||
|
||
<!-- <label for="file">File:</label>--> | ||
<!-- <input type="file" id="file" name="file"><br><br>--> | ||
|
||
<!-- <label for="textarea">Textarea:</label>--> | ||
<!-- <textarea id="textarea" name="textarea">textarea value</textarea><br><br>--> | ||
|
||
<!-- <label for="select">Select:</label>--> | ||
<!-- <select id="select" name="select">--> | ||
<!-- <option value="option1">Option 1</option>--> | ||
<!-- <option value="option2" selected>Option 2</option>--> | ||
<!-- <option value="option3">Option 3</option>--> | ||
<!-- </select><br><br>--> | ||
|
||
<!-- <label for="hidden">Hidden:</label>--> | ||
<!-- <input type="hidden" id="hidden" name="hidden" value="hiddenValue"><br><br>--> | ||
|
||
<!-- <label for="submit">Submit:</label>--> | ||
<!-- <input type="submit" id="submit" value="Submit"><br><br>--> | ||
|
||
<!-- <label for="reset">Reset:</label>--> | ||
<!-- <input type="reset" id="reset" value="Reset"><br><br>--> | ||
|
||
<select id="multiselect" data-testid="multiselect" name="multiselect[]" multiple> | ||
<option value="a" selected>a</option> | ||
<option value="b" selected>b</option> | ||
</select> | ||
|
||
<!-- <label><input type="checkbox" name="checkboxGroup[]" value="option1" id="checkboxGroup-1" checked> Option 1</label>--> | ||
<!-- <label><input type="checkbox" name="checkboxGroup[]" value="option2" id="checkboxGroup-2" checked> Option 2</label>--> | ||
<!-- <label><input type="checkbox" name="checkboxGroup[]" value="option3" id="checkboxGroup-3" checked> Option 3</label>--> | ||
</form> | ||
|
||
<!--<script src="./js/formToObject.min.js"></script>--> | ||
|
||
<script src="../../build/bundle/formToObject.min.js"></script> | ||
<script> | ||
console.log(formToObject('testForm')); | ||
</script> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const { merge } = require('webpack-merge'); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const common = require('./webpack.common.js'); | ||
|
||
module.exports = merge(common, { | ||
mode: 'development', | ||
devtool: 'source-map', | ||
watch: true, | ||
module: { | ||
rules: [ | ||
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'. | ||
{ enforce: "pre", test: /\.js$/, loader: "source-map-loader" }, | ||
] | ||
} | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const { merge } = require('webpack-merge'); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const common = require('./webpack.common.js'); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const TerserPlugin = require("terser-webpack-plugin"); | ||
|
||
module.exports = merge(common, { | ||
mode: 'production', | ||
optimization: { | ||
minimize: true, | ||
minimizer: [new TerserPlugin()], | ||
}, | ||
}); |