Remove bower and replace every dependency with npm ones

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2018-08-06 15:06:53 +02:00
parent 5c2996d837
commit ed519db3d5
9 changed files with 77 additions and 56 deletions

2
.gitignore vendored
View File

@ -94,7 +94,5 @@ RCS/*
coverage/
js/vendor
js/public
css/public

View File

@ -1,6 +1,5 @@
filter:
excluded_paths:
- 'js/vendor/*'
- 'js/public/*'
- 'l10n/*'
@ -16,4 +15,4 @@ tools:
build:
tests:
override:
- jshint-run --config js/.jshintrc
- jshint-run --config js/.jshintrc

View File

@ -31,13 +31,13 @@
# build tools and additional package managers should be installed locally in
# your project, since this won't pollute people's global namespace.
#
# The following npm scripts in your package.json install and update the bower
# and npm dependencies and use gulp as build system (notice how everything is
# The following npm scripts in your package.json install and update the npm
# dependencies and use gulp as build system (notice how everything is
# run from the node_modules folder):
#
# "scripts": {
# "test": "node node_modules/gulp-cli/bin/gulp.js karma",
# "prebuild": "npm install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update",
# "prebuild": "npm install",
# "build": "node node_modules/gulp-cli/bin/gulp.js"
# },
@ -97,13 +97,11 @@ clean:
rm -rf css/public
rm -rf js/public
# Same as clean but also removes dependencies installed by composer, bower and
# npm
# Same as clean but also removes dependencies installed by composer and npm
.PHONY: distclean
distclean: clean
rm -rf vendor
rm -rf node_modules
rm -rf js/vendor
rm -rf js/node_modules
# Builds the source and appstore package
@ -169,6 +167,6 @@ ifeq (, $(shell which phpunit 2> /dev/null))
php $(build_tools_directory)/phpunit.phar -c phpunit.xml --coverage-clover coverage.clover
# php $(build_tools_directory)/phpunit.phar -c phpunit.integration.xml --coverage-clover build/php-integration.clover
else
phpunit -c phpunit.xml --coverage-clover coverage.clover
phpunit -c phpunit.xml --coverage-clover coverage.clover --bootstrap
# phpunit -c phpunit.integration.xml --coverage-clover build/php-unit.clover
endif

View File

@ -1,7 +0,0 @@
{
"directory": "vendor",
"ignoredDependencies": [
"jquery",
"moment"
]
}

View File

@ -1,15 +0,0 @@
{
"name": "nextcloud-calendar",
"dependencies": {
"angular": "1.7.2",
"angular-bootstrap": "2.5.0",
"jquery-timepicker": "883bb2cd94",
"jstzdetect": "https://github.com/georgehrke/jstimezonedetect.git",
"ical.js": "1.2.2",
"fullcalendar": "3.9.0",
"hsl_rgb_converter": "https://github.com/kayellpeee/hsl_rgb_converter.git"
},
"devDependencies": {
"angular-mocks": "1.7.2"
}
}

View File

@ -56,21 +56,21 @@ const cssSources = [
'../css/app/*.scss'
];
const vendorSources = [
'vendor/angular/angular.js',
'vendor/angular-bootstrap/ui-bootstrap-tpls.js',
'vendor/fullcalendar/dist/fullcalendar.js',
'vendor/fullcalendar/dist/locale-all.js',
'node_modules/angular/angular.js',
'node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js',
'node_modules/fullcalendar/dist/fullcalendar.js',
'node_modules/fullcalendar/dist/locale-all.js',
'licenses/hsl_rgb_converter.js',
'vendor/hsl_rgb_converter/converter.js',
'vendor/ical.js/build/ical.js',
'vendor/jquery-timepicker/jquery.ui.timepicker.js',
'vendor/jstzdetect/dist/jstz.js',
'node_modules/hsl_rgb_converter/converter.js',
'node_modules/ical.js/build/ical.js',
'node_modules/jquery-timepicker/jquery.ui.timepicker.js',
'node_modules/jstzdetect/dist/jstz.js',
];
const vendorCssSources = [
'vendor/fullcalendar/dist/fullcalendar.css',
'vendor/angular/angular-csp.css',
'node_modules/fullcalendar/dist/fullcalendar.css',
'node_modules/angular/angular-csp.css',
'licenses/jquery.timepicker.css',
'vendor/jquery-timepicker/jquery.ui.timepicker.css'
'node_modules/jquery-timepicker/jquery.ui.timepicker.css'
];
const testSources = ['../tests/js/unit/**/*.js'];

View File

@ -5,7 +5,7 @@
"homepage": "https://github.com/nextcloud/calendar",
"scripts": {
"test": "node node_modules/gulp-cli/bin/gulp.js karma",
"prebuild": "yarn && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update",
"prebuild": "yarn",
"build": "node node_modules/gulp-cli/bin/gulp.js"
},
"repository": {
@ -16,10 +16,10 @@
"url": "https://github.com/nextcloud/calendar/issues"
},
"devDependencies": {
"angular-mocks": "^1.7.2",
"babel-core": "^6.26.3",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"bower": "^1.8.4",
"coveralls": "^3.0.2",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.1",
@ -51,5 +51,14 @@
},
"engines": {
"node": ">=6"
},
"dependencies": {
"angular": "^1.7.2",
"angular-ui-bootstrap": "^2.5.0",
"fullcalendar": "^3.9.0",
"hsl_rgb_converter": "kayellpeee/hsl_rgb_converter",
"ical.js": "^1.2.2",
"jquery-timepicker": "fgelinas/timepicker#883bb2cd94",
"jstzdetect": "georgehrke/jstimezonedetect"
}
}

View File

@ -117,6 +117,18 @@ amqplib@^0.5.2:
readable-stream "1.x >=1.1.9"
safe-buffer "^5.0.1"
angular-mocks@^1.7.2:
version "1.7.2"
resolved "https://registry.yarnpkg.com/angular-mocks/-/angular-mocks-1.7.2.tgz#8a2bc7a7ce355697a48ab00e548b88e78f71fa52"
angular-ui-bootstrap@^2.5.0:
version "2.5.6"
resolved "https://registry.yarnpkg.com/angular-ui-bootstrap/-/angular-ui-bootstrap-2.5.6.tgz#23937322ec641a6fbee16498cc32452aa199e7c5"
angular@^1.7.2:
version "1.7.2"
resolved "https://registry.yarnpkg.com/angular/-/angular-1.7.2.tgz#687b955dbe5c533f8d73460461707af00360251f"
ansi-colors@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9"
@ -856,10 +868,6 @@ boom@2.x.x:
dependencies:
hoek "2.x.x"
bower@^1.8.4:
version "1.8.4"
resolved "https://registry.yarnpkg.com/bower/-/bower-1.8.4.tgz#e7876a076deb8137f7d06525dc5e8c66db82f28a"
brace-expansion@^1.0.0, brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@ -2142,6 +2150,13 @@ ftp@~0.3.10:
readable-stream "1.1.x"
xregexp "2.0.0"
fullcalendar@^3.9.0:
version "3.9.0"
resolved "https://registry.yarnpkg.com/fullcalendar/-/fullcalendar-3.9.0.tgz#b608a9989f3416f0b1d526c6bdfeeaf2ac79eda5"
dependencies:
jquery "2 - 3"
moment "^2.20.1"
gauge@~2.7.3:
version "2.7.4"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
@ -2712,6 +2727,10 @@ hosted-git-info@^2.1.4:
version "2.6.1"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.1.tgz#6e4cee78b01bb849dcf93527708c69fdbee410df"
hsl_rgb_converter@kayellpeee/hsl_rgb_converter:
version "1.0.0"
resolved "https://codeload.github.com/kayellpeee/hsl_rgb_converter/tar.gz/3936a3896dd2f45a5c66317aab6f9175c9fde9fb"
html-tags@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-2.0.0.tgz#10b30a386085f43cede353cc8fa7cb0deeea668b"
@ -2795,6 +2814,10 @@ https-proxy-agent@^2.2.1:
agent-base "^4.1.0"
debug "^3.1.0"
ical.js@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/ical.js/-/ical.js-1.2.2.tgz#59b517362a8f61dce0342fe67deb7c20dd119f6e"
iconv-lite@0.4.15:
version "0.4.15"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb"
@ -3231,6 +3254,14 @@ jasmine-core@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.1.0.tgz#a4785e135d5df65024dfc9224953df585bd2766c"
jquery-timepicker@fgelinas/timepicker#883bb2cd94:
version "0.0.0"
resolved "https://codeload.github.com/fgelinas/timepicker/tar.gz/883bb2cd94ce65bc2a0a707b0c5911baf6de4ad4"
"jquery@2 - 3":
version "3.3.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca"
js-base64@^2.1.9:
version "2.4.5"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.5.tgz#e293cd3c7c82f070d700fc7a1ca0a2e69f101f92"
@ -3325,6 +3356,10 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.10.0"
jstzdetect@georgehrke/jstimezonedetect:
version "1.0.6"
resolved "https://codeload.github.com/georgehrke/jstimezonedetect/tar.gz/d90d861a98a30a802cb1f4c7864854fe3a583134"
karma-coverage@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/karma-coverage/-/karma-coverage-1.1.2.tgz#cc09dceb589a83101aca5fe70c287645ef387689"
@ -3955,6 +3990,10 @@ mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1:
dependencies:
minimist "0.0.8"
moment@^2.20.1:
version "2.22.2"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"

View File

@ -33,12 +33,12 @@ module.exports = function (config) {
'../../core/vendor/moment/min/moment-with-locales.js',
'../../core/vendor/moment/min/moment-with-locales.min.js',
'../../core/vendor/davclient.js/lib/client.js',
'js/vendor/jstzdetect/dist/jstz.min.js',
'js/vendor/fullcalendar/dist/fullcalendar.min.js',
'js/vendor/angular/angular.js',
'js/vendor/angular-mocks/angular-mocks.js',
'js/vendor/ical.js/build/ical.js',
'js/vendor/hsl_rgb_converter/converter.js',
'js/node_modules/jstzdetect/dist/jstz.min.js',
'js/node_modules/fullcalendar/dist/fullcalendar.min.js',
'js/node_modules/angular/angular.js',
'js/node_modules/angular-mocks/angular-mocks.js',
'js/node_modules/ical.js/build/ical.js',
'js/node_modules/hsl_rgb_converter/converter.js',
'tests/js/stubs/app.js',
'js/app/**/*.js',
'tests/js/unit/**/*.js'