-
Notifications
You must be signed in to change notification settings - Fork 4
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
4aefaeb
commit 663db84
Showing
12 changed files
with
150 additions
and
76 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
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,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
<link rel="stylesheet" href="../build/solar-popup.css"> | ||
<script src="../build/solar-popup.js"></script> | ||
</head> | ||
<body> | ||
<button onclick="showSimplePopup()">Click me to trigger the popup programmatically</button> | ||
<button onclick="showBigPopup()">Click me for a larger example with a form</button><br><br> | ||
|
||
<div style="background-color: #57ff22; height: 200px;">Some other content</div> | ||
<div style="background-color: red; height: 200px;">Some other content</div> | ||
<div style="background-color: #e1ffe9; height: 200px;">Some other content</div> | ||
|
||
</body> | ||
<script type="text/javascript"> | ||
|
||
function showSimplePopup() { | ||
var child = document.createElement('DIV') | ||
child.innerHTML = | ||
`<p>This is some content that can be supplied to the popup</p> | ||
<p>Also press the [ESC] key to close]</p> | ||
<button type="submit">Clicking a submit button will also close it</button> | ||
` | ||
var popup = new SolarPopup(child) | ||
popup.show(child) | ||
} | ||
|
||
function showBigPopup() { | ||
var child = document.createElement('DIV') | ||
child.innerHTML = | ||
`<form> | ||
<h3>Some amazing form</h3> | ||
<p>The submit won't fire until all the fields are valid</p> | ||
<div class="form-group"> | ||
<input type="number" required placeholder="Project budget"> | ||
<input type="range" required placeholder="Project range"> | ||
<input type="date" required placeholder="Project date"> | ||
<input type="reset"> | ||
</div> | ||
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" | ||
class="btn btn-success" style="margin-top: 10px"></div> | ||
</div> | ||
</form> | ||
` | ||
var popup = new SolarPopup(child) | ||
popup.show(child) | ||
} | ||
showBigPopup() | ||
|
||
</script> | ||
</html> |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
#!/usr/bin/env bash | ||
git checkout master | ||
npm run build-prod | ||
|
||
exists=`git show-ref refs/heads/gh-pages` | ||
if ! [ -n "$exists" ]; then | ||
echo 'branch exists!' | ||
git checkout -b "gh-pages" | ||
else | ||
git checkout "gh-pages" | ||
if [ -n "$exists" ]; then | ||
git branch -D gh-pages | ||
fi | ||
git branch -D gh-pages | ||
|
||
git merge master | ||
git add dist/* -f | ||
git commit -a -m 'build files' | ||
git push origin gh-pages | ||
git checkout --orphan gh-pages | ||
git add build/* -f | ||
git commit -m "build files" | ||
git push -f origin gh-pages | ||
git checkout master |
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 was deleted.
Oops, something went wrong.
File renamed without changes.
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,3 @@ | ||
#!/usr/bin/env bash | ||
webpack -p | ||
npm publish |
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
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,14 +1,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "system", | ||
"target": "es5", | ||
"outFile":"./build/solar-popup.js", | ||
"sourceRoot": "./src/SolarPopup.ts", | ||
"rootDir": "./src/", | ||
"inlineSources": true, | ||
"inlineSourceMap": true | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} | ||
|
||
|
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,41 @@ | ||
var path = require("path"); | ||
var webpack = require("webpack"); | ||
var WebpackBuildNotifierPlugin = require("webpack-build-notifier"); | ||
|
||
|
||
const PATHS = { | ||
src: path.join(__dirname, './src'), | ||
build: path.join(__dirname, './build') | ||
}; | ||
|
||
module.exports = { | ||
|
||
entry: { | ||
"solar-popup": PATHS.src + '/SolarPopup.ts' | ||
}, | ||
output: { | ||
path: PATHS.build, | ||
filename: '[name].js', | ||
library: 'SolarPopup', | ||
libraryTarget: 'umd', | ||
umdNamedDefine:true | ||
}, | ||
devtool: "source-map", | ||
module: { | ||
loaders: [ | ||
{ | ||
test: /\.ts$/, | ||
loader: 'ts-loader' | ||
} | ||
] | ||
}, | ||
resolve: { | ||
// you can now require('file') instead of require('file.js') | ||
extensions: ['.ts', '.js'] | ||
}, | ||
plugins: [ | ||
new WebpackBuildNotifierPlugin({ | ||
title: "My Project Webpack Build" | ||
}) | ||
] | ||
}; |