Move core/systemtags to webpack
* Use webpack to bundle the core systemtags so the webserver can serve them statically * Bundle the core scss in there as well (saves a request) Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
d576ffd487
commit
75d52dea17
8 changed files with 1327 additions and 21 deletions
|
@ -33,9 +33,8 @@ $eventDispatcher->addListener(
|
|||
'OCA\Files::loadAdditionalScripts',
|
||||
function() {
|
||||
// FIXME: no public API for these ?
|
||||
\OCP\Util::addScript('systemtags/merged');
|
||||
\OCP\Util::addScript('dist/systemtags');
|
||||
\OCP\Util::addScript('systemtags', 'merged');
|
||||
\OCP\Util::addStyle('systemtags');
|
||||
\OCP\Util::addStyle('systemtags', 'systemtagsfilelist');
|
||||
}
|
||||
);
|
||||
|
|
BIN
core/js/dist/systemtags.js
vendored
Normal file
BIN
core/js/dist/systemtags.js
vendored
Normal file
Binary file not shown.
BIN
core/js/dist/systemtags.js.map
vendored
Normal file
BIN
core/js/dist/systemtags.js.map
vendored
Normal file
Binary file not shown.
8
core/js/systemtags/merged-systemtags.js
Normal file
8
core/js/systemtags/merged-systemtags.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import './systemtags.js'
|
||||
import './templates.js'
|
||||
import './systemtagmodel.js'
|
||||
import './systemtagsmappingcollection.js'
|
||||
import './systemtagscollection.js'
|
||||
import './systemtagsinputfield.js'
|
||||
|
||||
import '../../css/systemtags.scss'
|
|
@ -1,8 +0,0 @@
|
|||
[
|
||||
"systemtags.js",
|
||||
"templates.js",
|
||||
"systemtagmodel.js",
|
||||
"systemtagsmappingcollection.js",
|
||||
"systemtagscollection.js",
|
||||
"systemtagsinputfield.js"
|
||||
]
|
|
@ -59,7 +59,8 @@ module.exports = [
|
|||
},
|
||||
{
|
||||
entry: {
|
||||
share_backend: path.resolve(__dirname, 'js/merged-share-backend.js')
|
||||
share_backend: path.resolve(__dirname, 'js/merged-share-backend.js'),
|
||||
systemtags: path.resolve(__dirname, 'js/systemtags/merged-systemtags.js')
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
|
@ -71,7 +72,15 @@ module.exports = [
|
|||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
exclude: /node_modules/
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader']
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: ['style-loader', 'css-loader', 'sass-loader']
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
1314
package-lock.json
generated
1314
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -50,6 +50,8 @@
|
|||
"css-loader": "^2.1.0",
|
||||
"exports-loader": "^0.7.0",
|
||||
"handlebars-loader": "^1.7.1",
|
||||
"node-sass": "^4.11.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"url-loader": "^1.1.2",
|
||||
"webpack": "^4.29.1",
|
||||
|
|
Loading…
Reference in a new issue