From 71a346712eb1e569f9006e962d690c01e95e987f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionic=C4=83=20Biz=C4=83u?= Date: Mon, 25 Mar 2024 09:20:41 +0200 Subject: [PATCH] Updated docs --- .github/FUNDING.yml | 4 ++ .gitignore | 4 ++ CONTRIBUTING.md | 75 ++++++++++------------------ DOCUMENTATION.md | 5 ++ README.md | 118 +++++++++++++++++++++++++++++++++++++++----- package-lock.json | 4 +- 6 files changed, 145 insertions(+), 65 deletions(-) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..37f2614 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +github: ionicabizau +patreon: ionicabizau +open_collective: ionicabizau +custom: https://www.buymeacoffee.com/h96wwchmy \ No newline at end of file diff --git a/.gitignore b/.gitignore index 61f2900..2ca2591 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,7 @@ *~ *.log node_modules +*.env +.DS_Store +package-lock.json +.bloggify/* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8c2f5cc..50a8d46 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,66 +1,41 @@ -# :eight_spoked_asterisk: :stars: :sparkles: :dizzy: :star2: :star2: :sparkles: :dizzy: :star2: :star2: Contributing :star: :star2: :dizzy: :sparkles: :star: :star2: :dizzy: :sparkles: :stars: :eight_spoked_asterisk: +# Contributing :star: :star2: :dizzy: -So, you want to contribute to this project! That's awesome. However, before -doing so, please read the following simple steps explaining how to contribute. This will -make life easier and help avoid wasting time on things that are not -requested. :sparkles: +So, you want to contribute to this project? That's awesome! However, before doing so, please read the following simple steps on how to contribute. This will make life easier and avoid wasting time on things that are not requested. ✨ -## Discuss the changes before doing them - - First of all, open an issue in the repository, using the [bug tracker][1], - describing the contribution you would like to make, the bug you found or any - other ideas you have. This will help us to get you started on the right - foot. +## Discuss the changes before making them +To begin, open an issue in the repository using the [bug tracker][1]. Describe the contribution you'd like to make, the bug you've found, or any other ideas you have. This step will help us get you started on the right track. - - If it makes sense, add the platform and software information (e.g. operating - system, Node.JS version etc.), screenshots (so we can see what you are - seeing). +If it is relevant, include platform and software information (e.g., operating system, Node.JS version, etc.) and screenshots to help us understand what you're experiencing. - - It is recommended to wait for feedback before continuing the next steps. - However, if the issue is clear (e.g. a typo) and the fix is simple, you can - continue to fix it. +We recommend waiting for feedback before proceeding to the next steps. However, if the issue is clear, such as a typo, and the fix is simple, you can go ahead and fix it. -## Fixing issues - - Fork the project in your account and create a branch with your fix: - `some-great-feature` or `some-issue-fix`. +## Fixing Issues +Begin by forking the project to your own account, and create a branch for your fix, naming it either `some-great-feature` or `some-issue-fix`. - - Commit your changes in that branch, writing the code following the - [code style][2]. If the project contains tests (generally, the `test` - directory), you are encouraged to add a test as well. :memo: +Commit your changes to that branch, adhering to the [code style][2]. If the project includes tests (usually located in the `test` directory), we encourage you to add a test as well. :memo: - - If the project contains a `package.json` or a `bower.json` file add yourself - in the `contributors` array (or `authors` in the case of `bower.json`; - if the array does not exist, create it): +If the project includes a `package.json` or a `bower.json` file, add yourself to the `contributors` array (or `authors` in the case of `bower.json`). If the array doesn't exist, create it as shown below: - ```json - { - "contributors": [ - "Your Name (http://your.website)" - ] - } - ``` +```json +{ + "contributors": [ + "Your Name (http://your.website)" + ] +} +``` -## Creating a pull request +## Creating a Pull Request +Start by opening a pull request and make sure to reference the initial issue in the pull request message (e.g., *fixes #*). Provide a clear and descriptive title to help everyone understand what is being fixed or improved. - - Open a pull request, and reference the initial issue in the pull request - message (e.g. *fixes #*). Write a good description and - title, so everybody will know what is fixed/improved. +If applicable, consider adding screenshots, gifs, or any other visual aids that can make it easier to understand the changes you've made. - - If it makes sense, add screenshots, gifs etc., so it is easier to see what - is going on. +## Wait for Feedback +Before accepting your contributions, we will review them. You may receive feedback regarding what needs to be addressed in your modified code. If so, simply continue making commits to your branch, and the pull request will be automatically updated. -## Wait for feedback -Before accepting your contributions, we will review them. You may get feedback -about what should be fixed in your modified code. If so, just keep committing -in your branch and the pull request will be updated automatically. - -## Everyone is happy! -Finally, your contributions will be merged, and everyone will be happy! :smile: -Contributions are more than welcome! +## Everyone Is Happy! +Ultimately, your contributions will be merged, and everyone will be delighted! 😄 Contributions are more than welcome! Thanks! :sweat_smile: - - -[1]: https://github.com/Bloggify/rucksack/issues - +[1]: /issues [2]: https://github.com/IonicaBizau/code-style diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 658ff7f..df6bf56 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -8,6 +8,7 @@ Ruckasck Creates a new instance of `Ruckasck`. #### Params + - **Object** `opts`: The Rucksack options. #### Return @@ -17,12 +18,14 @@ Creates a new instance of `Ruckasck`. Watch the CSS paths. #### Params + - **String** `resPath`: The CSS resource path. ### `addCSS(resPath, inline)` Adds a new CSS path. #### Params + - **String** `resPath`: The CSS resource path to add. - **Boolean** `inline`: Whether to add the CSS content inline or not. @@ -30,6 +33,7 @@ Adds a new CSS path. Bundles the JS files. #### Params + - **String** `output`: The output of the JS script. - **Function** `cb`: The callback function. @@ -37,6 +41,7 @@ Bundles the JS files. Bundles the CSS files. #### Params + - **String** `output`: The output of the CSS script. - **Function** `cb`: The callback function. diff --git a/README.md b/README.md index 5540b1b..ae933cf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + @@ -6,28 +7,54 @@ +[![rucksack](http://i.imgur.com/hSPcrjC.png)](#) + -![rucksack](http://i.imgur.com/hSPcrjC.png) # rucksack -JavaScript and CSS bundler. + [![Version](https://img.shields.io/npm/v/rucksack.svg)](https://www.npmjs.com/package/rucksack) [![Downloads](https://img.shields.io/npm/dt/rucksack.svg)](https://www.npmjs.com/package/rucksack) + + + + + + + +> JavaScript and CSS bundler. + + + + + + + + + + + + + -## Installation +## :cloud: Installation ```sh -$ npm i rucksack +# Using npm +npm install --save rucksack + +# Using yarn +yarn add rucksack ``` @@ -38,17 +65,16 @@ $ npm i rucksack -## Example +## :clipboard: Example -```js -"use strict" -const Rucksack = require("..") +```js +const Rucksack = require("rucksack") // Create a new bundler let bundler = new Rucksack({ @@ -77,7 +103,6 @@ bundler.bundleCSS(`${__dirname}/test.css`) bundler.bundleJS(`${__dirname}/test.js`) // => info [Tuesday, November 28, 2017 06:53:48 AM] Bundling the scripts. // => (function e(t,n,r){...}) - ``` @@ -85,18 +110,37 @@ bundler.bundleJS(`${__dirname}/test.js`) -## Documentation + +## :question: Get Help + +There are few ways to get help: + + + + 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question. + 2. For bug reports and feature requests, open issues. :bug: + + + + + + + +## :memo: Documentation + + ### constructor Ruckasck Creates a new instance of `Ruckasck`. #### Params + - **Object** `opts`: The Rucksack options. #### Return @@ -106,12 +150,14 @@ Creates a new instance of `Ruckasck`. Watch the CSS paths. #### Params + - **String** `resPath`: The CSS resource path. ### `addCSS(resPath, inline)` Adds a new CSS path. #### Params + - **String** `resPath`: The CSS resource path to add. - **Boolean** `inline`: Whether to add the CSS content inline or not. @@ -119,6 +165,7 @@ Adds a new CSS path. Bundles the JS files. #### Params + - **String** `output`: The output of the JS script. - **Function** `cb`: The callback function. @@ -126,6 +173,7 @@ Bundles the JS files. Bundles the CSS files. #### Params + - **String** `output`: The output of the CSS script. - **Function** `cb`: The callback function. @@ -137,15 +185,59 @@ Bundles the CSS files. -## How to contribute + + + + + + + + +## :yum: How to contribute Have an idea? Found a bug? See [how to contribute][contributing]. -## License -See the [LICENSE][license] file. + + + + + + + + + + + + + +## :dizzy: Where is this library used? +If you are using this library in one of your projects, add it in this list. :sparkles: + + - `bloggify` + - `bloggify-cli` + - `bloggify-prebuilt` + + + + + + + + + + + +## :scroll: License + +[MIT][license] © [Bloggify][website] + + + + [license]: /LICENSE +[website]: https://bloggify.org [contributing]: /CONTRIBUTING.md [docs]: /DOCUMENTATION.md diff --git a/package-lock.json b/package-lock.json index a543df6..0c7e69d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rucksack", - "version": "6.0.1", + "version": "6.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rucksack", - "version": "6.0.1", + "version": "6.1.0", "license": "MIT", "dependencies": { "@babel/core": "^7.24.3",