Skip to content

Commit ed519db

Browse files
committed
Remove bower and replace every dependency with npm ones
Signed-off-by: Thomas Citharel <[email protected]>
1 parent 5c2996d commit ed519db

File tree

9 files changed

+77
-56
lines changed

9 files changed

+77
-56
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,5 @@ RCS/*
9494

9595
coverage/
9696

97-
js/vendor
98-
9997
js/public
10098
css/public

.scrutinizer.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
filter:
22
excluded_paths:
3-
- 'js/vendor/*'
43
- 'js/public/*'
54
- 'l10n/*'
65

@@ -16,4 +15,4 @@ tools:
1615
build:
1716
tests:
1817
override:
19-
- jshint-run --config js/.jshintrc
18+
- jshint-run --config js/.jshintrc

Makefile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
# build tools and additional package managers should be installed locally in
3232
# your project, since this won't pollute people's global namespace.
3333
#
34-
# The following npm scripts in your package.json install and update the bower
35-
# and npm dependencies and use gulp as build system (notice how everything is
34+
# The following npm scripts in your package.json install and update the npm
35+
# dependencies and use gulp as build system (notice how everything is
3636
# run from the node_modules folder):
3737
#
3838
# "scripts": {
3939
# "test": "node node_modules/gulp-cli/bin/gulp.js karma",
40-
# "prebuild": "npm install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update",
40+
# "prebuild": "npm install",
4141
# "build": "node node_modules/gulp-cli/bin/gulp.js"
4242
# },
4343

@@ -97,13 +97,11 @@ clean:
9797
rm -rf css/public
9898
rm -rf js/public
9999

100-
# Same as clean but also removes dependencies installed by composer, bower and
101-
# npm
100+
# Same as clean but also removes dependencies installed by composer and npm
102101
.PHONY: distclean
103102
distclean: clean
104103
rm -rf vendor
105104
rm -rf node_modules
106-
rm -rf js/vendor
107105
rm -rf js/node_modules
108106

109107
# Builds the source and appstore package
@@ -169,6 +167,6 @@ ifeq (, $(shell which phpunit 2> /dev/null))
169167
php $(build_tools_directory)/phpunit.phar -c phpunit.xml --coverage-clover coverage.clover
170168
# php $(build_tools_directory)/phpunit.phar -c phpunit.integration.xml --coverage-clover build/php-integration.clover
171169
else
172-
phpunit -c phpunit.xml --coverage-clover coverage.clover
170+
phpunit -c phpunit.xml --coverage-clover coverage.clover --bootstrap
173171
# phpunit -c phpunit.integration.xml --coverage-clover build/php-unit.clover
174172
endif

js/.bowerrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

js/bower.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

js/gulpfile.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@ const cssSources = [
5656
'../css/app/*.scss'
5757
];
5858
const vendorSources = [
59-
'vendor/angular/angular.js',
60-
'vendor/angular-bootstrap/ui-bootstrap-tpls.js',
61-
'vendor/fullcalendar/dist/fullcalendar.js',
62-
'vendor/fullcalendar/dist/locale-all.js',
59+
'node_modules/angular/angular.js',
60+
'node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js',
61+
'node_modules/fullcalendar/dist/fullcalendar.js',
62+
'node_modules/fullcalendar/dist/locale-all.js',
6363
'licenses/hsl_rgb_converter.js',
64-
'vendor/hsl_rgb_converter/converter.js',
65-
'vendor/ical.js/build/ical.js',
66-
'vendor/jquery-timepicker/jquery.ui.timepicker.js',
67-
'vendor/jstzdetect/dist/jstz.js',
64+
'node_modules/hsl_rgb_converter/converter.js',
65+
'node_modules/ical.js/build/ical.js',
66+
'node_modules/jquery-timepicker/jquery.ui.timepicker.js',
67+
'node_modules/jstzdetect/dist/jstz.js',
6868
];
6969
const vendorCssSources = [
70-
'vendor/fullcalendar/dist/fullcalendar.css',
71-
'vendor/angular/angular-csp.css',
70+
'node_modules/fullcalendar/dist/fullcalendar.css',
71+
'node_modules/angular/angular-csp.css',
7272
'licenses/jquery.timepicker.css',
73-
'vendor/jquery-timepicker/jquery.ui.timepicker.css'
73+
'node_modules/jquery-timepicker/jquery.ui.timepicker.css'
7474
];
7575

7676
const testSources = ['../tests/js/unit/**/*.js'];

js/package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "https://github.com/nextcloud/calendar",
66
"scripts": {
77
"test": "node node_modules/gulp-cli/bin/gulp.js karma",
8-
"prebuild": "yarn && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update",
8+
"prebuild": "yarn",
99
"build": "node node_modules/gulp-cli/bin/gulp.js"
1010
},
1111
"repository": {
@@ -16,10 +16,10 @@
1616
"url": "https://github.com/nextcloud/calendar/issues"
1717
},
1818
"devDependencies": {
19+
"angular-mocks": "^1.7.2",
1920
"babel-core": "^6.26.3",
2021
"babel-polyfill": "^6.26.0",
2122
"babel-preset-es2015": "^6.24.1",
22-
"bower": "^1.8.4",
2323
"coveralls": "^3.0.2",
2424
"gulp": "^3.9.1",
2525
"gulp-babel": "^7.0.1",
@@ -51,5 +51,14 @@
5151
},
5252
"engines": {
5353
"node": ">=6"
54+
},
55+
"dependencies": {
56+
"angular": "^1.7.2",
57+
"angular-ui-bootstrap": "^2.5.0",
58+
"fullcalendar": "^3.9.0",
59+
"hsl_rgb_converter": "kayellpeee/hsl_rgb_converter",
60+
"ical.js": "^1.2.2",
61+
"jquery-timepicker": "fgelinas/timepicker#883bb2cd94",
62+
"jstzdetect": "georgehrke/jstimezonedetect"
5463
}
5564
}

js/yarn.lock

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,18 @@ amqplib@^0.5.2:
117117
readable-stream "1.x >=1.1.9"
118118
safe-buffer "^5.0.1"
119119

120+
angular-mocks@^1.7.2:
121+
version "1.7.2"
122+
resolved "https://registry.yarnpkg.com/angular-mocks/-/angular-mocks-1.7.2.tgz#8a2bc7a7ce355697a48ab00e548b88e78f71fa52"
123+
124+
angular-ui-bootstrap@^2.5.0:
125+
version "2.5.6"
126+
resolved "https://registry.yarnpkg.com/angular-ui-bootstrap/-/angular-ui-bootstrap-2.5.6.tgz#23937322ec641a6fbee16498cc32452aa199e7c5"
127+
128+
angular@^1.7.2:
129+
version "1.7.2"
130+
resolved "https://registry.yarnpkg.com/angular/-/angular-1.7.2.tgz#687b955dbe5c533f8d73460461707af00360251f"
131+
120132
ansi-colors@^1.0.1:
121133
version "1.1.0"
122134
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9"
@@ -856,10 +868,6 @@ [email protected]:
856868
dependencies:
857869
hoek "2.x.x"
858870

859-
bower@^1.8.4:
860-
version "1.8.4"
861-
resolved "https://registry.yarnpkg.com/bower/-/bower-1.8.4.tgz#e7876a076deb8137f7d06525dc5e8c66db82f28a"
862-
863871
brace-expansion@^1.0.0, brace-expansion@^1.1.7:
864872
version "1.1.11"
865873
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -2142,6 +2150,13 @@ ftp@~0.3.10:
21422150
readable-stream "1.1.x"
21432151
xregexp "2.0.0"
21442152

2153+
fullcalendar@^3.9.0:
2154+
version "3.9.0"
2155+
resolved "https://registry.yarnpkg.com/fullcalendar/-/fullcalendar-3.9.0.tgz#b608a9989f3416f0b1d526c6bdfeeaf2ac79eda5"
2156+
dependencies:
2157+
jquery "2 - 3"
2158+
moment "^2.20.1"
2159+
21452160
gauge@~2.7.3:
21462161
version "2.7.4"
21472162
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
@@ -2712,6 +2727,10 @@ hosted-git-info@^2.1.4:
27122727
version "2.6.1"
27132728
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.1.tgz#6e4cee78b01bb849dcf93527708c69fdbee410df"
27142729

2730+
hsl_rgb_converter@kayellpeee/hsl_rgb_converter:
2731+
version "1.0.0"
2732+
resolved "https://codeload.github.com/kayellpeee/hsl_rgb_converter/tar.gz/3936a3896dd2f45a5c66317aab6f9175c9fde9fb"
2733+
27152734
html-tags@^2.0.0:
27162735
version "2.0.0"
27172736
resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-2.0.0.tgz#10b30a386085f43cede353cc8fa7cb0deeea668b"
@@ -2795,6 +2814,10 @@ https-proxy-agent@^2.2.1:
27952814
agent-base "^4.1.0"
27962815
debug "^3.1.0"
27972816

2817+
ical.js@^1.2.2:
2818+
version "1.2.2"
2819+
resolved "https://registry.yarnpkg.com/ical.js/-/ical.js-1.2.2.tgz#59b517362a8f61dce0342fe67deb7c20dd119f6e"
2820+
27982821
27992822
version "0.4.15"
28002823
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb"
@@ -3231,6 +3254,14 @@ jasmine-core@^3.1.0:
32313254
version "3.1.0"
32323255
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.1.0.tgz#a4785e135d5df65024dfc9224953df585bd2766c"
32333256

3257+
jquery-timepicker@fgelinas/timepicker#883bb2cd94:
3258+
version "0.0.0"
3259+
resolved "https://codeload.github.com/fgelinas/timepicker/tar.gz/883bb2cd94ce65bc2a0a707b0c5911baf6de4ad4"
3260+
3261+
"jquery@2 - 3":
3262+
version "3.3.1"
3263+
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca"
3264+
32343265
js-base64@^2.1.9:
32353266
version "2.4.5"
32363267
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.5.tgz#e293cd3c7c82f070d700fc7a1ca0a2e69f101f92"
@@ -3325,6 +3356,10 @@ jsprim@^1.2.2:
33253356
json-schema "0.2.3"
33263357
verror "1.10.0"
33273358

3359+
jstzdetect@georgehrke/jstimezonedetect:
3360+
version "1.0.6"
3361+
resolved "https://codeload.github.com/georgehrke/jstimezonedetect/tar.gz/d90d861a98a30a802cb1f4c7864854fe3a583134"
3362+
33283363
karma-coverage@^1.1.2:
33293364
version "1.1.2"
33303365
resolved "https://registry.yarnpkg.com/karma-coverage/-/karma-coverage-1.1.2.tgz#cc09dceb589a83101aca5fe70c287645ef387689"
@@ -3955,6 +3990,10 @@ [email protected], [email protected], mkdirp@^0.5.0, mkdirp@^0.5.1:
39553990
dependencies:
39563991
minimist "0.0.8"
39573992

3993+
moment@^2.20.1:
3994+
version "2.22.2"
3995+
resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
3996+
39583997
39593998
version "2.0.0"
39603999
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"

tests/js/config/karma.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ module.exports = function (config) {
3333
'../../core/vendor/moment/min/moment-with-locales.js',
3434
'../../core/vendor/moment/min/moment-with-locales.min.js',
3535
'../../core/vendor/davclient.js/lib/client.js',
36-
'js/vendor/jstzdetect/dist/jstz.min.js',
37-
'js/vendor/fullcalendar/dist/fullcalendar.min.js',
38-
'js/vendor/angular/angular.js',
39-
'js/vendor/angular-mocks/angular-mocks.js',
40-
'js/vendor/ical.js/build/ical.js',
41-
'js/vendor/hsl_rgb_converter/converter.js',
36+
'js/node_modules/jstzdetect/dist/jstz.min.js',
37+
'js/node_modules/fullcalendar/dist/fullcalendar.min.js',
38+
'js/node_modules/angular/angular.js',
39+
'js/node_modules/angular-mocks/angular-mocks.js',
40+
'js/node_modules/ical.js/build/ical.js',
41+
'js/node_modules/hsl_rgb_converter/converter.js',
4242
'tests/js/stubs/app.js',
4343
'js/app/**/*.js',
4444
'tests/js/unit/**/*.js'

0 commit comments

Comments
 (0)