Contributions and suggestions are very welcome and wanted. I try to respond to pull requests within 48 hours. To contribute simply
-
Fork the repository.
-
Open your extensions folder by selecting
Help > Show Extensions Folderin Brackets -
Clone your forked repository inside the
userfolder in the folder from step 2git clone https://github.com/YOUR-USERNAME/adobe-brackets-encode-decode cd adobe-brackets-encode-decodeResources:
-
Setup the development environment
npm installResources:
-
Make the fix or add features to
src/main.js. (See detailed instructions below)Detailed Instructions: How to add a new encoder or decoder
In order to keep the code clean and readable, implement the encoders/decoders in the `src/convertors` folder, as a RequireJS module:/** * File: YourFormat.js * Author: Your Name <your@email.com> * Description: Encodes and decodes String <--> YourFormat */ define(function(require, exports) { const encodeToYourFormat = (input) => { //write your decoding implementation here return result; // result must be a String }; const decodeFromYourFormat = (input) => { //write your encoding implementation here return result; // result must be a String }; exports.encodeToYourFormat = encodeToYourFormat; exports.decodeFromYourFormat = decodeFromYourFormat; });Import the module to
src/main.jsand register it using the following format:const encodeToYourFormat = require('convertors/YourFormat').encodeToYourFormat; const encodeFromYourFormat = require('convertors/YourFormat').encodeFromYourFormat;Register your encoder/decoder with the Context Menu, by adding it to
const ENCODERS_DECODERSin the following format:const ENCODERS_DECODERS = [{ title: 'YourFormat', encodeTitle: 'String to YourFormat', //optional encoder: encodeToYourFormat, //The encoder function you imported decodeTitle: 'YourFormat to String', //optional decoder: decodeFromYourFormat, //The encoder function you imported. If there is non, set value as 'null' }Compile the extension to use/test it in Brackets using
npm run buildRestart Brackets via
Debug > Reload With Extensionsto see your changes.To debug problems, use
Debug > Show Developer Tools. You can use console.log(), set breakpoints, etc.Resources:
-
Before committing your work, remember to run
npm test
to make sure there are no build or lint errors. If you are having issues with eslint errors, such as CRLF or LF or indentation, try the following
-
Consider using EditorConfig. (This contains a
.editorconfig) -
Run the command
npm run-script lintfixoreslint --fix src/main.js
-
Sync your fork to make sure you have the latest changes.
# Fetch upstream master and merge with your repo's master branch git fetch upstream git checkout master git merge upstream/master # If there were any new commits, rebase your development branch git checkout newfeature git rebase masterResources:
-
Create a pull request.
Resources:
-
Wait for the maintainer to respond.
Thank you for you for your awesome contribution :-)