Git Product home page Git Product logo

adonis-bundler's Introduction

adonis-bundler

Adonis Bundler is the simpliest assets bundler you could ever found for an Adonis application.

It's based on ParcelJS which is a blazing fast, zero configuration web application bundler.

Getting Started

This package should be installed with the Adonis CLI.

$ adonis install adonis-bundler

Then register the Service Provider within your start/app.js file.

const providers = [
  'adonis-bundler/providers/BundlerProvider',
]

You are now ready to go!

Bundle the assets

By default adonis-bundler look at files stored within your resources/assets folder and check for file with the pattern */app.*. That means, all the file within your resource/assets/XXX folder named app.XXX will be bundled.

After creating your assets in the way you want (Less, SCSS, Stylus, ES2015, ...) you simply need to run the command below and the magic will happen.

$ adonis bundle
# adonis bundle --watch -> Watch for change
# adonis bundle --production -> Minify

ParcelJS will automaticaly download packages you need to compiles your assets and will then run them.

Config

The config file is save as config/bundle.js. Make sure to tweak it as per your needs.

The bundler also check for .babelrc, postcss.config.js or whatever file your "language"/"transpiler" used by default to be configured to help you configure your assets the way you want.

FAQ

I want to do X and I cannot do it with this package
You maybe want to do something that is out of the scope of this package. Don't worry, you aren't obligated to use it. This main goal of this package is to provide an easy way to compile assets for 90% of developper. Nothing keeps you from installing Webpack and doing a custom configuration.

Is ParcelJS's plugins working with this package
YES!

How can I create an hash named compiled assets for production caching?
Unfortunately, you cannot for the moment. Some discussions are going on in ParcelJS repository and hopefully this will be possible soon.

adonis-bundler's People

Contributors

romainlanz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

adonis-bundler's Issues

SCSS (Sass) with Autoprefixer

Hey,

Before opening this issue, I did a brief research, but found nothing that could help me.
I'm a little new to Parcel, but I liked the idea of this package (adonis-bundler).

After playing around, I had a question:
Is it possible to compile SCSS and then run an autoprefixer?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.