-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Intial commit with complete library setup
- Loading branch information
1 parent
bf75d44
commit 57c9bd2
Showing
9 changed files
with
1,276 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"mocha": true, | ||
"es6": true | ||
}, | ||
"parserOptions": { | ||
"arrowFunctions": true, | ||
"ecmaFeatures": true, | ||
"ecmaVersion": 8, | ||
"sourceType": "module" | ||
}, | ||
"extends": "eslint:recommended", | ||
"rules": { | ||
"indent": [2, 2, {"SwitchCase": 1}], | ||
"linebreak-style": ["error", "unix"], | ||
"quotes": ["error", "single"], | ||
"semi": ["error", "always"], | ||
"no-cond-assign": ["error", "always"], | ||
"no-console": "off" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
language: node_js | ||
node_js: | ||
- "node" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Contributing | ||
|
||
### Thanks, for considering to contribute to this repository! | ||
|
||
When contributing to this repository, please first discuss the change you wish to make via issue, | ||
email, or any other method with the owners of this repository before making a change. | ||
|
||
If you are looking forward to start contributing to beautiful world of open source. | ||
**Start it right now.** | ||
|
||
The basic guidelines for contributing are as follows: | ||
- Fork the repo | ||
- Clone the repo | ||
- Create a branch using | ||
- `git checkout -b feature-branch` | ||
- Make the required changes | ||
- Test the changes by using below command | ||
- `yarn` (Installs all the dependencies) | ||
- `yarn test` | ||
- Create a pull request using below commands | ||
- `git add --all` | ||
- `git commit -m "your commit message"` | ||
- `git push origin feature-branch` | ||
- Go to [Repository](https://github.com/arshadkazmi42/firefox-user-directory/) | ||
- Create Pull Request against `master` branch | ||
- Add a suitable title and description to the pull request and tag the issue number in Pull Request description, if the pull request is related to some issue logged here: [Issues](https://github.com/arshadkazmi42/firefox-user-directory/issues) | ||
- You're done. Wait for your code to get reviewed and merged | ||
- Optional: Give us a :star: if you like our work :smile: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,43 @@ | ||
# firefox-user-directory | ||
Get abosulte path of firefox user directory - Crossplatform | ||
|
||
[![Build](https://img.shields.io/travis/com/arshadkazmi42/firefox-user-directory.svg)](https://travis-ci.com/arshadkazmi42/firefox-user-directory/) | ||
|
||
Get firefox user directory crossplatform | ||
|
||
## Install | ||
|
||
``` | ||
npm i firefox-user-directory | ||
``` | ||
|
||
## Usage | ||
|
||
```javascript | ||
|
||
const firefoxUserDirectory = require('firefox-user-directory'); | ||
|
||
const path = firefoxUserDirectory('darwin'); | ||
console.log(path); | ||
|
||
// Output | ||
// /Users/arshad/Library/Application Support/Firefox | ||
|
||
``` | ||
|
||
## API | ||
|
||
- **from(url)** | ||
- Returns domain name from input url | ||
|
||
## Contributing | ||
|
||
Interested in contributing to this project? | ||
You can log any issues or suggestion related to this library [here](https://github.com/arshadkazmi42/firefox-user-directory/issues/new) | ||
|
||
Read our contributing [guide](CONTRIBUTING.md) on getting started with contributing to the codebase | ||
|
||
## Contributors | ||
|
||
Thank you to all the contributors who have helped us in making this project better :raised_hands: | ||
|
||
<a href="https://github.com/arshadkazmi42"><img src="https://github.com/arshadkazmi42.png" width="30" /></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const os = require('os'); | ||
const path = require('path'); | ||
|
||
|
||
module.exports = (platform) => { | ||
switch (platform || os.platform()) { | ||
case 'darwin': | ||
return path.join(process.env.HOME, '/Library/Application Support/Firefox'); | ||
case 'linux': | ||
return path.join(process.env.HOME, '/.mozilla/firefox'); | ||
case 'win32': | ||
return path.join(process.env.APPDATA, '/Mozilla/Firefox'); | ||
default: | ||
throw new Error('Invalid Platform'); | ||
} | ||
}; |
Oops, something went wrong.