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:
Roeland Jago Douma 2019-02-04 16:53:54 +01:00
parent d576ffd487
commit 75d52dea17
No known key found for this signature in database
GPG key ID: F941078878347C0C
8 changed files with 1327 additions and 21 deletions

View file

@ -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

Binary file not shown.

BIN
core/js/dist/systemtags.js.map vendored Normal file

Binary file not shown.

View 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'

View file

@ -1,8 +0,0 @@
[
"systemtags.js",
"templates.js",
"systemtagmodel.js",
"systemtagsmappingcollection.js",
"systemtagscollection.js",
"systemtagsinputfield.js"
]

View file

@ -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

File diff suppressed because it is too large Load diff

View file

@ -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",