Skip to content

Commit

Permalink
docs: change README, CONTRIBUTION and mix config template
Browse files Browse the repository at this point in the history
  • Loading branch information
wahyubucil committed May 18, 2021
1 parent 73c9bf9 commit 1d87b82
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ We love pull requests. And following this guidelines will make your pull request

## Coding style

Majority of AdonisJs core packages are written in Typescript. Having a brief knowledge of Typescript is required to contribute to the core. [Learn more](https://adonisjs.com/docs/contribution-guide#_coding_style) about the same.
AdonisJS packages are written in Typescript. Having a brief knowledge of Typescript is required to contribute. We make use of [standard](https://standardjs.com/) to lint our code. Standard does not need a config file and comes with set of non-configurable rules.

## Fix bugs by creating PR's

Expand All @@ -26,22 +26,20 @@ Go through the following points, before creating a new PR.

1. Create an issue discussing the bug or short-coming in the framework.
2. Once approved, go ahead and fork the REPO.
3. Make sure to start from the `develop`, since this is the upto date branch.
3. Make sure to start from the `develop`, since this is the up to date branch.
4. Make sure to keep commits small and relevant.
5. We follow [conventional-commits](https://github.com/conventional-changelog/conventional-changelog) to structure our commit messages. Instead of running `git commit`, you must run `npm run commit`, which will show you prompts to create a valid commit message.
6. Once done with all the changes, create a PR against the `develop` branch.

## Be a part of community

We welcome you to participate in the [forum](https://forum.adonisjs.com/) and the AdonisJs [discord server](https://discord.me/adonisjs). You are free to ask your questions and share your work or contributions made to AdonisJs eco-system.

We follow a strict [Code of Conduct](https://adonisjs.com/community-guidelines) to make sure everyone is respectful to each other.
We welcome you to participate in the [forum](https://github.com/adonisjs/core/discussions) and the AdonisJS [discord server](https://discord.com/invite/vDcEjq6). You are free to ask your questions and share your work or contributions made to AdonisJS eco-system.

## Other notes

- Do not change version number inside the `package.json` file.
- Do not update `CHANGELOG.md` file.
- Do not update `.eslintrc.json` file. If something prevents you writing code, please create an issue for same.
- If you found an error while committing with `npm run commit` like this `.husky/pre-commit: line 2: .husky/_/husky.sh: No such file or directory`. You need to run : `npx husky install`

## Need help?

Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Adonis Mix Asset
> Laravel Mix for Asset Bundler on AdonisJS v5
> Laravel Mix for Asset Bundler on AdonisJS
[![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url]
[![npm-image]][npm-url] [![license-image]][license-url] [![typescript-image]][typescript-url]

Adonis Mix Asset is an assets bundler based on [Laravel Mix](https://laravel-mix.com) for AdonisJS v5 application.
Adonis Mix Asset is an assets bundler based on [Laravel Mix](https://laravel-mix.com) for AdonisJS application.

[Laravel Mix](https://laravel-mix.com) is an awesome assets bundler and easy to use!

If you need Laravel Mix for AdonisJS version lower than v5 you can use [adonis-mix](https://github.com/deathman92/adonis-mix).

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of contents
Expand Down Expand Up @@ -41,7 +39,7 @@ yarn add adonis-mix-asset && yarn add --dev laravel-mix

### Setup
```bash
node ace invoke adonis-mix-asset
node ace configure adonis-mix-asset
```
It will install the provider, command, and copy `webpack.mix.js` configuration file to the project's root folder.

Expand All @@ -52,7 +50,12 @@ The configuration file is on `webpack.mix.js`.
```js
const mix = require('laravel-mix')

// NOTE: Don't remove this, Because it's the default public folder path on AdonisJS
/**
* By default, AdonisJS public path for static assets is on the `./public` directory.
*
* If you want to change Laravel Mix public path, change the AdonisJS public path config first!
* See: https://docs.adonisjs.com/guides/static-assets#the-default-directory
*/
mix.setPublicPath('public')

// Add your assets here
Expand Down
7 changes: 6 additions & 1 deletion templates/webpack.mix.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const mix = require('laravel-mix')

// NOTE: Don't remove this, Because it's the default public folder path on AdonisJs
/**
* By default, AdonisJS public path for static assets is on the `./public` directory.
*
* If you want to change Laravel Mix public path, change the AdonisJS public path config first!
* See: https://docs.adonisjs.com/guides/static-assets#the-default-directory
*/
mix.setPublicPath('public')

// Add your assets here

0 comments on commit 1d87b82

Please # to comment.