mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-11-06 03:06:09 +08:00
Move to using vue-cli-service instead of parcel (2.1MB to 850KB)
This commit is contained in:
@@ -86,11 +86,11 @@ limitations under the License.
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crypto from 'crypto';
|
||||
import clone from 'clone';
|
||||
import { diffLines } from 'diff';
|
||||
import escape from 'escape-html';
|
||||
import deepEqual from 'deep-equal';
|
||||
import createHash from 'create-hash';
|
||||
import Header from 'do-vue/src/templates/header';
|
||||
import Footer from 'do-vue/src/templates/footer';
|
||||
import isChanged from '../util/is_changed';
|
||||
@@ -175,7 +175,7 @@ limitations under the License.
|
||||
if (this.$data.active === index) this.$data.active = this.$data.domains.findIndex(d => d !== null);
|
||||
},
|
||||
hash(content) {
|
||||
return crypto.createHash('sha256').update(content).digest('base64');
|
||||
return createHash('sha256').update(content).digest('base64');
|
||||
},
|
||||
checkChange(oldConf) {
|
||||
// If nothing has changed for a tick, we can use the config files
|
||||
|
||||
@@ -52,7 +52,7 @@ limitations under the License.
|
||||
|
||||
<script>
|
||||
import { pack } from 'tar-stream';
|
||||
import getRawBody from 'raw-body';
|
||||
import getStream from 'get-stream';
|
||||
import { gzip } from 'node-gzip';
|
||||
import copy from 'copy-to-clipboard';
|
||||
import * as Sections from './setup_sections';
|
||||
@@ -116,7 +116,7 @@ limitations under the License.
|
||||
|
||||
// Convert the tar to a buffer and gzip it
|
||||
tar.finalize();
|
||||
const raw = await getRawBody(tar);
|
||||
const raw = await getStream.buffer(tar);
|
||||
return gzip(raw);
|
||||
},
|
||||
async downloadTar() {
|
||||
|
||||
Reference in New Issue
Block a user