diff --git a/.gitignore b/.gitignore index 68a97958..b0524983 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,6 @@ yarn-error.log* # typescript *.tsbuildinfo + +# snippet +/public/snippet/ diff --git a/package.json b/package.json index 595ee9aa..9a480b35 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,9 @@ "license": "MIT", "private": true, "scripts": { - "dev": "next dev", - "build": "next build", + "copy-scripts": "mkdir -p public/snippet && cp node_modules/squeak-snippet/dist/squeak.js* public/snippet/", + "dev": "yarn copy-scripts && next dev", + "build": "yarn copy-scripts && next build", "start": "next start", "lint": "next lint", "migrate": "node-pg-migrate" @@ -38,6 +39,7 @@ "react-syntax-highlighter": "^15.4.5", "react-toast-notifications": "^2.5.1", "tinytime": "^0.2.6", + "squeak-snippet": "^0.1.3", "xss": "^1.0.11" }, "devDependencies": { diff --git a/public/snippet/squeak.js b/public/snippet/squeak.js deleted file mode 100644 index 55eebf6b..00000000 --- a/public/snippet/squeak.js +++ /dev/null @@ -1 +0,0 @@ -!function(){var e={503:function(e,t,n){function r(e){var t=o[e];return void 0!==t||(t=o[e]={exports:{}},a[e].call(t.exports,t,t.exports,r)),t.exports}var a,o;e=n.nmd(e),a={757:function(e,t,n){e.exports=n(727)},450:function(e,t,n){var r;!function(){"use strict";function a(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,r,o,i){return a((t=a(a(t,e),a(r,i)))<>>32-o,n)}function i(e,t,n,r,a,i,s){return o(t&n|~t&r,e,t,a,i,s)}function s(e,t,n,r,a,i,s){return o(t&r|n&~r,e,t,a,i,s)}function l(e,t,n,r,a,i,s){return o(t^n^r,e,t,a,i,s)}function u(e,t,n,r,a,i,s){return o(n^(t|~r),e,t,a,i,s)}function c(e,t){e[t>>5]|=128<>>9<<4)]=t;for(var n,r,o,c,f=1732584193,d=-271733879,p=-1732584194,h=271733878,m=0;m>5]>>>r%32&255);return t}function d(e){var t=[];for(t[(e.length>>2)-1]=void 0,r=0;r>5]|=(255&e.charCodeAt(r/8))<>>4&15)+n.charAt(15&t);return r}function h(e){return unescape(encodeURIComponent(e))}function m(e){return f(c(d(e=h(e)),8*e.length))}function g(e,t){e=h(e),t=h(t);var n,r=d(e),a=[],o=[];for(a[15]=o[15]=void 0,16