Code Monkey home page Code Monkey logo

Comments (3)

es128 avatar es128 commented on July 18, 2024 2

Optimizer plugins are not enabled by default because they are not usually
desired during a typical development workflow. The most common way to
activate them is by using the --production/-P CLI switch.

brunch build -P
brunch watch -P

On Saturday, May 17, 2014, Joseph Silvestre [email protected]
wrote:

Hello,

I'm running into a problem: I recently wanted to compress my JS files so I
installed the plugin. Apparently, it's not working for some reason (same
thing with brunch-clean-css). Could you please open my eyes on what I am
doing wrong, please?

Here is my package.json

{
"dependencies": {
"javascript-brunch": "1.7.1",
"css-brunch": "1.7.0",
"coffee-script-brunch": "1.8.0",
"stylus-brunch": "1.8.0",
"jade-brunch": "1.8.1",
"uglify-js-brunch": "1.7.7",
"clean-css-brunch": "1.7.1",
"coffeelint-brunch": "1.7.0"
}}

And my config.coffee:

module.exports.config =
files:
javascripts:
joinTo:
'javascripts/app.js': /^app/
'javascripts/vendor.js': /^vendor/
order:
# Files in vendor directories are compiled before other files
# even if they aren't specified in order.
before: [
'vendor/scripts/jquery-1.11.0.js'
'vendor/scripts/underscore-1.5.2.js'
'vendor/scripts/backbone-1.1.0.js'
'vendor/scripts/backbone.babysitter.js'
'vendor/scripts/backbone.projections.js'
]

    stylesheets:
        joinTo: 'stylesheets/app.css'
        order:
            before: ['vendor/styles/normalize.css']
            after: ['vendor/styles/helpers.css']

    templates:
        defaultExtension: 'jade'
        joinTo: 'javascripts/app.js'

plugins:
    uglify:
        mangle: false
        compress:
            global_defs:
                DEBUG: false
    cleancss:
        keepSpecialComments: 0
        removeEmpty: true

I think this could come from the fact I'm using Coffee to write JS and
Stylus to write CSS (for clean-css' case) but I didn't manage to 1°) be
100% sure it's the reason 2°) found a solution for that.

Thank you in advance!


Reply to this email directly or view it on GitHubhttps://github.com//issues/22
.

from terser-brunch.

justingosan avatar justingosan commented on July 18, 2024 1

The command is now

brunch build -p
brunch watch -p

-P is for mapping ports

from terser-brunch.

jsilvestre avatar jsilvestre commented on July 18, 2024

Thank you very much, I didn't know about it (nor found anything about it) ! This is now much faster :)

from terser-brunch.

Related Issues (19)

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.