-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate test bundle using webpack #55
- Loading branch information
1 parent
426c0f1
commit 68c38b7
Showing
6 changed files
with
102 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ repl-temp-* | |
# DS-Store | ||
.DS_Store | ||
|
||
elm.js | ||
bundle.js | ||
test-bundle.js | ||
|
||
|
||
# generated css | ||
|
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Flickity from 'flickity'; | ||
import Dexie from 'dexie'; | ||
import idb from './idb'; | ||
|
||
const Elm = require('../elm/Main.elm'); | ||
const app = Elm.Main.fullscreen(); | ||
const db = new Dexie('stimmy_things'); | ||
|
||
app.ports.initCarousel.subscribe(function() { | ||
window.requestAnimationFrame(function() { | ||
var carouselElement = document.getElementsByClassName('makecarousel')[0]; | ||
var flkty = new Flickity(carouselElement, { | ||
lazyLoad: true, | ||
adaptiveHeight: true, | ||
wrapAround: true, | ||
prevNextButtons: false, | ||
pageDots: true | ||
}); | ||
}); | ||
}); |
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,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>QUnit Testing - Stimmy Things</title> | ||
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.5.1.css"> | ||
</head> | ||
|
||
<body> | ||
<div id="qunit"></div> | ||
<div id="qunit-fixture"></div> | ||
<script src="https://code.jquery.com/qunit/qunit-2.5.1.js"></script> | ||
<script src="./test-bundle.js"></script> | ||
</body> | ||
|
||
</html> |
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 |
---|---|---|
@@ -1,23 +1,32 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
entry: './src/js/index.js', | ||
output: { | ||
filename: 'bundle.js', | ||
path: path.resolve(__dirname, 'public') | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.elm$/, | ||
exclude: [/elm-stuff/, /node_modules/], | ||
loader: 'elm-webpack-loader', | ||
options: { | ||
debug: true, | ||
warn: true | ||
module.exports = [ | ||
{ | ||
entry: './src/js/index.js', | ||
output: { | ||
filename: 'bundle.js', | ||
path: path.resolve(__dirname, 'public') | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.elm$/, | ||
exclude: [/elm-stuff/, /node_modules/], | ||
loader: 'elm-webpack-loader', | ||
options: { | ||
debug: true, | ||
warn: true | ||
} | ||
} | ||
} | ||
] | ||
] | ||
}, | ||
devtool: 'eval' | ||
}, | ||
devtool: 'eval' | ||
}; | ||
{ | ||
entry: './tests/front-end/qunit.js', | ||
output: { | ||
filename: 'test-bundle.js', | ||
path: path.resolve(__dirname, 'tests', 'front-end') | ||
} | ||
} | ||
]; |