Merge pull request #459 from nextcloud/dependabot/npm_and_yarn/js/webpack-tw-4.8.2
Update webpack requirement to ^4.8.2 in /js
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
/js/tests/*
|
/js/tests/*
|
||||||
/js/vendor/*
|
/js/vendor/*
|
||||||
|
/js/legacy/*
|
||||||
/js/node_modules/*
|
/js/node_modules/*
|
||||||
/js/public/*
|
/js/public/*
|
||||||
/karma.conf.js
|
/karma.conf.js
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ env:
|
|||||||
amd: true
|
amd: true
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
|
global: false
|
||||||
app: false
|
app: false
|
||||||
angular: false
|
angular: false
|
||||||
$: false
|
$: false
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,7 +2,6 @@ js/node_modules/*
|
|||||||
js/vendor/
|
js/vendor/
|
||||||
js/public/
|
js/public/
|
||||||
js/build/
|
js/build/
|
||||||
js/package-lock.json
|
|
||||||
build/
|
build/
|
||||||
css/style.css
|
css/style.css
|
||||||
css/vendor.css
|
css/vendor.css
|
||||||
|
|||||||
7
Makefile
7
Makefile
@@ -26,10 +26,13 @@ install-deps:
|
|||||||
build: build-js
|
build: build-js
|
||||||
|
|
||||||
build-js: install-deps
|
build-js: install-deps
|
||||||
cd js && ./node_modules/.bin/webpack --config webpack.prod.config.js
|
cd js && npm run build
|
||||||
|
|
||||||
|
build-js-dev: install-deps
|
||||||
|
cd js && npm run dev
|
||||||
|
|
||||||
watch:
|
watch:
|
||||||
cd js && ./node_modules/.bin/webpack --config webpack.dev.config.js --watch
|
cd js && npm run watch
|
||||||
|
|
||||||
# appstore: clean install-deps
|
# appstore: clean install-deps
|
||||||
appstore: clean-build build
|
appstore: clean-build build
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
import app from '../app/App.js';
|
import app from '../app/App.js';
|
||||||
|
import '../legacy/jquery.ui.timepicker.js';
|
||||||
|
import 'legacy/jquery.ui.timepicker.css';
|
||||||
|
|
||||||
/* global app */
|
/* global app */
|
||||||
/* global t */
|
/* global t */
|
||||||
@@ -30,7 +32,7 @@ app.directive('timepicker', function() {
|
|||||||
return {
|
return {
|
||||||
restrict: 'A',
|
restrict: 'A',
|
||||||
link: function(scope, elm, attr) {
|
link: function(scope, elm, attr) {
|
||||||
return elm.timepicker({
|
return $(elm).timepicker({
|
||||||
onSelect: function(date, inst) {
|
onSelect: function(date, inst) {
|
||||||
scope.setDuedateTime(moment('2000-01-01 ' + date));
|
scope.setDuedateTime(moment('2000-01-01 ' + date));
|
||||||
scope.$apply();
|
scope.$apply();
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// used for building a vendor stylesheet
|
// used for building a vendor stylesheet
|
||||||
import 'jquery-timepicker/jquery.timepicker.css';
|
|
||||||
import 'ng-sortable/dist/ng-sortable.css';
|
import 'ng-sortable/dist/ng-sortable.css';
|
||||||
|
|
||||||
|
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
|
import markdownit from 'markdown-it';
|
||||||
|
global.markdownit = markdownit;
|
||||||
|
|
||||||
import app from './app/App.js';
|
import app from './app/App.js';
|
||||||
import './app/Config.js';
|
import './app/Config.js';
|
||||||
|
|||||||
57
js/legacy/jquery.ui.timepicker.css
vendored
Normal file
57
js/legacy/jquery.ui.timepicker.css
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* Timepicker stylesheet
|
||||||
|
* Highly inspired from datepicker
|
||||||
|
* FG - Nov 2010 - Web3R
|
||||||
|
*
|
||||||
|
* version 0.0.3 : Fixed some settings, more dynamic
|
||||||
|
* version 0.0.4 : Removed width:100% on tables
|
||||||
|
* version 0.1.1 : set width 0 on tables to fix an ie6 bug
|
||||||
|
*/
|
||||||
|
|
||||||
|
.ui-timepicker-inline { display: inline; }
|
||||||
|
|
||||||
|
#ui-timepicker-div { padding: 0.2em; }
|
||||||
|
.ui-timepicker-table { display: inline-table; width: 0; }
|
||||||
|
.ui-timepicker-table table { margin:0.15em 0 0 0; border-collapse: collapse; }
|
||||||
|
|
||||||
|
.ui-timepicker-hours, .ui-timepicker-minutes { padding: 0.2em; }
|
||||||
|
|
||||||
|
.ui-timepicker-table .ui-timepicker-title { line-height: 1.8em; text-align: center; }
|
||||||
|
.ui-timepicker-table td { padding: 0.1em; width: 2.2em; }
|
||||||
|
.ui-timepicker-table th.periods { padding: 0.1em; width: 2.2em; }
|
||||||
|
|
||||||
|
/* span for disabled cells */
|
||||||
|
.ui-timepicker-table td span {
|
||||||
|
display:block;
|
||||||
|
padding:0.2em 0.3em 0.2em 0.5em;
|
||||||
|
width: 1.2em;
|
||||||
|
|
||||||
|
text-align:right;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
/* anchors for clickable cells */
|
||||||
|
.ui-timepicker-table td a {
|
||||||
|
display:block;
|
||||||
|
padding:0.2em 0.3em 0.2em 0.5em;
|
||||||
|
width: 1.2em;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align:right;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* buttons and button pane styling */
|
||||||
|
.ui-timepicker .ui-timepicker-buttonpane {
|
||||||
|
background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0;
|
||||||
|
}
|
||||||
|
.ui-timepicker .ui-timepicker-buttonpane button { margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||||
|
/* The close button */
|
||||||
|
.ui-timepicker .ui-timepicker-close { float: right }
|
||||||
|
|
||||||
|
/* the now button */
|
||||||
|
.ui-timepicker .ui-timepicker-now { float: left; }
|
||||||
|
|
||||||
|
/* the deselect button */
|
||||||
|
.ui-timepicker .ui-timepicker-deselect { float: left; }
|
||||||
|
|
||||||
|
|
||||||
1496
js/legacy/jquery.ui.timepicker.js
vendored
Normal file
1496
js/legacy/jquery.ui.timepicker.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
12197
js/package-lock.json
generated
Normal file
12197
js/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,40 +1,41 @@
|
|||||||
{
|
{
|
||||||
"name": "deck",
|
"name": "deck",
|
||||||
|
"description": "Frontend for the Nextcloud Deck app",
|
||||||
|
"repository": "https://github.com/nextcloud/deck",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "Gruntfile.js",
|
"main": "Gruntfile.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
"test": "tests"
|
"test": "tests"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@uirouter/angularjs": "^1.0.13",
|
|
||||||
"angular": "^1.6.8",
|
"angular": "^1.6.8",
|
||||||
"angular-animate": "^1.6.8",
|
"angular-animate": "^1.6.8",
|
||||||
"angular-markdown-it": "^0.6.1",
|
"angular-markdown-it": "^0.6.1",
|
||||||
"angular-sanitize": "^1.6.8",
|
"angular-sanitize": "^1.6.8",
|
||||||
"jquery": "^3.3.1",
|
"markdown-it": "^8.4.1",
|
||||||
"jquery-timepicker": "^1.3.3",
|
|
||||||
"markdown-it-link-target": "^1.0.2",
|
"markdown-it-link-target": "^1.0.2",
|
||||||
"ng-sortable": "^1.3.8",
|
"ng-sortable": "^1.3.8",
|
||||||
"ui-select": "^0.19.8"
|
"ui-select": "^0.19.8",
|
||||||
|
"@uirouter/angularjs": "^1.0.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^6.26.0",
|
"babel-core": "^6.26.0",
|
||||||
"babel-loader": "^7.1.2",
|
"babel-loader": "^7.1.2",
|
||||||
"bower": "^1.8.0",
|
|
||||||
"css-loader": "^0.28.9",
|
"css-loader": "^0.28.9",
|
||||||
"extract-text-webpack-plugin": "^3.0.2",
|
"mini-css-extract-plugin": "^0.4.0",
|
||||||
"jshint-stylish": "^2.2.1",
|
|
||||||
"karma": "^1.4.1",
|
|
||||||
"node-sass": "^4.5.3",
|
"node-sass": "^4.5.3",
|
||||||
"style-loader": "^0.19.1",
|
"webpack": "^4.8.2",
|
||||||
"webpack": "^3.10.0",
|
"webpack-cli": "^2.1.3",
|
||||||
"webpack-merge": "^4.1.1"
|
"webpack-merge": "^4.1.2",
|
||||||
|
"karma": "^2.0.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "./node_modules/webpack-cli/bin/webpack.js --mode production --config webpack.prod.config.js",
|
||||||
|
"dev": "./node_modules/webpack-cli/bin/webpack.js --mode development --config webpack.dev.config.js",
|
||||||
|
"watch": "./node_modules/webpack-cli/bin/webpack.js --mode development --config webpack.dev.config.js --watch",
|
||||||
"test": "echo \"Warning: no test specified\" && exit 0"
|
"test": "echo \"Warning: no test specified\" && exit 0"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"keywords": [],
|
"keywords": []
|
||||||
"description": ""
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
node: {
|
||||||
|
fs: 'empty',
|
||||||
|
},
|
||||||
entry: {
|
entry: {
|
||||||
deck: './init.js',
|
deck: './init.js',
|
||||||
},
|
},
|
||||||
@@ -14,7 +17,7 @@ module.exports = {
|
|||||||
modules: [path.resolve(__dirname), 'node_modules'],
|
modules: [path.resolve(__dirname), 'node_modules'],
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
@@ -22,33 +25,39 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
use: ExtractTextPlugin.extract({
|
use: [
|
||||||
use: {
|
MiniCssExtractPlugin.loader,
|
||||||
loader: 'css-loader',
|
'css-loader'
|
||||||
options: {
|
]
|
||||||
minimize: true,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
optimization: {
|
||||||
|
splitChunks: {
|
||||||
|
cacheGroups: {
|
||||||
|
/* separate vendor chunk for node_modules and legacy scripts */
|
||||||
|
commons: {
|
||||||
|
test: /[\\/]node_modules[\\/]/,
|
||||||
|
name: 'vendor',
|
||||||
|
chunks: 'all'
|
||||||
|
},
|
||||||
|
legacy: {
|
||||||
|
test: /[\\/]legacy[\\/]/,
|
||||||
|
name: 'vendor',
|
||||||
|
chunks: 'all'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* use external jQuery from server */
|
||||||
|
externals: {
|
||||||
|
'jquery': 'jQuery'
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new MiniCssExtractPlugin('[name].css'),
|
||||||
test: /(vendor\.js)+/i,
|
new webpack.ProvidePlugin({
|
||||||
}),
|
$: 'jquery',
|
||||||
// we do not uglify deck.js since there are no proper dependency annotations
|
jQuery: 'jquery'
|
||||||
new webpack.optimize.CommonsChunkPlugin({
|
})
|
||||||
name: 'vendor',
|
|
||||||
filename: 'vendor.js',
|
|
||||||
minChunks(module, count) {
|
|
||||||
var context = module.context;
|
|
||||||
return context && context.indexOf('node_modules') >= 0;
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
new ExtractTextPlugin({
|
|
||||||
filename: "../../css/vendor.css",
|
|
||||||
allChunks: true
|
|
||||||
}),
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ const merge = require('webpack-merge');
|
|||||||
const baseConfig = require('./webpack.config.js');
|
const baseConfig = require('./webpack.config.js');
|
||||||
|
|
||||||
module.exports = merge(baseConfig, {
|
module.exports = merge(baseConfig, {
|
||||||
devtool: 'eval'
|
mode: 'development'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const merge = require('webpack-merge');
|
const merge = require('webpack-merge');
|
||||||
const baseConfig = require('./webpack.config.js');
|
const baseConfig = require('./webpack.config.js');
|
||||||
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||||
|
|
||||||
|
|
||||||
module.exports = merge(baseConfig, {
|
module.exports = merge(baseConfig, {
|
||||||
plugins: [
|
mode: 'production',
|
||||||
new webpack.DefinePlugin({
|
optimization: {
|
||||||
'process.env': {
|
minimizer: [
|
||||||
'NODE_ENV': JSON.stringify('production')
|
new UglifyJsPlugin({
|
||||||
}
|
test: /(vendor\.js)+/i
|
||||||
}),
|
})
|
||||||
]
|
]
|
||||||
});
|
}});
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
|
|
||||||
use OCP\Util;
|
use OCP\Util;
|
||||||
|
|
||||||
Util::addStyle('deck', 'vendor');
|
Util::addStyle('deck', '../js/build/vendor');
|
||||||
Util::addStyle('deck', 'style');
|
|
||||||
|
|
||||||
Util::addScript('deck', 'build/vendor');
|
Util::addScript('deck', 'build/vendor');
|
||||||
|
|
||||||
|
Util::addStyle('deck', 'style');
|
||||||
Util::addScript('deck', 'build/deck');
|
Util::addScript('deck', 'build/deck');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user