Commit Graph

2176 Commits

Author SHA1 Message Date
Tor Morten Jensen
8f039f1944 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
fd2a94fa1b 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
Ben Word
093b5a6500 Merge pull request #2078 from knowler/enable-sass-comments
Enable Sass comments and run prefixing before minification
2018-06-11 11:05:12 -06:00
Nathan Knowler
4a9094b12d Add missing trailing commas in 2f51b51
Forgot to lint.
2018-06-09 10:34:55 -06:00
Nathan Knowler
405aedfb13 Run autoprefixer before minification 2018-06-09 09:49:34 -06:00
Nathan Knowler
2f51b51c95 Enable source comments in Sass 2018-06-09 09:49:08 -06:00
Ben Word
987a1d8bb2 Merge pull request #2075 from E-VANCE/master
Proposal: Set removeViewBox to 'false' in webpack's optimization settings
2018-05-28 19:20:06 -06:00
Henning Orth
9dd101f56c Fix travis CI build error (missing trailing comma) 2018-05-28 16:50:49 +02:00
Henning Orth
d1c8a2eee7 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
ab3763856e Merge pull request #2068 from kimhf/template-admin-compatibility
Make template() compatible with wp admin
2018-05-10 09:02:30 -06:00
Kim Helge Frimanslund
9a4b81c43a Make template() compatible with wp admin 2018-05-06 13:42:31 +02:00
Ben Word
b1f645b825 Merge pull request #2066 from roots/9.0.1
9.0.1
2018-04-30 12:52:11 -06:00
Ben Word
b6f89bf652 9.0.1 2018-04-30 12:44:52 -06:00
Ben Word
29f4b2fc62 Merge pull request #2065 from roots/bootstrap-4.1.1
Update to Bootstrap 4.1.1
2018-04-30 12:42:32 -06:00
Ben Word
82618b7441 Update to Bootstrap 4.1.1 2018-04-30 12:33:53 -06:00
Ben Word
fa6e6f93a3 Merge pull request #2063 from valentinocossar/remove-whitespace
Remove useless whitespace
2018-04-30 08:11:51 -06:00
Valentino Cossar
b08db80c7b Remove useless whitespace 2018-04-27 15:50:26 +02:00
Ben Word
8d001c7571 Merge pull request #2062 from roots/auto-detect-proxyurl-scheme
Auto-detect proxyUrl scheme
2018-04-25 15:57:46 -06:00
Ben Word
922ed72ad9 Auto-detect scheme 2018-04-25 15:37:28 -06:00
Ben Word
571c49f698 Close #2028 - Increase priority on comments_template filter 2018-04-25 12:18:52 -06:00
Ben Word
061d3ad700 Merge pull request #1980 from dmgawel/patch-1
Update template hierarchy
2018-04-25 12:16:01 -06:00
Ben Word
8df602fb50 Remove Font Awesome reference [ci skip] 2018-04-25 12:09:14 -06:00
Ben Word
ef28dae253 Merge pull request #2032 from juniorgarcia/master
Added support to .otf fonts
2018-04-25 12:07:12 -06:00
Ben Word
9834098dd1 Merge pull request #2061 from roots/laravel-5.6
Bump to Laravel 5.6
2018-04-25 12:05:01 -06:00
Ben Word
5103f511c6 Bump sage-lib 2018-04-25 11:54:08 -06:00
Ben Word
77e7ce0c64 Close #1962 - Bump to Laravel 5.6 2018-04-25 11:50:58 -06:00
Ben Word
fb7dabe369 Merge pull request #2060 from ttamnedlog/remove-php-shorthand
Remove php blade shorthand
2018-04-22 22:11:56 -06:00
Matt Golden
d44a6b0332 Remove php blade shorthand 2018-04-18 19:20:06 -05:00
Ben Word
9d5de7db39 Stable vs dev install messaging, ref https://github.com/roots/docs/issues/140 [ci skip] 2018-04-12 20:10:43 -06:00
Ben Word
c60bf29dc2 Update some dependencies 2018-04-12 19:56:22 -06:00
Ben Word
8d8b158ad4 Merge pull request #2056 from roots/bootstrap-4.1.0
Bootstrap 4.1.0
2018-04-12 19:46:05 -06:00
Ben Word
de1796e1b6 Update CHANGELOG [ci skip] 2018-04-12 19:44:28 -06:00
Ben Word
cdc49cbf86 Bootstrap 4.1.0 2018-04-12 19:39:22 -06:00
Ben Word
8766826f17 Remove run 👀 [ci skip] 2018-04-12 19:27:31 -06:00
Ben Word
9947b1d591 Merge pull request #2055 from MWDelaney/master
New Sage primary purple
2018-04-12 19:08:59 -06:00
Michael W. Delaney
d3267f06d7 New Sage primary purple 2018-04-12 20:40:22 -04:00
Ben Word
ffad63566a Merge pull request #2048 from chancestrickland/master
Update node-sass
2018-03-29 00:24:59 -06:00
Charalambos Poulikidis
be1b8887f4 changed inline @php directive to full form (#2042)
closes #2012
2018-03-27 15:38:28 -07:00
chance
c59b373c27 upgrade node-sass 2018-03-27 08:42:27 -05:00
Ben Word
f2c47cf41b Merge pull request #2044 from HJGreen/svgo-configuration
Fix default SVG optimisation configuration
2018-03-19 16:57:35 -06:00
Harry Green
0c11974859 Fix default SVG optimisation configuration 2018-03-19 21:42:47 +00:00
Ben Word
ea76b61cd5 Merge pull request #2037 from roots/php-7.1
PHP 7.1+ is now required
2018-03-13 22:47:56 -06:00
Ben Word
8088207e75 PHP 7.1.3+ [ci skip] 2018-03-13 22:47:14 -06:00
Ben Word
8096f74a7a PHP 7.1+ is now required 2018-03-06 18:40:13 -07:00
Ben Word
808e37a085 Force 5.4.27 version of illuminate/support 2018-03-06 15:31:05 -07:00
Ben Word
a4a19a5375 Force 5.4 versions of illuminate/support 2018-03-06 14:32:52 -07:00
Ben Word
c5a1782c50 Update Composer dependencies 2018-03-06 14:11:50 -07:00
Ben Word
0c53b57ffd Merge pull request #2033 from roots/sponsors
Add sponsors
2018-02-21 09:16:33 -07:00
Ben Word
a62cb8be04 Add sponsors [ci skip] 2018-02-20 19:33:41 -07:00
Júnior Garcia
393215507d Added support to .otf fonts 2018-02-19 21:35:58 -03:00