{"id":20143908,"url":"https://github.com/sakalx/encrypt","last_synced_at":"2026-05-11T11:34:37.865Z","repository":{"id":57225182,"uuid":"136546928","full_name":"sakalx/encrypt","owner":"sakalx","description":"Encrypt project or file via gulp","archived":false,"fork":false,"pushed_at":"2018-06-08T14:01:27.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T07:16:30.614Z","etag":null,"topics":["encrypt","encryption","encryptor","gulp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sakalx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-08T00:49:11.000Z","updated_at":"2020-04-09T16:22:11.000Z","dependencies_parsed_at":"2022-08-24T11:00:14.270Z","dependency_job_id":null,"html_url":"https://github.com/sakalx/encrypt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakalx%2Fencrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakalx%2Fencrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakalx%2Fencrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakalx%2Fencrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sakalx","download_url":"https://codeload.github.com/sakalx/encrypt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587912,"owners_count":19986627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encrypt","encryption","encryptor","gulp"],"created_at":"2024-11-13T22:07:29.794Z","updated_at":"2026-05-11T11:34:37.832Z","avatar_url":"https://github.com/sakalx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Encryption for file, folders or whole project via gulp\n\n### Instaling:\n\u003e npm i encryption-gulp -D\n ________________________________________________________\n ________________________________________________________\n\n#### Props\n\n| Name | Type | Default | Description |\n| --- | --- | --- | --- |\n| **password** | `string` | *password* | you secret password for encrypting / decrypting  |\n| **decrypt** | `boolean` | *false* | is should do decryption |\n\n ________________________________________________________\n ________________________________________________________\n\n### Usage encryption for one file\n\n in your gulpfile.js:\n ```javascript\nconst gulp = require('gulp');\nconst encryption = require('encryption-gulp');\n\ngulp.task('encrypt', function() {\n  gulp.src('src/index.js')\n    .pipe(encryption({\n      password: 'password',\n      decrypt: false,\n    }))\n    .pipe(gulp.dest('dist-enc'));\n});\n\n ```\n\n### Usage encryption for whole project\n\n ```javascript\nconst gulp = require('gulp');\nconst encryption = require('encryption-gulp');\n\ngulp.task('encrypt', function() {\n  gulp.src('src/**/*')\n    .pipe(encryption({\n      password: 'password',\n      decrypt: false,\n    }))\n    .pipe(gulp.dest('dist-enc'));\n});\n ```\n\n### Usage decryption\n\n just need set `decrypt: true`\n ```javascript\nconst gulp = require('gulp');\nconst encryption = require('encryption-gulp');\n\ngulp.task('decryption', function() {\n  gulp.src('dist-enc/index.js')\n    .pipe(encryption({\n      password: 'password',\n      decrypt: true,\n    }))\n    .pipe(gulp.dest('src-dec'));\n});\n ```\n________________________________________________________\n________________________________________________________\n \u003e One more example, **all together now**\n  ```javascript\n  const gulp = require('gulp');\nconst encryption = require('encryption-gulp');\n\nconst KEY = require('./KEY');\n\nconst path = {\n  decrypted: 'src-decrypted',\n  encrypted: 'src-encrypted',\n};\n\nconst pathSrc = {\n  assets: ['src/**/*', '!src/**/*.js'],\n  js: 'src/**/*.js',\n};\n\nconst pathEncrypt = {\n  assets: [`${path.encrypted}/**/*`, `!${path.encrypted}/**/*.js`],\n  js: `${path.encrypted}/**/*.js`,\n};\n\nconst encrypt = (pathIn, pathOut, decrypt) =\u003e {\n  gulp.src(pathIn)\n    .pipe(encryption({\n      password: KEY,\n      decrypt: decrypt,\n    }))\n    .pipe(gulp.dest(pathOut));\n};\n\nconst assets = (pathIn, pathOut) =\u003e {\n  gulp.src(pathIn)\n    .pipe(gulp.dest(pathOut));\n};\n\ngulp.task('addAssetsSrc', () =\u003e assets(pathSrc.assets, path.encrypted));\ngulp.task('addAssetsEncrypt', () =\u003e assets(pathEncrypt.assets, path.decrypted));\n\ngulp.task('encrypting', ['addAssetsSrc'], () =\u003e encrypt(pathSrc.js, path.encrypted, false));\ngulp.task('decrypting', ['addAssetsEncrypt'], () =\u003e encrypt(pathEncrypt.js, path.decrypted, true));\n  ```\n\n________________________________________________________\n________________________________________________________\nIf you have any issue go here\n**[ISSUES](https://github.com/sakalx/encrypt/issues)**\n ________________________________________________________\n ________________________________________________________\nLicense\n----\n\nMIT\n\n**Free, Hell Yeah! 😈**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakalx%2Fencrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsakalx%2Fencrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakalx%2Fencrypt/lists"}