{"id":18951450,"url":"https://github.com/javascript-obfuscator/gulp-javascript-obfuscator","last_synced_at":"2025-08-20T22:38:17.286Z","repository":{"id":57257982,"uuid":"72003473","full_name":"javascript-obfuscator/gulp-javascript-obfuscator","owner":"javascript-obfuscator","description":"Gulp plugin for javascript-obfuscator package.","archived":false,"fork":false,"pushed_at":"2023-06-05T11:30:08.000Z","size":20,"stargazers_count":103,"open_issues_count":17,"forks_count":37,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T04:04:19.617Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/javascript-obfuscator.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-10-26T13:01:05.000Z","updated_at":"2025-03-20T05:53:29.000Z","dependencies_parsed_at":"2024-01-23T21:28:44.561Z","dependency_job_id":"ada19469-ec48-407b-8dfd-9d6d8a32a919","html_url":"https://github.com/javascript-obfuscator/gulp-javascript-obfuscator","commit_stats":{"total_commits":13,"total_committers":6,"mean_commits":"2.1666666666666665","dds":0.5384615384615384,"last_synced_commit":"4c1acb4e9d8771d230cd97d46b0a3059ceef8d7d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-obfuscator%2Fgulp-javascript-obfuscator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-obfuscator%2Fgulp-javascript-obfuscator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-obfuscator%2Fgulp-javascript-obfuscator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-obfuscator%2Fgulp-javascript-obfuscator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javascript-obfuscator","download_url":"https://codeload.github.com/javascript-obfuscator/gulp-javascript-obfuscator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441049,"owners_count":20939239,"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":[],"created_at":"2024-11-08T13:28:04.033Z","updated_at":"2025-04-06T06:07:19.605Z","avatar_url":"https://github.com/javascript-obfuscator.png","language":"JavaScript","readme":"# gulp-javascript-obfuscator\n\nGulp plugin for [javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator)\n\n## Installation\n\nInstall the package with npm:\n\n```bash\n$ npm install --save gulp-javascript-obfuscator\n```\n\n## Usage\n\n```javascript\nconst gulp = require('gulp');\nconst javascriptObfuscator = require('gulp-javascript-obfuscator');\n\ngulp.src('file.js')\n    .pipe(javascriptObfuscator())\n    .pipe(gulp.dest('dist'));\n```\n\n## Options\n\n[Pass any options available in the obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator#javascript-obfuscator-options)\n\n```javascript\ngulp.src('file.js')\n    .pipe(javascriptObfuscator({\n        compact: true\n    }))\n    .pipe(gulp.dest('dist'));\n```\n\nThe only exception is obfuscator's `sourceMap` option which must not be set, as it will be handled automatically when using `gulp-sourcemaps`.\n\n## Source Maps\n\nWith version `1.1.6` onwards, gulp-javascript-obfuscator can be used in tandem with [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) in order to generate source maps for your javascript files.\n\nYou will need to initialize gulp-sourcemaps prior to running gulp-javascript-obfuscator and write the source maps after, as such:\n\n```javascript\nconst sourcemaps = require('gulp-sourcemaps');\n\ngulp.src('file.js')\n    .pipe(sourcemaps.init())\n    .pipe(javascriptObfuscator({\n        compact: true\n    }))\n    .pipe(sourcemaps.write())\n    .pipe(gulp.dest('dist'));\n```\n\nThis will output a `file.js.map` file to the **dist** directory.\n\nYou can chain other gulp plugins as well:\n\n```javascript\nconst sourcemaps = require('gulp-sourcemaps');\n\ngulp.src('file.js')\n    .pipe(sourcemaps.init())\n    // use babel to pre-process javascript files\n    .pipe(babel({\n        presets: ['@babel/preset-env']\n    }))\n    .pipe(javascriptObfuscator({\n        compact: true\n    }))\n    .pipe(sourcemaps.write())\n    .pipe(gulp.dest('dist'));\n```\n\n### Alternative source maps method\n\nFor backwards compatibility, if `gulp-sourcemaps` is not used and obfuscator's **sourceMap** option is set to **true**, a _.map_ file will be thrown to Gulp stream. ([This method is _deprecated_ and not recommended for future use.](https://github.com/javascript-obfuscator/gulp-javascript-obfuscator/pull/18#backwards-compatibility))\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavascript-obfuscator%2Fgulp-javascript-obfuscator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavascript-obfuscator%2Fgulp-javascript-obfuscator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavascript-obfuscator%2Fgulp-javascript-obfuscator/lists"}