Skip to content

Commit 1862562

Browse files
committed
feat: add quick testing
1 parent 93db27c commit 1862562

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ Materialize is compatible with:
6464
## Testing
6565
We use Jasmine as our testing framework and we're trying to write a robust test suite for our components. If you want to help, [here's a starting guide on how to write tests in Jasmine](docs/CONTRIBUTING.md#jasmine-testing-guide).
6666

67+
## Quick Testing and Development
68+
For quick testing install live-server node package globally and run `npm run demo`
69+
6770
## Contributing
6871
Check out the [CONTRIBUTING document](docs/CONTRIBUTING.md) in the root of the repository to learn how you can contribute. You can also browse the [help-wanted](https://github.com/materializecss/materialize/labels/help-wanted) tag in our issue tracker to find things to do.
6972

index.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6+
<!-- CSS -->
7+
<link type="text/css" rel="stylesheet" href="/dist/css/materialize.min.css" media="screen,projection"/>
8+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
9+
</head>
10+
<body>
11+
<div class="container">
12+
<h1>Test</h1>
13+
<p>This is for quick testing purposes. The files are used from dist directory.</p>
14+
15+
<div style="border: 1px dashed #888;">
16+
<!-- Dropdown Trigger -->
17+
<a class='dropdown-trigger btn tonal' href='#' data-target='dropdown1'>Drop Me!</a>
18+
<!-- Dropdown Structure -->
19+
<ul id='dropdown1' class='dropdown-content'>
20+
<li><a href="#!">one</a></li>
21+
<li><a href="#!">two</a></li>
22+
<li class="divider" tabindex="-1"></li>
23+
<li><a href="#!">three</a></li>
24+
<li><a href="#!"><i class="material-icons">view_module</i>four</a></li>
25+
<li><a href="#!"><i class="material-icons">cloud</i>five</a></li>
26+
</ul>
27+
</div>
28+
</div>
29+
30+
<!-- JS -->
31+
<script type="text/javascript" src="/dist/js/materialize.min.js"></script>
32+
<script>
33+
M.AutoInit();
34+
</script>
35+
</body>
36+
</html>

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"preversion": "npm run lint && npm test",
4040
"version": "npm run build -- --environment BUILD:release && node compress.mjs && git add .",
4141
"storybook": "storybook dev -p 6006",
42-
"build-storybook": "storybook build"
42+
"build-storybook": "storybook build",
43+
"demo": "live-server"
4344
},
4445
"lint-staged": {
4546
"js/*.js": [

0 commit comments

Comments
 (0)