16 Commits
13 changed files with 2949 additions and 127 deletions

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
{
"projects": {
"default": "regexper"
},
"targets": {
"regexper": {
"hosting": {
"production": [
"regexper"
],
"preview": [
"regexper-preview"
]
}
}
}
}
+2
View File
@@ -3,3 +3,5 @@ node_modules
build
docs
tmp
.firebase/
firebase-debug.log
+73
View File
@@ -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 -1
View File
@@ -1,4 +1,4 @@
# Regexper [![Build Status](https://travis-ci.org/javallone/regexper-static.svg?branch=master)](https://travis-ci.org/javallone/regexper-static)
# Regexper
Code for the http://regexper.com/ site.
+12
View File
@@ -0,0 +1,12 @@
{
"hosting": [
{
"target": "production",
"public": "build"
},
{
"target": "preview",
"public": "build"
}
]
}
+12
View File
@@ -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",
"changes": [
+10 -6
View File
@@ -1,11 +1,15 @@
{{#if gaPropertyId}}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
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');
if (navigator.doNotTrack !== '1' && window.doNotTrack !== '1') {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
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('send', 'pageview');
ga('create', '{{{gaPropertyId}}}', 'auto');
ga('send', 'pageview');
} else {
console.log('Google Analytics disabled by "Do Not Track"');
}
</script>
{{/if}}
+1 -1
View File
@@ -35,7 +35,7 @@
<a class="inline-icon" href="/documentation.html">{{icon "#document"}}Documentation</a>
</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>
</ul>
</nav>
+13 -4
View File
@@ -1,8 +1,17 @@
{{#if sentryKey}}
<script src="https://cdn.ravenjs.com/3.17.0/raven.min.js" crossorigin="anonymous"></script>
<script>
Raven.config('{{{sentryKey}}}', {
whitelistUrls: [/https:\/\/(.*\.)?regexper\.com/]
}).install()
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/]
}
};
(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>
{{/if}}
+1
View File
@@ -26,6 +26,7 @@
"docco": "^0.7.0",
"extract-loader": "^1.0.0",
"file-loader": "^0.11.2",
"firebase-tools": "^6.2.2",
"folder-toc": "^0.1.0",
"gulp": "^3.8.10",
"gulp-connect": "^5.0.0",
+1 -1
View File
@@ -4,7 +4,7 @@
# TEAM
Creator: Jeff Avallone
Site: http://github.com/javallone
Site: http://gitlab.com/javallone
Twitter: @javallone
# THANKS
+6 -3
View File
@@ -181,9 +181,12 @@ export default class Regexper {
try {
context.drawImage(loader, 0, 0, loader.width, loader.height);
canvas.toBlob(blob => {
window.pngBlob = blob;
this.downloadPng.href = URL.createObjectURL(window.pngBlob);
this.links.className = this.links.className.replace(/\bhide-download-png\b/, '');
try {
window.pngBlob = blob;
this.downloadPng.href = URL.createObjectURL(window.pngBlob);
this.links.className = this.links.className.replace(/\bhide-download-png\b/, '');
}
catch(e) {}
}, 'image/png');
}
catch(e) {}
+2800 -111
View File
File diff suppressed because it is too large. Load diff