Skip to content

Commit

Permalink
Npmize (vendor) scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst authored and juliusknorr committed Jan 9, 2019
1 parent 1fd6741 commit 2087881
Show file tree
Hide file tree
Showing 94 changed files with 71,370 additions and 32,174 deletions.
16 changes: 16 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"targets": {
"browsers": [
"last 2 versions",
"ie >= 11"
]
}
}
]
]
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/core/js/dist/*.js binary
/core/js/dist/*.js.map binary
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/apps/inc.php
/assets
/.htaccess
/node_modules
/translationfiles
/translationtool.phar

Expand Down
3 changes: 0 additions & 3 deletions apps/user_ldap/templates/renewpassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
'renewPassword',
]);
style('user_ldap', 'renewPassword');
\OC_Util::addVendorScript('strengthify/jquery.strengthify');
\OC_Util::addVendorStyle('strengthify/strengthify');

?>

<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}</style><![endif]-->
Expand Down
22 changes: 1 addition & 21 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,6 @@
"tests"
],
"dependencies": {
"autosize": "4.0.2",
"backbone": "1.2.3",
"base64": "0.3.0",
"blueimp-md5": "2.7.0",
"bootstrap": "3.3.7",
"clipboard": "1.7.1",
"davclient.js": "https://github.com/evert/davclient.js.git#0.1.2",
"handlebars": "4.0.5",
"jcrop": "0.9.12",
"jquery": "2.1.4",
"jquery-migrate": "1.4.0",
"jquery-ui": "1.12.1",
"jsTimezoneDetect": "1.0.6",
"marked": "0.3.6",
"moment": "2.18.1",
"select2": "3.4.8",
"snapjs": "2.0.0-rc1",
"strengthify": "0.5.5",
"underscore": "1.8.3",
"zxcvbn": "4.4.2",
"es6-shim": "^0.35.4"
"zxcvbn": "4.4.2"
}
}
2 changes: 0 additions & 2 deletions core/Controller/SetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ public function display($post) {
);
$parameters = array_merge($defaults, $post);

\OC_Util::addVendorScript('strengthify/jquery.strengthify');
\OC_Util::addVendorStyle('strengthify/strengthify');
\OC_Util::addScript('setup');
\OC_Template::printGuestPage('', 'installation', $parameters);
}
Expand Down
16 changes: 0 additions & 16 deletions core/js/core.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
{
"vendor": [
"jquery/dist/jquery.min.js",
"jquery-migrate/jquery-migrate.min.js",
"jquery-ui/jquery-ui.min.js",
"underscore/underscore-min.js",
"moment/min/moment-with-locales.min.js",
"handlebars/handlebars.runtime.min.js",
"blueimp-md5/js/md5.min.js",
"bootstrap/js/tooltip.js",
"backbone/backbone.js",
"es6-shim/es6-shim.min.js",
"davclient.js/lib/client.js",
"clipboard/dist/clipboard.min.js",
"autosize/dist/autosize.min.js",
"DOMPurify/dist/purify.min.js",
"snapjs/dist/latest/snap.js",
"select2/select2.js",
"css-vars-ponyfill/dist/css-vars-ponyfill.min.js"
],
"libraries": [
Expand Down
345 changes: 345 additions & 0 deletions core/js/dist/main.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/js/dist/main.js.map

Large diffs are not rendered by default.

345 changes: 345 additions & 0 deletions core/js/dist/main_BACKUP_17410.js

Large diffs are not rendered by default.

499 changes: 499 additions & 0 deletions core/js/dist/main_BASE_17410.js

Large diffs are not rendered by default.

345 changes: 345 additions & 0 deletions core/js/dist/main_LOCAL_17410.js

Large diffs are not rendered by default.

64,335 changes: 64,335 additions & 0 deletions core/js/dist/main_REMOTE_17410.js

Large diffs are not rendered by default.

80 changes: 80 additions & 0 deletions core/src/globals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* @copyright 2018 Christoph Wurst <[email protected]>
*
* @author 2018 Christoph Wurst <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import _ from 'underscore'
import $ from 'jquery'
import 'jquery-migrate/dist/jquery-migrate.min'
import 'jquery-ui'
// TODO: remove anything that is not really used
import 'jquery-ui/ui/widgets/accordion'
import 'jquery-ui/ui/widgets/autocomplete'
import 'jquery-ui/ui/widgets/button'
import 'jquery-ui/ui/widgets/checkboxradio'
import 'jquery-ui/ui/widgets/controlgroup'
import 'jquery-ui/ui/widgets/datepicker'
import 'jquery-ui/ui/widgets/dialog'
import 'jquery-ui/ui/widgets/draggable'
import 'jquery-ui/ui/widgets/droppable'
import 'jquery-ui/ui/widgets/menu'
import 'jquery-ui/ui/widgets/mouse'
import 'jquery-ui/ui/widgets/progressbar'
import 'jquery-ui/ui/widgets/resizable'
import 'jquery-ui/ui/widgets/selectable'
import 'jquery-ui/ui/widgets/selectmenu'
import 'jquery-ui/ui/widgets/slider'
import 'jquery-ui/ui/widgets/sortable'
import 'jquery-ui/ui/widgets/tabs'
import 'jquery-ui/ui/widgets/tooltip'
// TODO END
import 'jquery-ui/themes/base/all.css'
import autosize from 'autosize'
import Backbone from 'backbone'
import 'bootstrap/js/tooltip'
import Clipboard from 'clipboard'
import dav from 'davclient.js'
import DOMPurify from 'dompurify'
import Handlebars from 'handlebars'
import 'jcrop/js/jquery.Jcrop'
import 'jcrop/css/jquery.Jcrop.css'
import jstimezonedetect from 'jstimezonedetect'
import marked from 'marked'
import md5 from 'blueimp-md5'
import moment from 'moment'
import Select2 from 'select2'
import 'snap.js/dist/snap'
import 'strengthify'
import 'strengthify/strengthify.css'

window['_'] = _
window['$'] = $
window['autosize'] = autosize
window['Backbone'] = Backbone
window['Clipboard'] = Clipboard
window['dav'] = dav
window['DOMPurify'] = DOMPurify
window['Handlebars'] = Handlebars
window['jstimezonedetect'] = jstimezonedetect
window['jstz'] = jstimezonedetect
window['jQuery'] = $
window['marked'] = marked
window['md5'] = md5
window['moment'] = moment
window['Select2'] = Select2
27 changes: 27 additions & 0 deletions core/src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* @copyright 2018 Christoph Wurst <[email protected]>
*
* @author 2018 Christoph Wurst <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// TODO: not required anymore https://caniuse.com/#search=atob
import 'Base64'
// TODO: use babel polyfill instead
import 'es6-shim'

import './globals'
41 changes: 0 additions & 41 deletions core/vendor/DOMPurify/.bower.json

This file was deleted.

Loading

0 comments on commit 2087881

Please sign in to comment.