Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8762ad13ab | |||
| b637d7308f | |||
| 767433149e | |||
| 4b1d5591c4 | |||
| 59e5d12882 | |||
| 123be01b1f | |||
| 881bd299f6 | |||
| 4136e95e13 | |||
| 3682d4ce81 | |||
| 539a907076 | |||
| 09a62efa7d | |||
| 5c314662e4 | |||
| ae3d8b7e18 | |||
| 186152bb3c | |||
| 6638994f83 | |||
| 9cbd923c1f |
+17
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"projects": {
|
||||||
|
"default": "regexper"
|
||||||
|
},
|
||||||
|
"targets": {
|
||||||
|
"regexper": {
|
||||||
|
"hosting": {
|
||||||
|
"production": [
|
||||||
|
"regexper"
|
||||||
|
],
|
||||||
|
"preview": [
|
||||||
|
"regexper-preview"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,3 +3,5 @@ node_modules
|
|||||||
build
|
build
|
||||||
docs
|
docs
|
||||||
tmp
|
tmp
|
||||||
|
.firebase/
|
||||||
|
firebase-debug.log
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
image: node:8
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
.preview_job: &preview_job
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
|
.production_job: &production_job
|
||||||
|
only:
|
||||||
|
- /^release-.*$/
|
||||||
|
|
||||||
|
.build_template: &build_template
|
||||||
|
stage: build
|
||||||
|
dependencies: []
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- build/
|
||||||
|
script:
|
||||||
|
- yarn gulp build
|
||||||
|
- rm -r build/__discard__
|
||||||
|
- gzip -k -6 $(find build/ -type f)
|
||||||
|
|
||||||
|
.deploy_template: &deploy_template
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- yarn firebase use --token $FIREBASE_DEPLOY_KEY default
|
||||||
|
- yarn firebase deploy --only hosting:$DEPLOY_ENV -m "Pipeline $CI_PIPELINE_ID, Build $CI_BUILD_ID" --non-interactive --token $FIREBASE_DEPLOY_KEY
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- node_modules/
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- yarn install
|
||||||
|
|
||||||
|
build-preview:
|
||||||
|
<<: *build_template
|
||||||
|
<<: *preview_job
|
||||||
|
variables:
|
||||||
|
DEPLOY_ENV: preview
|
||||||
|
GA_PROP: $PREVIEW_GA_PROPERTY
|
||||||
|
|
||||||
|
build-production:
|
||||||
|
<<: *build_template
|
||||||
|
<<: *production_job
|
||||||
|
variables:
|
||||||
|
DEPLOY_ENV: production
|
||||||
|
GA_PROP: $PROD_GA_PROPERTY
|
||||||
|
|
||||||
|
deploy-preview:
|
||||||
|
<<: *deploy_template
|
||||||
|
<<: *preview_job
|
||||||
|
dependencies:
|
||||||
|
- build-preview
|
||||||
|
environment:
|
||||||
|
name: preview
|
||||||
|
url: https://preview.regexper.com
|
||||||
|
variables:
|
||||||
|
DEPLOY_ENV: preview
|
||||||
|
|
||||||
|
deploy-production:
|
||||||
|
<<: *deploy_template
|
||||||
|
<<: *production_job
|
||||||
|
dependencies:
|
||||||
|
- build-production
|
||||||
|
environment:
|
||||||
|
name: production
|
||||||
|
url: https://regexper.com
|
||||||
|
variables:
|
||||||
|
DEPLOY_ENV: production
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Regexper [](https://travis-ci.org/javallone/regexper-static)
|
# Regexper
|
||||||
|
|
||||||
Code for the http://regexper.com/ site.
|
Code for the http://regexper.com/ site.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"hosting": [
|
||||||
|
{
|
||||||
|
"target": "production",
|
||||||
|
"public": "build"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"target": "preview",
|
||||||
|
"public": "build"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,4 +1,16 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"label": "June 4, 2018 Release",
|
||||||
|
"changes": [
|
||||||
|
"Moving source to GitLab and updating some links on the site."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "May 24, 2018 Release",
|
||||||
|
"changes": [
|
||||||
|
"Supporting browser \"Do Not Track\" setting. When enabled, this will prevent use of Google Analytics and Sentry error reporting."
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "February 10, 2018 Release",
|
"label": "February 10, 2018 Release",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
{{#if gaPropertyId}}
|
{{#if gaPropertyId}}
|
||||||
<script>
|
<script>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
if (navigator.doNotTrack !== '1' && window.doNotTrack !== '1') {
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||||
|
|
||||||
ga('create', '{{{gaPropertyId}}}', 'auto');
|
ga('create', '{{{gaPropertyId}}}', 'auto');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
} else {
|
||||||
|
console.log('Google Analytics disabled by "Do Not Track"');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<a class="inline-icon" href="/documentation.html">{{icon "#document"}}Documentation</a>
|
<a class="inline-icon" href="/documentation.html">{{icon "#document"}}Documentation</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="inline-icon" href="https://github.com/javallone/regexper-static">{{icon "#code"}}Source on GitHub</a>
|
<a class="inline-icon" href="https://gitlab.com/javallone/regexper-static">{{icon "#code"}}Source on GitLab</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
+12
-3
@@ -1,8 +1,17 @@
|
|||||||
{{#if sentryKey}}
|
{{#if sentryKey}}
|
||||||
<script src="https://cdn.ravenjs.com/3.17.0/raven.min.js" crossorigin="anonymous"></script>
|
|
||||||
<script>
|
<script>
|
||||||
Raven.config('{{{sentryKey}}}', {
|
if (navigator.doNotTrack !== '1' && window.doNotTrack !== '1') {
|
||||||
|
window.SENTRY_SDK = {
|
||||||
|
url: 'https://cdn.ravenjs.com/3.25.2/raven.min.js',
|
||||||
|
dsn: '{{{sentryKey}}}',
|
||||||
|
options: {
|
||||||
whitelistUrls: [/https:\/\/(.*\.)?regexper\.com/]
|
whitelistUrls: [/https:\/\/(.*\.)?regexper\.com/]
|
||||||
}).install()
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
(function(a,b,g,e,h){var k=a.SENTRY_SDK,f=function(a){f.data.push(a)};f.data=[];var l=a[e];a[e]=function(c,b,e,d,h){f({e:[].slice.call(arguments)});l&&l.apply(a,arguments)};var m=a[h];a[h]=function(c){f({p:c.reason});m&&m.apply(a,arguments)};var n=b.getElementsByTagName(g)[0];b=b.createElement(g);b.src=k.url;b.crossorigin="anonymous";b.addEventListener("load",function(){try{a[e]=l;a[h]=m;var c=f.data,b=a.Raven;b.config(k.dsn,k.options).install();var g=a[e];if(c.length)for(var d=0;d<c.length;d++)c[d].e?g.apply(b.TraceKit,c[d].e):c[d].p&&b.captureException(c[d].p)}catch(p){console.log(p)}});n.parentNode.insertBefore(b,n)})(window,document,"script","onerror","onunhandledrejection");
|
||||||
|
} else {
|
||||||
|
console.log('Sentry error logging disabled by "Do Not Track"');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
"docco": "^0.7.0",
|
"docco": "^0.7.0",
|
||||||
"extract-loader": "^1.0.0",
|
"extract-loader": "^1.0.0",
|
||||||
"file-loader": "^0.11.2",
|
"file-loader": "^0.11.2",
|
||||||
|
"firebase-tools": "^6.2.2",
|
||||||
"folder-toc": "^0.1.0",
|
"folder-toc": "^0.1.0",
|
||||||
"gulp": "^3.8.10",
|
"gulp": "^3.8.10",
|
||||||
"gulp-connect": "^5.0.0",
|
"gulp-connect": "^5.0.0",
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
# TEAM
|
# TEAM
|
||||||
|
|
||||||
Creator: Jeff Avallone
|
Creator: Jeff Avallone
|
||||||
Site: http://github.com/javallone
|
Site: http://gitlab.com/javallone
|
||||||
Twitter: @javallone
|
Twitter: @javallone
|
||||||
|
|
||||||
# THANKS
|
# THANKS
|
||||||
|
|||||||
@@ -181,9 +181,12 @@ export default class Regexper {
|
|||||||
try {
|
try {
|
||||||
context.drawImage(loader, 0, 0, loader.width, loader.height);
|
context.drawImage(loader, 0, 0, loader.width, loader.height);
|
||||||
canvas.toBlob(blob => {
|
canvas.toBlob(blob => {
|
||||||
|
try {
|
||||||
window.pngBlob = blob;
|
window.pngBlob = blob;
|
||||||
this.downloadPng.href = URL.createObjectURL(window.pngBlob);
|
this.downloadPng.href = URL.createObjectURL(window.pngBlob);
|
||||||
this.links.className = this.links.className.replace(/\bhide-download-png\b/, '');
|
this.links.className = this.links.className.replace(/\bhide-download-png\b/, '');
|
||||||
|
}
|
||||||
|
catch(e) {}
|
||||||
}, 'image/png');
|
}, 'image/png');
|
||||||
}
|
}
|
||||||
catch(e) {}
|
catch(e) {}
|
||||||
|
|||||||
Reference in New Issue
Block a user