Comments (3)
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 invendor
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.
The command is now
brunch build -p
brunch watch -p
-P
is for mapping ports
from terser-brunch.
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)
- Wrong minified output with a jade template HOT 9
- Need config options with angular HOT 3
- JS minify failed on public/javascripts/app.js: TypeError: Cannot assign to read only property 'except' of [object Object] HOT 20
- Uglify breaks RickShaw HOT 10
- Weird errors when using 'brunch watch' HOT 30
- npm prepublish did not run HOT 1
- TypeError in NPM when using Brunch on Heroku from UglifyMinifier.optimize HOT 43
- Error when using source maps HOT 2
- Copyright notice is always stripped HOT 3
- Fatal error when setting uglify.ignored HOT 2
- Uglify js/json without concatenation (files/javascripts/joinTo) HOT 4
- rename minjs HOT 7
- Fail to compress js builded from typescript HOT 10
- Brunch 2.0 support HOT 1
- Arrow functions / ES6 error ? HOT 2
- Supporting uglify-es? HOT 4
- Can't generate a production build HOT 4
- Optimizing of ../priv/static/js/app.js failed. L12175:31 SyntaxError: Unexpected token: operator (>) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terser-brunch.