Add deploy script, remove compiled assets
2
.gitignore
vendored
@@ -1,6 +1,8 @@
|
||||
# exclude everything by default (this is a CMS!), and whitelist the safe stuff
|
||||
/*
|
||||
packed
|
||||
node_modules
|
||||
conf.json
|
||||
!.gitattributes
|
||||
!.gitignore
|
||||
!/plugins
|
||||
|
||||
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 122 KiB |
@@ -1 +0,0 @@
|
||||
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,u){for(var a,i,f,l=0,s=[];l<t.length;l++)i=t[l],o[i]&&s.push(o[i][0]),o[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(r&&r(t,c,u);s.length;)s.shift()();if(u)for(l=0;l<u.length;l++)f=n(n.s=u[l]);return f};var t={},o={1:0};n.e=function(e){function r(){a.onerror=a.onload=null,clearTimeout(i);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var t=o[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var c=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=c;var u=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,n.nc&&a.setAttribute("nonce",n.nc),a.src=n.p+""+e+"."+{0:"1717466bc1b4ebf6a218"}[e]+".js";var i=setTimeout(r,12e4);return a.onerror=a.onload=r,u.appendChild(a),c},n.m=e,n.c=t,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n.oe=function(e){throw console.error(e),e}}([]);
|
||||
|
Before Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 254 KiB |
@@ -1 +0,0 @@
|
||||
webpackJsonp([0],[function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var c=t(1);t.n(c)},function(e,n){}],[0]);
|
||||
41
themes/godotengine/deploy.js
Normal file
@@ -0,0 +1,41 @@
|
||||
var copy = require('scp2');
|
||||
var SSH = require('simple-ssh');
|
||||
var fs = require('fs');
|
||||
var conf = JSON.parse(fs.readFileSync('conf.json', 'utf8')).conf;
|
||||
|
||||
var baseurl = '/home/godotengine/godotengine.org-web/htdocs/themes/godotengine/assets'
|
||||
|
||||
// Copy css
|
||||
copy.scp('./assets/packed/', `${conf.user}:${conf.password}@${conf.host}:${baseurl}/packed/`, function(err) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
} else {
|
||||
console.log('Copy success');
|
||||
changePermissions();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// Handle any tasks that need to be done on remote
|
||||
var ssh = new SSH({
|
||||
host: conf.host,
|
||||
user: conf.user,
|
||||
pass: conf.password
|
||||
});
|
||||
|
||||
function changePermissions () {
|
||||
ssh.exec(`chmod g+rwx ${baseurl}/packed/*`, {
|
||||
out: function(stdout) {
|
||||
console.log(stdout);
|
||||
}}).start();
|
||||
ssh.exec(`chmod g+rwx ${baseurl}/packed`, {
|
||||
out: function(stdout) {
|
||||
console.log(stdout);
|
||||
},
|
||||
err: function(stderr) {
|
||||
console.log(stderr);
|
||||
}
|
||||
|
||||
}).start();
|
||||
}
|
||||
|
||||
7
themes/godotengine/example_conf.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"conf": {
|
||||
"user": "user",
|
||||
"host": "host",
|
||||
"password": "password"
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,8 @@
|
||||
"postcss-loader": "^2.0.6",
|
||||
"resolve-url-loader": "^2.1.0",
|
||||
"sass-loader": "^6.0.6",
|
||||
"scp2": "^0.5.0",
|
||||
"simple-ssh": "^1.0.0",
|
||||
"style-loader": "^0.18.2",
|
||||
"uglifyjs-webpack-plugin": "^0.4.6",
|
||||
"webpack": "^3.5.5",
|
||||
@@ -20,9 +22,12 @@
|
||||
"webpack-dev-server": "^2.7.1",
|
||||
"webpack-merge": "^4.1.0"
|
||||
},
|
||||
"dependencies": {},
|
||||
"dependencies": {
|
||||
"ssh2": "^0.5.5"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.prod.js",
|
||||
"watch": "webpack --watch"
|
||||
"watch": "webpack --watch",
|
||||
"deploy": "node deploy.js"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
module.exports = {
|
||||
entry: './src/index.js',
|
||||
output: {
|
||||
filename: '[name].[chunkhash].js',
|
||||
filename: '[name].app.js',
|
||||
path: path.resolve(__dirname, './assets/packed'),
|
||||
publicPath: ''
|
||||
},
|
||||
|
||||
@@ -165,7 +165,7 @@ asn1.js@^4.0.0:
|
||||
inherits "^2.0.1"
|
||||
minimalistic-assert "^1.0.0"
|
||||
|
||||
asn1@~0.2.3:
|
||||
asn1@~0.2.0, asn1@~0.2.3:
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86"
|
||||
|
||||
@@ -201,6 +201,10 @@ async@^2.1.2, async@^2.1.5, async@^2.4.1:
|
||||
dependencies:
|
||||
lodash "^4.14.0"
|
||||
|
||||
async@~0.9.0:
|
||||
version "0.9.2"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d"
|
||||
|
||||
asynckit@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
|
||||
@@ -1386,6 +1390,17 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@~7.1.1:
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
glob@~7.0.3:
|
||||
version "7.0.6"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a"
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.0.2"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
globby@^6.1.0:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
|
||||
@@ -1765,6 +1780,10 @@ is-utf8@^0.2.0:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
|
||||
|
||||
isarray@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
|
||||
|
||||
isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||
@@ -2032,6 +2051,10 @@ lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.4, lodash@~4.17.4:
|
||||
version "4.17.4"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
|
||||
|
||||
lodash@~4.11.1:
|
||||
version "4.11.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.11.2.tgz#d6b4338b110a58e21dae5cebcfdbbfd2bc4cdb3b"
|
||||
|
||||
loglevel@^1.4.1:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.4.1.tgz#95b383f91a3c2756fd4ab093667e4309161f2bcd"
|
||||
@@ -3027,6 +3050,15 @@ readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable
|
||||
string_decoder "~1.0.3"
|
||||
util-deprecate "~1.0.1"
|
||||
|
||||
readable-stream@~1.0.0:
|
||||
version "1.0.34"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
|
||||
dependencies:
|
||||
core-util-is "~1.0.0"
|
||||
inherits "~2.0.1"
|
||||
isarray "0.0.1"
|
||||
string_decoder "~0.10.x"
|
||||
|
||||
readdirp@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78"
|
||||
@@ -3237,6 +3269,15 @@ schema-utils@^0.3.0:
|
||||
dependencies:
|
||||
ajv "^5.0.0"
|
||||
|
||||
scp2@^0.5.0:
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/scp2/-/scp2-0.5.0.tgz#64ee74bc3685f3a4c6290f2da8c1e3b4eef92e8d"
|
||||
dependencies:
|
||||
async "~0.9.0"
|
||||
glob "~7.0.3"
|
||||
lodash "~4.11.1"
|
||||
ssh2 "~0.4.10"
|
||||
|
||||
scss-tokenizer@^0.2.3:
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1"
|
||||
@@ -3254,7 +3295,7 @@ selfsigned@^1.9.1:
|
||||
dependencies:
|
||||
node-forge "0.6.33"
|
||||
|
||||
"semver@2 || 3 || 4 || 5", semver@^5.3.0:
|
||||
"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0:
|
||||
version "5.4.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
||||
|
||||
@@ -3346,6 +3387,13 @@ signal-exit@^3.0.0:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
|
||||
|
||||
simple-ssh@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/simple-ssh/-/simple-ssh-1.0.0.tgz#b12ec600056c13626cc9a77a50b6b921db39696b"
|
||||
dependencies:
|
||||
ssh2 "^0.5.0"
|
||||
xtend "^4.0.1"
|
||||
|
||||
sntp@1.x.x:
|
||||
version "1.0.9"
|
||||
resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198"
|
||||
@@ -3450,6 +3498,35 @@ sprintf-js@~1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||
|
||||
ssh2-streams@~0.0.22:
|
||||
version "0.0.23"
|
||||
resolved "https://registry.yarnpkg.com/ssh2-streams/-/ssh2-streams-0.0.23.tgz#aeef30831bb5fc4af6aa3f6d0a261a413531612b"
|
||||
dependencies:
|
||||
asn1 "~0.2.0"
|
||||
readable-stream "~1.0.0"
|
||||
streamsearch "~0.1.2"
|
||||
|
||||
ssh2-streams@~0.1.18:
|
||||
version "0.1.19"
|
||||
resolved "https://registry.yarnpkg.com/ssh2-streams/-/ssh2-streams-0.1.19.tgz#f80ececc2de1a39e1aa64469851ec32bc96b83f9"
|
||||
dependencies:
|
||||
asn1 "~0.2.0"
|
||||
semver "^5.1.0"
|
||||
streamsearch "~0.1.2"
|
||||
|
||||
ssh2@^0.5.0, ssh2@^0.5.5:
|
||||
version "0.5.5"
|
||||
resolved "https://registry.yarnpkg.com/ssh2/-/ssh2-0.5.5.tgz#c7781ecd2ece7304a253cf620fab5a5c22bb2235"
|
||||
dependencies:
|
||||
ssh2-streams "~0.1.18"
|
||||
|
||||
ssh2@~0.4.10:
|
||||
version "0.4.15"
|
||||
resolved "https://registry.yarnpkg.com/ssh2/-/ssh2-0.4.15.tgz#07c6f4106d9f7b6ea6e4df636c6c53f1f9817ff8"
|
||||
dependencies:
|
||||
readable-stream "~1.0.0"
|
||||
ssh2-streams "~0.0.22"
|
||||
|
||||
sshpk@^1.7.0:
|
||||
version "1.13.1"
|
||||
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3"
|
||||
@@ -3491,6 +3568,10 @@ stream-http@^2.3.1:
|
||||
to-arraybuffer "^1.0.0"
|
||||
xtend "^4.0.0"
|
||||
|
||||
streamsearch@~0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a"
|
||||
|
||||
strict-uri-encode@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
|
||||
@@ -3510,7 +3591,7 @@ string-width@^2.0.0:
|
||||
is-fullwidth-code-point "^2.0.0"
|
||||
strip-ansi "^4.0.0"
|
||||
|
||||
string_decoder@^0.10.25:
|
||||
string_decoder@^0.10.25, string_decoder@~0.10.x:
|
||||
version "0.10.31"
|
||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
|
||||
|
||||
@@ -3933,7 +4014,7 @@ wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
|
||||
xtend@^4.0.0:
|
||||
xtend@^4.0.0, xtend@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
|
||||
|
||||
|
||||