Commit Graph

66 Commits

Author SHA1 Message Date
Michael Van Der Velden
97dd535934 Decrease optipng level (#2143)
After seeing the following graph [here](http://sweetme.at/2013/09/11/how-to-maximize-png-image-compression-with-optipng/) we decided to test optimsation level 2 for OptiPNG instead of 7. This is because, acording to the graph we would notice no real difference in avarage file size but would notice a speed increase with our builds.

![image](https://user-images.githubusercontent.com/9092863/50760280-39a7c480-125f-11e9-9bd6-d28171289abe.png)

After testing , we noticed our theme build go from a build time of over 10 mins (just on the 94% asset optimisation step) to an avarage of `150.75s`. All the while, we only gained 10-15kb per png file which we believe more than reasonable for a build speed increase of this magnatude.
2019-01-15 01:03:38 -08:00
Matt Mirus
cf1aa77582 Fix no-extra-semi 2018-11-26 20:40:17 -05:00
Ben Word
8bcee54008 Merge pull request #2080 from tormjens/patch-1
Dispatch event when firing routes
2018-11-16 12:13:34 -07:00
Ben Word
d88548cb4a Double quotes for styles 2018-11-16 11:41:47 -07:00
Ben Word
592f78f24d Merge branch 'master' into normalize-quotes 2018-11-16 11:34:28 -07:00
Ben Word
4e44cb3c17 Merge pull request #2120 from roots/webpack-preset-note
Add note regarding webpack.config.preset.js usage
2018-11-15 16:12:44 -06:00
Nathan Knowler
07924269cd Fix SAGE_DIST_PATH example path
Needs the trailing slash.
2018-11-07 16:19:19 -07:00
Nathan Knowler
918c9992d2 Add note regarding webpack.config.preset.js usage
See #2119
2018-10-19 09:49:31 -06:00
Ben Word
e1d70b90ef Update comment [ci skip] 2018-09-17 11:09:24 -06:00
MWDelaney
a8838f486b Workaround for Bootstrap incompatibility with webpack. Fixes #2017 2018-09-17 10:17:14 -04:00
Lubomir Georgiev
ab23669164 UglifyJs: Change the ecma option from 8 to 5 2018-08-14 17:23:15 +03:00
Nathan Knowler
b3f046ddfa Use smartStrategy to replace loaders with preset (#2084)
Using `merge.smartStrategy` with `'module.loaders' = 'replace'` to load
the preset config allows presets to override the the default webpack
config. This is necessary for the coming Tailwind preset which requires
`resolve-url-loader` and source maps to be disabled.
2018-08-11 19:32:19 -07:00
Ben Word
104e4c93f4 Merge pull request #2081 from kukac7/patch-2
missing semicolon
2018-08-09 15:11:47 -06:00
Nathan Knowler
9cce28990f Add support for preset specific Webpack config (#2083) 2018-07-17 10:58:16 -07:00
béla
fe6875f0ed missing semicolon 2018-07-02 00:22:37 +02:00
Tor Morten Jensen
e3541fb445 Fix comma dangle lint error 2018-06-20 14:50:43 +02:00
Tor Morten Jensen
dbabd4387a Rename to event 2018-06-20 14:48:28 +02:00
Tor Morten Jensen
ede8c3177b Dispatch event when firing routes
It is especially neat when importing the scripts from the parent theme in a child theme. In one of my themes I do it like this:

```js
// routes.js
import home from './routes/home'

export default {
    home: {
      init() {
        console.log('Home route fired.')
      }
    }
}
```

  ```js
// main.js
/**
 * Parent Themes Script
 */
import '../../../../core-theme/resources/assets/scripts/main';

/**
 * Internal modules
 */
import routes from './routes'

/**
 * Hook in to the parent themes router
 */
document.addEventListener('routed', e => {
  let route = e.detail.route,
    fn = e.detail.fn;

  if (routes[route] && typeof routes[route][fn] === 'function') {
    routes[route][fn]();
  }
});
```
2018-06-20 14:08:10 +02:00
Jason Baciulis
e8748173d9 Add uglifyjs plugin (#2070)
* Add uglifyjs plugin and replace -p flag with --env.production
* Add uglifyjs plugin
* Configure UglifyJsPlugin to drop console and prevent eslint error
* Turn off no-console rule because uglifyjs plugin drops it in prod
2018-06-16 08:33:41 -07:00
Nathan Knowler
04362989b6 Add missing trailing commas in f4d8342
Forgot to lint.
2018-06-09 10:34:55 -06:00
Nathan Knowler
33c81a9c72 Run autoprefixer before minification 2018-06-09 09:49:34 -06:00
Nathan Knowler
f4d834214a Enable source comments in Sass 2018-06-09 09:49:08 -06:00
Rhys Braunschweig
a9331c54b3 Normalize and enforce single quotes in styles
- Replace stylelint property in package.json with .stylelintrc.js
- Add string-quotes stylelint rule
- Fix quotes
2018-05-29 12:12:21 +02:00
Rhys Braunschweig
175066e992 Normalize and enforce single quotes in scripts
- Add quotes and semi rules to ESLint
- Fix quotes and semicolons
2018-05-29 12:11:44 +02:00
Henning Orth
ecf1a237c1 Fix travis CI build error (missing trailing comma) 2018-05-28 16:50:49 +02:00
Henning Orth
107747f4a8 Tweaked SVGO settings
Disable removal of the SVG viewBox by default to improve compatibility. See this Discourse thread: https://discourse.roots.io/t/svg-size-change-upon-yarn-build-production/12320
2018-05-28 16:44:12 +02:00
Ben Word
e6c7d53bbc Auto-detect scheme 2018-04-25 15:37:28 -06:00
Ben Word
cd32145f08 Merge pull request #2032 from juniorgarcia/master
Added support to .otf fonts
2018-04-25 12:07:12 -06:00
Michael W. Delaney
72d5c876ec New Sage primary purple 2018-04-12 20:40:22 -04:00
Harry Green
0c1eaa06ef Fix default SVG optimisation configuration 2018-03-19 21:42:47 +00:00
Júnior Garcia
6b2acff9f4 Added support to .otf fonts 2018-02-19 21:35:58 -03:00
Ben Word
3d347dd85a Delete .eslintrc
https://discourse.roots.io/t/console-log-sage-9-eslint/10316/6
2017-12-14 23:04:44 -07:00
Andrew Luca
640e865311 Remove some Bower traces 2017-12-11 13:32:32 +02:00
Ben Word
15b19d7c09 Change .dev to .test for default local dev TLD per https://github.com/roots/trellis/pull/923 2017-11-18 17:40:46 -07:00
mwdelaney
cb3cc33128 Bootstrap function in _variables.scss to play nice with other frameworks 2017-11-13 16:59:29 -05:00
Michael W. Delaney
5346177700 Move variables and Bootstrap imports to autoload 2017-11-13 16:10:39 -05:00
Michael W. Delaney
09e4829f29 Remove explicit Bootstrap lines 2017-11-13 16:10:01 -05:00
mwdelaney
ab6485eca2 Example $theme-color 2017-11-13 12:44:54 -05:00
Michael W. Delaney
507cc847ca Update main.scss 2017-11-13 12:29:54 -05:00
DieGOs
b9015dec66 Update config.json (#1963)
Remove old watch path to controllers
2017-08-31 14:05:59 -07:00
Ben Word
921d0cc1a8 Add friendly-errors-webpack-plugin (#1961) 2017-08-23 09:50:59 -07:00
Michael W. Delaney
33776e9317 Update webpack.config.js (#1946) 2017-08-12 01:34:44 -07:00
Ben Word
d208fa4b4e 👀 2017-08-11 18:12:25 -06:00
Ben Word
ce754b88df BS4 now requires Popper 2017-08-11 17:59:18 -06:00
Ben Word
505fa357a7 Bootstrap 4 Beta, Sage 9.0.0-beta.4 2017-08-11 17:36:19 -06:00
QWp6t
78473e2fc9 Fix tyop 2017-07-10 04:32:03 -07:00
afbaf8fb2e Update webpack 3.1.0 et al 2017-07-09 07:28:28 -07:00
a83a10ce69 Add config and controllers to BS watch 2017-07-09 07:11:57 -07:00
caea9aa3fd (CS)Add missing trailing comma 2017-07-01 19:48:51 -07:00
Jan Grzegorowski
a429115fb2 Pass config.open to browsersync-webpack-plugin 2017-07-01 19:39:12 -07:00