Skip to content

Commit

Permalink
Webpack (#33)
Browse files Browse the repository at this point in the history
See flarum/framework#1367

* Replace gulp with webpack and npm scripts for JS compilation
* Set up Travis CI to commit compiled JS
* Restructure `js` directory; only one instance of npm, forum/admin are "submodules"
* Restructure `less` directory
  • Loading branch information
tobyzerner authored Jun 20, 2018
1 parent a033cac commit b9ed19a
Show file tree
Hide file tree
Showing 28 changed files with 4,762 additions and 1,387 deletions.
Binary file added .deploy.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.gitignore export-ignore
.travis.yml export-ignore

js/*/dist/*.js -diff
js/dist/* -diff
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
composer.phar
.DS_Store
Thumbs.db
bower_components
node_modules
node_modules
js/dist/*
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: minimal

sudo: false

cache:
directories:
- $HOME/.npm

jobs:
include:
- stage: build
if: branch = master AND type = push
script: curl -s https://raw.githubusercontent.com/flarum/core/master/.travis/build.sh | bash -s -
-k $encrypted_e5bd9d54e015_key
-i $encrypted_e5bd9d54e015_iv
6 changes: 3 additions & 3 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

return [
(new Extend\Assets('forum'))
->asset(__DIR__.'/js/forum/dist/extension.js')
->asset(__DIR__.'/less/forum/extension.less')
->bootstrapper('flarum/mentions/main'),
->js(__DIR__.'/js/dist/forum.js')
->asset(__DIR__.'/less/forum.less'),

function (Dispatcher $events, Factory $views) {
$events->subscribe(Listener\AddPostMentionedByRelationship::class);
$events->subscribe(Listener\FormatPostMentions::class);
Expand Down
10 changes: 10 additions & 0 deletions js/forum.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

export * from './src/forum';
10 changes: 0 additions & 10 deletions js/forum/Gulpfile.js

This file was deleted.

Loading

0 comments on commit b9ed19a

Please sign in to comment.