diff --git a/apps/files_trashbin/.l10nignore b/apps/files_trashbin/.l10nignore new file mode 100644 index 0000000000000000000000000000000000000000..3a54fd4ed2c79c2515f9c702c1fd256d60d6194d --- /dev/null +++ b/apps/files_trashbin/.l10nignore @@ -0,0 +1,3 @@ +#webpack bundled files +js/files_trashbin.js +js/files_trashbin.js.map diff --git a/apps/files_trashbin/js/files_trashbin.js b/apps/files_trashbin/js/files_trashbin.js new file mode 100644 index 0000000000000000000000000000000000000000..b0c273fdca91b0a4fea34a7a039f979d4ccee5c7 Binary files /dev/null and b/apps/files_trashbin/js/files_trashbin.js differ diff --git a/apps/files_trashbin/js/files_trashbin.js.map b/apps/files_trashbin/js/files_trashbin.js.map new file mode 100644 index 0000000000000000000000000000000000000000..645377db92d1d0cbe4e5d70e66b966dd904e89ce Binary files /dev/null and b/apps/files_trashbin/js/files_trashbin.js.map differ diff --git a/apps/files_trashbin/list.php b/apps/files_trashbin/list.php index 127e0389815474295b2c53a340b36ccd356f5b83..6b04c64749a5f80ed7c24915f183b3a14f152178 100644 --- a/apps/files_trashbin/list.php +++ b/apps/files_trashbin/list.php @@ -34,7 +34,5 @@ $tmpl = new OCP\Template('files_trashbin', 'index', ''); // gridview not available for ie $tmpl->assign('showgridview', $showgridview && !$isIE); -OCP\Util::addStyle('files_trashbin', 'trash'); -OCP\Util::addScript('files_trashbin', 'app'); -OCP\Util::addScript('files_trashbin', 'filelist'); +OCP\Util::addScript('files_trashbin', 'files_trashbin'); $tmpl->printPage(); diff --git a/apps/files_trashbin/js/app.js b/apps/files_trashbin/src/app.js similarity index 100% rename from apps/files_trashbin/js/app.js rename to apps/files_trashbin/src/app.js diff --git a/apps/files_trashbin/js/filelist.js b/apps/files_trashbin/src/filelist.js similarity index 100% rename from apps/files_trashbin/js/filelist.js rename to apps/files_trashbin/src/filelist.js diff --git a/apps/files_trashbin/src/files_trashbin.js b/apps/files_trashbin/src/files_trashbin.js new file mode 100644 index 0000000000000000000000000000000000000000..59f93e8ee26a237139c384f8cbedac73b152d004 --- /dev/null +++ b/apps/files_trashbin/src/files_trashbin.js @@ -0,0 +1,5 @@ +import './app' +import './filelist' +import './trash.scss' + +window.OCA.Trashbin = OCA.Trashbin diff --git a/apps/files_trashbin/css/trash.scss b/apps/files_trashbin/src/trash.scss similarity index 100% rename from apps/files_trashbin/css/trash.scss rename to apps/files_trashbin/src/trash.scss diff --git a/apps/files_trashbin/webpack.js b/apps/files_trashbin/webpack.js new file mode 100644 index 0000000000000000000000000000000000000000..2261fb08d36f6d010a5c5bcc5017c23d198447e1 --- /dev/null +++ b/apps/files_trashbin/webpack.js @@ -0,0 +1,37 @@ +const path = require('path'); + +module.exports = { + entry: path.join(__dirname, 'src', 'files_trashbin.js'), + output: { + path: path.resolve(__dirname, './js'), + publicPath: '/js/', + filename: 'files_trashbin.js' + }, + module: { + rules: [ + { + test: /\.css$/, + use: ['style-loader', 'css-loader'] + }, + { + test: /\.scss$/, + use: ['style-loader', 'css-loader', 'sass-loader'] + }, + { + test: /\.js$/, + loader: 'babel-loader', + exclude: /node_modules/ + }, + { + test: /\.(png|jpg|gif|svg)$/, + loader: 'file-loader', + options: { + name: '[name].[ext]?[hash]' + } + } + ] + }, + resolve: { + extensions: ['*', '.js'] + } +}; diff --git a/webpack.common.js b/webpack.common.js index 117c619791603c2f388d67057ce2b0df574f0e7b..9a117ba4b3c67be9434ef085f52a4134c07d9af4 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -1,4 +1,5 @@ const core = require('./core/webpack'); +const files_trashbin = require('./apps/files_trashbin/webpack') const oauth2 = require('./apps/oauth2/webpack') -module.exports = [].concat(core, oauth2); +module.exports = [].concat(core, files_trashbin, oauth2);