🏗️ remove yarn and use npm

npm is the default tool from netcloud core, it make ease to use nextcloud packages

- update dependencies
- simplify builds
This commit is contained in:
Vinicius Reis 2022-08-04 20:07:53 -03:00 committed by backportbot-libresign[bot]
parent d7faf38c63
commit f8adbeb58c
8 changed files with 51362 additions and 11211 deletions

10
.editorconfig Normal file
View file

@ -0,0 +1,10 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2

View file

@ -17,8 +17,8 @@ jobs:
path: ${{ env.APP_NAME }}
- uses: actions/setup-node@v3
with:
node-version: 14
cache-dependency-path: ${{ env.APP_NAME }}/yarn.lock
node-version: 16
cache-dependency-path: ${{ env.APP_NAME }}/package-lock.json
- name: Run build
run: cd ${{ env.APP_NAME }} && make appstore
- name: Upload app tarball to release
@ -37,4 +37,4 @@ jobs:
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
download_url: ${{ steps.attach_to_release.outputs.browser_download_url }}
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
nightly: ${{ github.event.release.prerelease }}
nightly: ${{ github.event.release.prerelease }}

View file

@ -36,42 +36,39 @@ else
endif
# Dev env management
dev-setup: clean clean-dev composer yarn-init
dev-setup: clean clean-dev composer npm-install
yarn-init:
yarn
yarn-update:
yarn upgrade
npm-install:
npm install
# Building
build-js:
yarn dev
npm run dev
build-js-production:
yarn build
npm run build
watch-js:
yarn watch
npm run watch
# Linting
lint:
yarn lint
npm run lint
lint-fix:
yarn lint:fix
yarn stylelint:fix
npm run lint:fix
npm run stylelint:fix
# Style linting
stylelint:
yarn stylelint
npm run stylelint
site:
@if [ ! -d $(site_build_directory) ]; then \
mkdir -p $(site_build_directory) ; \
git clone https://github.com/LibreSign/site $(site_build_directory) ; \
fi
$(MAKE) yarn-init -C $(site_build_directory)
$(MAKE) npm-install -C $(site_build_directory)
$(MAKE) watch-js -C $(site_build_directory)
# Cleaning
@ -94,8 +91,8 @@ test: composer
appstore: clean
mkdir -p $(appstore_sign_dir)/$(app_name)
composer install --no-dev
yarn install
yarn build
npm install
npm run build
cp -r \
appinfo \
cfssl \

51280
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -5,9 +5,9 @@
"license": "agpl",
"private": true,
"scripts": {
"build": "NODE_ENV=production webpack --progress --config webpack.prod.js",
"dev": "webpack --progress --config webpack.dev.js",
"watch": "webpack --progress --watch --config webpack.dev.js",
"build": "NODE_ENV=production webpack --progress --config webpack.config.js",
"dev": "NODE_ENV=development webpack --progress --config webpack.config.js",
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.config.js",
"lint": "eslint --ext .js,.vue src",
"lint:fix": "eslint --ext .js,.vue src --fix",
"stylelint": "stylelint css/*.css css/*.scss src/**/*.scss src/**/*.vue",
@ -17,81 +17,65 @@
"test:coverage": "jest --collect-coverage"
},
"dependencies": {
"@fontsource/dancing-script": "^4.5.1",
"@nextcloud/axios": "^1.9.0",
"@nextcloud/dialogs": "^3.1.2",
"@fontsource/dancing-script": "^4.5.8",
"@nextcloud/axios": "^1.10.0",
"@nextcloud/dialogs": "^3.1.4",
"@nextcloud/initial-state": "^1.2.1",
"@nextcloud/l10n": "^1.4.1",
"@nextcloud/logger": "^2.1.0",
"@nextcloud/l10n": "^1.6.0",
"@nextcloud/logger": "^2.2.1",
"@nextcloud/password-confirmation": "^1.0.1",
"@nextcloud/paths": "^2.1.0",
"@nextcloud/router": "^2.0.0",
"@nextcloud/vue": "^5.0.0",
"@nextcloud/vue": "^5.4.0",
"crypto-js": "^4.1.1",
"date-fns": "2.28.0",
"dompurify": "^2.3.6",
"date-fns": "2.29.1",
"dompurify": "^2.3.10",
"linkifyjs": "^3.0.5",
"lodash-es": "^4.17.21",
"marked": "^4.0.12",
"style-loader": "^1.2.1",
"vue": "^2.6.12",
"vue-advanced-cropper": "^1.10.1",
"marked": "^4.0.18",
"style-loader": "^3.3.1",
"vue": "^2.7.8",
"vue-advanced-cropper": "^1.11.3",
"vue-drag-resize": "^1.5.4",
"vue-pdf": "^4.3.0",
"vue-router": "^3.5.3",
"vue-router": "^3.5.4",
"vuelidate": "^0.7.7",
"vuex": "^3.6.2",
"vuex-router-sync": "^5.0.0",
"webpack-merge": "^5.2.0"
"webpack-merge": "^5.8.0"
},
"browserslist": [
"extends @nextcloud/browserslist-config"
],
"engines": {
"node": ">=10.0.0"
"node": ">=16.0.0",
"npm": "^8"
},
"devDependencies": {
"@babel/core": "^7.17.4",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.16.11",
"@nextcloud/browserslist-config": "^1.0.0",
"@nextcloud/eslint-config": "^2.2.0",
"@nextcloud/eslint-plugin": "^1.4.0",
"@nextcloud/webpack-vue-config": "^1.4.1",
"@vue/cli-plugin-unit-jest": "^4.5.13",
"@vue/test-utils": "^1.2.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.3",
"css-loader": "^4.3.0",
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.1",
"eslint-import-resolver-webpack": "^0.12.2",
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"@nextcloud/babel-config": "^1.0.0",
"@nextcloud/browserslist-config": "^2.2.0",
"@nextcloud/eslint-config": "^8.0.0",
"@nextcloud/eslint-plugin": "^2.0.0",
"@nextcloud/webpack-vue-config": "^5.2.1",
"@vue/cli-plugin-unit-jest": "^5.0.8",
"@vue/test-utils": "^1.3.0",
"eslint": "^8.21.0",
"eslint-config-standard": "^17.0.0",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-plugin-risxss": "^2.1.0",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2",
"file-loader": "^6.1.0",
"file-loader": "^6.2.0",
"jest": "^26.6.3",
"jest-environment-jsdom-sixteen": "^2.0.0",
"jest-localstorage-mock": "^2.4.19",
"jest-mock-axios": "^4.5.0",
"jest-localstorage-mock": "^2.4.21",
"jest-mock-axios": "^4.6.1",
"jest-transform-stub": "^2.0.0",
"node-sass": "^4.14.1",
"sass-loader": "^8.0.2",
"stylelint": "^13.7.1",
"stylelint-config-recommended-scss": "^4.2.0",
"stylelint-scss": "^3.18.0",
"stylelint-webpack-plugin": "^2.1.0",
"url-loader": "^4.1.0",
"uuidv4": "^6.2.12",
"stylelint": "^14.9.1",
"stylelint-config-recommended-scss": "^7.0.0",
"stylelint-scss": "^4.3.0",
"stylelint-webpack-plugin": "^3.3.0",
"url-loader": "^4.1.1",
"uuidv4": "^6.2.13",
"vue-jest": "^3.0.7",
"vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.14",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12"
"vue-template-compiler": "^2.7.8"
}
}

View file

@ -3,27 +3,28 @@ const path = require('path')
const webpackConfig = require('@nextcloud/webpack-vue-config')
const config = {
mode: 'development',
devtool: '#cheap-source-map',
entry: {
tab: path.resolve(path.join('src', 'tab.js')),
settings: path.resolve(path.join('src', 'settings.js')),
external: path.resolve(path.join('src', 'external.js')),
validation: path.resolve(path.join('src', 'validation.js')),
},
module: {
rules: [
{
test: /\.(ttf|otf|eot|woff|woff2)$/,
use: {
loader: 'file-loader',
options: {
name: 'fonts/[name].[ext]',
},
},
},
],
},
optimization: process.env.NODE_ENV === 'production'
? { chunkIds: 'deterministic' }
: {},
module: {
rules: [
{
test: /\.(ttf|otf|eot|woff|woff2)$/,
use: {
loader: 'file-loader',
options: {
name: 'fonts/[name].[ext]',
},
},
},
],
},
}
module.exports = merge(config, webpackConfig)
module.exports = merge(webpackConfig, config)

View file

@ -1,30 +0,0 @@
const { merge } = require('webpack-merge')
const path = require('path')
const webpackConfig = require('@nextcloud/webpack-vue-config')
const config = {
mode: 'production',
devtool: '#source-map',
entry: {
tab: path.resolve(path.join('src', 'tab.js')),
settings: path.resolve(path.join('src', 'settings.js')),
external: path.resolve(path.join('src', 'external.js')),
validation: path.resolve(path.join('src', 'validation.js')),
},
module: {
rules: [
{
test: /\.(ttf|otf|eot|woff|woff2)$/,
use: {
loader: 'file-loader',
options: {
name: 'fonts/[name].[ext]',
},
},
},
],
},
}
module.exports = merge(config, webpackConfig)

11091
yarn.lock

File diff suppressed because it is too large Load diff