Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use npm for js depdencies, bundle with webpack #13156

Merged
merged 14 commits into from
Jan 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(unrelevant) I think there is something called babel global config, could be nice using it ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haven't heard of it but sounds nice ;)

"presets": [
[
"@babel/preset-env",
{
"modules": false,
"targets": {
"browsers": [
"last 2 versions",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just reminded me https://jamie.build/last-2-versions

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah … we can improve that later 😉

"ie >= 11"
]
}
}
]
]
}
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

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
2 changes: 0 additions & 2 deletions autotest-checkers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ RESULT=0

bash ./build/autoloaderchecker.sh
RESULT=$(($RESULT+$?))
bash ./build/mergejschecker.sh
RESULT=$(($RESULT+$?))
php ./build/translation-checker.php
RESULT=$(($RESULT+$?))
php ./build/htaccess-checker.php
Expand Down
38 changes: 0 additions & 38 deletions bower.json

This file was deleted.

6 changes: 4 additions & 2 deletions build/files-checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
$expectedFiles = [
'.',
'..',
'.bowerrc',
'.babelrc',
'.codecov.yml',
'.drone.yml',
'.git',
'.gitattributes',
'.github',
'.gitignore',
'.gitmodules',
Expand All @@ -44,7 +45,6 @@
'autotest-external.sh',
'autotest-js.sh',
'autotest.sh',
'bower.json',
'build',
'CHANGELOG.md',
'CODE_OF_CONDUCT.md',
Expand All @@ -63,6 +63,8 @@
'ocs',
'ocs-provider',
'ocm-provider',
'package.json',
'package-lock.json',
'public.php',
'README.md',
'remote.php',
Expand Down
25 changes: 0 additions & 25 deletions build/mergejschecker.sh

This file was deleted.

34 changes: 7 additions & 27 deletions build/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"contributors": [],
"dependencies": {},
"devDependencies": {
"bower": "~1.8.0",
"handlebars": "^4.0.5",
"jasmine-core": "~2.5.2",
"jasmine-sinon": "^0.4.0",
Expand Down
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
9 changes: 5 additions & 4 deletions core/css/inputs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ div[contenteditable=false] {


/* Default global values */
div.select2-drop .select2-search input, // TODO: REMOVE WHEN DROPPING SELECT2
select,
button, .button,
input:not([type='range']),
Expand Down Expand Up @@ -414,7 +415,7 @@ input {
}

/* Select2 overriding. Merged to core with vendor stylesheet */
.select2-drop {
div.select2-drop {
margin-top: -2px;
background-color: var(--color-main-background);
&.select2-drop-active {
Expand Down Expand Up @@ -473,7 +474,7 @@ input {
cursor: pointer;
}
}
.select2-container-multi {
div.select2-container-multi {
.select2-choices,
&.select2-container-active .select2-choices {
box-shadow: none;
Expand Down Expand Up @@ -511,7 +512,7 @@ input {
}
}
}
.select2-container {
div.select2-container {
margin: 3px 3px 3px 0;
&.select2-container-multi .select2-choices {
display: flex;
Expand All @@ -520,7 +521,7 @@ input {
float: none;
}
}
.select2-choice {
a.select2-choice {
box-shadow: none;
white-space: nowrap;
text-overflow: ellipsis;
Expand Down
19 changes: 0 additions & 19 deletions core/js/core.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
{
"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": [
"jquery-showpassword.js",
"jquery.avatar.js",
Expand Down
425 changes: 425 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.

Loading