Merge pull request #14141 from nextcloud/enh/trashbin_to_webpack
Move files_trashbin to webpack
This commit is contained in:
commit
3d804ea15d
10 changed files with 51 additions and 4 deletions
3
apps/files_trashbin/.l10nignore
Normal file
3
apps/files_trashbin/.l10nignore
Normal file
|
@ -0,0 +1,3 @@
|
|||
#webpack bundled files
|
||||
js/files_trashbin.js
|
||||
js/files_trashbin.js.map
|
2
apps/files_trashbin/js/files_trashbin.js
Normal file
2
apps/files_trashbin/js/files_trashbin.js
Normal file
File diff suppressed because one or more lines are too long
1
apps/files_trashbin/js/files_trashbin.js.map
Normal file
1
apps/files_trashbin/js/files_trashbin.js.map
Normal file
File diff suppressed because one or more lines are too long
|
@ -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();
|
||||
|
|
5
apps/files_trashbin/src/files_trashbin.js
Normal file
5
apps/files_trashbin/src/files_trashbin.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
import './app'
|
||||
import './filelist'
|
||||
import './trash.scss'
|
||||
|
||||
window.OCA.Trashbin = OCA.Trashbin
|
37
apps/files_trashbin/webpack.js
Normal file
37
apps/files_trashbin/webpack.js
Normal file
|
@ -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']
|
||||
}
|
||||
};
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue