lej

laravel-elixir-js-uglify

Uglify js with Laravel Elixir

Showing:

Popularity

Downloads/wk

1

GitHub Stars

5

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

4

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Laravel Elixir Uglify

This package allows you to uglify your javascript files. This is useful when you are loading scripts asynchronously.

Installation

First you need to install this package.

npm install --save-dev laravel-elixir-js-uglify

Then require this package into your gulpfile.js.

var Elixir = require('laravel-elixir');
require('laravel-elixir-js-uglify');

Then call the uglify method from your mix.

The uglify method can take up to four arguments:

  1. src (required): The files to uglify.
  2. outputPath (optional): The output folder (defaults to public/js).
  3. baseDir (optional): The folder in which your js files are stored (defaults to resources/assets/js).
  4. options (optional): Options object passed to the gulp-uglify task.

This task defines a watcher for the path defined in src.

Sample code:

Elixir(function(mix) {
    mix.uglify('**/*.js', 'public/js', 'resources/assets/js');
});

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial