16 Commits

Author SHA1 Message Date
Jeff Avallone 8762ad13ab Fixing variable name in CI config 2019-01-08 18:05:14 -05:00
Jeff Avallone b637d7308f Setting up for firebase deployments 2019-01-08 17:58:32 -05:00
Jeff Avallone 767433149e Removing temporary build files 2019-01-01 09:13:24 -05:00
Jeff Avallone 4b1d5591c4 Removing unnecessary variables block 2019-01-01 09:09:07 -05:00
Jeff Avallone 59e5d12882 Setting BUILD_PATH as absolute path 2019-01-01 09:08:39 -05:00
Jeff Avallone 123be01b1f Dropping back to Node 8 2019-01-01 09:03:06 -05:00
Jeff Avallone 881bd299f6 Pinning builds to Node 10 to avoid compatibility issue 2019-01-01 09:01:07 -05:00
Jeff Avallone 4136e95e13 Fixing CI config 2019-01-01 08:55:21 -05:00
Jeff Avallone 3682d4ce81 Adding GitLab CI config to build using pages 2019-01-01 08:51:29 -05:00
Jeff Avallone 539a907076 Removing badges from README 2018-06-06 16:42:40 -04:00
Jeff Avallone 09a62efa7d Updating changelog 2018-06-04 21:15:34 -04:00
Jeff Avallone 5c314662e4 Migrating to GitLab 2018-06-04 21:10:07 -04:00
Jeff Avallone ae3d8b7e18 Updating changelog 2018-05-24 16:52:24 -04:00
Jeff Avallone 186152bb3c Enabling "Do Not Track" support around Google Analytics and Sentry 2018-05-24 16:49:50 -04:00
Jeff Avallone 6638994f83 Getting build working again 2018-05-24 16:49:37 -04:00
Jeff Avallone 9cbd923c1f Ignoring errors when building blob URL for PNG
If it fails, then the link won't be displayed
2018-02-10 14:04:55 -05:00
13 changed files with 2949 additions and 127 deletions
+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": [
+4
View File
@@ -1,5 +1,6 @@
{{#if gaPropertyId}}
<script>
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)
@@ -7,5 +8,8 @@ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
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>
+12 -3
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}}}', {
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/]
}).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>
{{/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
+3
View File
@@ -181,9 +181,12 @@ export default class Regexper {
try {
context.drawImage(loader, 0, 0, loader.width, loader.height);
canvas.toBlob(blob => {
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